Skip to content

Commit

Permalink
Merge pull request #67 from MoonSHRD/network/ropsten
Browse files Browse the repository at this point in the history
Network/ropsten
  • Loading branch information
JackBekket committed Oct 22, 2021
2 parents bfecd46 + 154ba06 commit 7a283f6
Show file tree
Hide file tree
Showing 8 changed files with 299 additions and 357 deletions.
4 changes: 2 additions & 2 deletions contracts/721/singleton/MasterFactory721.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ address public currencies_router;
// event
event SaleCreated(address indexed author, uint price, CurrenciesERC20.CurrencyERC20 indexed currency, uint256 indexed master_id, address it_sale);
event SaleCreatedHuman(address author, uint price, CurrenciesERC20.CurrencyERC20 currency,uint256 master_id, address it_sale);
event CreateMasterItem(string link, string _description, uint256 _supplyType, uint256 master_id);
event CreateMasterItem(string link, string _description, uint256 _supplyType, uint256 master_id, address author);
/**
* @param msnft_ address of Master token contract
* @param currencies_router_ address of ERC20 currency router
Expand Down Expand Up @@ -63,7 +63,7 @@ function createMasterItem(string memory link, string memory _description, uint25
address _author = msg.sender;
MSNFT master = MSNFT(master_adr);
master_id = master.createMasterCopy(link, _author, _description, _supplyType);
emit CreateMasterItem(link, _description, _supplyType, master_id);
emit CreateMasterItem(link, _description, _supplyType, master_id, _author);
return master_id;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## `SNM`
## `MST`



Expand Down
147 changes: 78 additions & 69 deletions migrations/2_deploy_contracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,105 +29,114 @@ var custom_gas_price = '9'; // for ropsten
var wei_gas_price = web3.utils.toWei(custom_gas_price, 'gwei');
//var string_gas_price = wei_gas_price.toString;

module.exports = function(deployer, network, accounts) {
module.exports = function (deployer, network, accounts) {

if (network == "ropsten") {
console.log(accounts);
console.log(wei_gas_price);

console.log("block gas price:");
var limitGas = web3.eth.getBlock("latest").gasLimit;
console.log(limitGas);
// console.log(string_gas_price);



deployer.then(async () => {
/*
await deployer.deploy(USDT,"USDT","USDT");
await deployer.deploy(USDC,"USDC","USDC");
USDC = await USDC.deployed();
await deployer.deploy(DAI,"DAI","DAI");
DAI = await DAI.deployed();
await deployer.deploy(WETH,"WETH","WETH");
WETH = await WETH.deployed();
*/


await deployer.deploy(MST,"MST","MST");
MST = await MST.deployed();
console.log("MST dummy address:");
console.log(MST.address);
//...
}).then(function() {
console.log("usdt address:");
console.log(usdt_address);
console.log("weth address:");
console.log(weth_address);
return deployer.deploy(Currencies,usdt_address,usdc_address,dai_address,weth_address,MST.address, {gasPrice: wei_gas_price, from:accounts[0]});

}).then(function(){
return deployer.deploy(Master,"MoonShardNFT","MSNFT",{gasPrice: wei_gas_price, from:accounts[0]});
}).then(function(){
console.log("Master token address:");
console.log(Master.address);
return deployer.deploy(MasterFactory,Master.address,accounts[1],Currencies.address,{gasPrice: wei_gas_price, from:accounts[0]});

}).then(async () =>{
console.log ("MasterFactory address:");
console.log(MasterFactory.address);
MasterInstance = await Master.deployed();
MasterFactoryInstance = await MasterFactory.deployed();
await MasterInstance.updateFactoryAdress(MasterFactoryInstance.address);
fa = await MasterInstance.getFactoryAddress();
console.log("factory address");
console.log(fa);
return;
}).then(async () => {
return;
});
console.log(accounts);
console.log(wei_gas_price);

console.log("block gas price:");
var limitGas = web3.eth.getBlock("latest").gasLimit;
console.log(limitGas);
// console.log(string_gas_price);



deployer.then(async () => {
/*
await deployer.deploy(USDT,"USDT","USDT");
await deployer.deploy(USDC,"USDC","USDC");
USDC = await USDC.deployed();
await deployer.deploy(DAI,"DAI","DAI");
DAI = await DAI.deployed();
await deployer.deploy(WETH,"WETH","WETH");
WETH = await WETH.deployed();
*/


await deployer.deploy(MST, "MST", "MST");
MST = await MST.deployed();
console.log("MST dummy address:");
console.log(MST.address);
//...
}).then(function () {
console.log("usdt address:");
console.log(usdt_address);
console.log("weth address:");
console.log(weth_address);
return deployer.deploy(Currencies, usdt_address, usdc_address, dai_address, weth_address, MST.address, {
gasPrice: wei_gas_price,
from: accounts[0]
});

}).then(function () {
return deployer.deploy(Master, "MoonShardNFT", "MSNFT", {
gasPrice: wei_gas_price,
from: accounts[0]
});
}).then(function () {
console.log("Master token address:");
console.log(Master.address);
return deployer.deploy(MasterFactory, Master.address, accounts[1], Currencies.address, {
gasPrice: wei_gas_price,
from: accounts[0]
});

}).then(async () => {
console.log("MasterFactory address:");
console.log(MasterFactory.address);
MasterInstance = await Master.deployed();
MasterFactoryInstance = await MasterFactory.deployed();
await MasterInstance.updateFactoryAdress(MasterFactoryInstance.address);
fa = await MasterInstance.getFactoryAddress();
console.log("factory address");
console.log(fa);
return;
}).then(async () => {
return;
});

} // end of ropsten deployment




// if (network == "development") {
// console.log(accounts);
// console.log(wei_gas_price);

// console.log("block gas price:");
// var limitGas = web3.eth.getBlock("latest").gasLimit;
// console.log(limitGas);
// // console.log(string_gas_price);



// deployer.then(async () => {

// await deployer.deploy(USDT,"USDT","USDT");
// await deployer.deploy(USDC,"USDC","USDC");
// USDC = await USDC.deployed();
// await deployer.deploy(DAI,"DAI","DAI");
// DAI = await DAI.deployed();
// await deployer.deploy(WETH,"WETH","WETH");
// WETH = await WETH.deployed();

// await deployer.deploy(MST,"MST","MST");
// MST = await MST.deployed();
// //...
// }).then(function() {

// return deployer.deploy(Currencies,USDT.address,USDC.address,DAI.address,WETH.address,MST.address, {gasPrice: wei_gas_price, from:accounts[0]});

// }).then(function(){
// return deployer.deploy(Master,"MoonShardNFT","MSNFT",{gasPrice: wei_gas_price, from:accounts[0]});

// }).then(function(){
// console.log("Master token address:");
// console.log(Master.address);
// return deployer.deploy(MasterFactory,Master.address,accounts[1],Currencies.address,{gasPrice: wei_gas_price, from:accounts[0]});

// }).then(async () =>{
// console.log ("MasterFactory address:");
// console.log(MasterFactory.address);
Expand All @@ -141,8 +150,8 @@ return;
// }).then(async () => {
// return;
// });

// } // end of development network migration


};
52 changes: 5 additions & 47 deletions ropsten_addresses.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,63 +16,21 @@ WETH
0x98201f86F578154e01ec683E1962578855d8320C


Ropsten contracts (check your version!)

v0.0.1

MST(dummy) -- this is DUMMY contract, we own this contract and we can use it for mint, buy, transfer and other tests
0x14c04531B1267aaFC6731f63c5Fb5D378A0D30E2

WETH -- this is wrapped ethereum contract. You can use this contract to wrap your test ether to test weth erc20 tokens. those tokens can be used to testing buy, transfer and other tests
0x98201f86F578154e01ec683E1962578855d8320C

CurrenciesERC20
0x0d0798f633B7B0E4548e7Cc4808c28f87311Ee54

MSNFT
0x7d3B58B3A4e668f4BfEC4AE52c0451A27Ee4890e

MasterFactory721
0x55Aa3C41B2392Af7Ea3914248648eeF1B91B1F64

After deploying (and releasing) new version do not forget to upd this doc and to create release with tag and attach ./build directory to it!


v0.0.2

MST(dummy) -- this is DUMMY contract, we own this contract and we can use it for mint, buy, transfer and other tests
0x9bB0f9D78cdbB41f4BCA149e033e282a2834c806

WETH -- this is wrapped ethereum contract. You can use this contract to wrap your test ether to test weth erc20 tokens. those tokens can be used to testing buy, transfer and other tests
0x98201f86F578154e01ec683E1962578855d8320C

CurrenciesERC20
0x8Faa5d721794299b7df6eb8AcB75B8c622Cbce82

MSNFT
0x9c1A4C70a478012976D9760B3603E241c034006f

MasterFactory721
0x50112D712A5A96D9aEeD0583198417Bccdb9F8bC

After deploying (and releasing) new version do not forget to upd this doc and to create release with tag and attach ./build directory to it!


v0.0.3
v0.0.4

MST(dummy) -- this is DUMMY contract, we own this contract and we can use it for mint, buy, transfer and other tests
0x95C828A9c342A235A99c2fa603D3cbEcd098AF9C
0xEC3C19C5b75BBF51C0FE90E8df6FC308FBAE755E

WETH -- this is wrapped ethereum contract. You can use this contract to wrap your test ether to test weth erc20 tokens. those tokens can be used to testing buy, transfer and other tests
0x98201f86F578154e01ec683E1962578855d8320C

CurrenciesERC20
0x2d2Db8737F54a06CB12Ad7527bf0987577798105
0x48B128B17C73973FB70bE30Df833ecf4175E11dA

MSNFT
0x11001EBDBf11388d646CF7eAA3131a3cF5146778
0xb3178244C037Bb71Bda01547023a475Ecd52876C

MasterFactory721
0x2D25FcAf99f1ab5BC523c3f0AaAfA63c2dA6caB5
0xE63C81Da719BDa2A7ddb80E176fEbb92b6aF7A44

After deploying (and releasing) new version do not forget to upd this doc and to create release with tag and attach ./build directory to it!

0 comments on commit 7a283f6

Please sign in to comment.