Skip to content

Commit

Permalink
v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcos20 committed Jun 5, 2022
1 parent 2ac4f65 commit 242e484
Show file tree
Hide file tree
Showing 6 changed files with 127 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = v1.0.0-alpha.35
current_version = v1.0.0
commit = True
tag = True

Expand Down
76 changes: 76 additions & 0 deletions addresses/address.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,81 @@
},
"Dispenser": "0x257fe2e49530A4B7FC3Ed597465e2931db3f20b7",
"ERC721Factory": "0x6fd867E5AEE6D62a24f97939db90C4e67A73A651"
},
"bsc": {
"chainId": 56,
"Ocean": "0xdce07662ca8ebc241316a15b611c89711414dd1a",
"OPFCommunityFeeCollector": "0x973e69303259B0c2543a38665122b773D28405fB",
"startBlock": 18407552,
"poolTemplate": "0x3E85e7Cb15880b6d4871092E74bF65CE03E8448D",
"Router": "0x4344D4Bc29531DB736378e9A3dA85BF1eff0CB22",
"FixedPrice": "0x8bA04715B1b210f710426b21A29887EEd4EA6751",
"Staking": "0x1706DF1f2d93558D1d77bEd49ccdB8B88fAfC306",
"ERC20Template": {
"1": "0x45dA5988d4fEAEdc5Ee60FC83eA7Caa8Fb485883",
"2": "0xA8513c0457AfaD54a57664Ba5C742c24f1D624be"
},
"ERC721Template": {
"1": "0xDB55DCBbAC940aCb5c28817802f17A48B15d558b"
},
"Dispenser": "0x042BFbd88c3998282153088604207b2AeF045b43",
"ERC721Factory": "0xbFBc7A21133B4e0e54a182BE8d4337A5e036A615"
},
"energyweb": {
"chainId": 246,
"Ocean": "0x593122aae80a6fc3183b2ac0c4ab3336debee528",
"OPFCommunityFeeCollector": "0x3c21a90599b5B7f37014cA5Bf30d3f1b73d7e391",
"startBlock": 18264850,
"poolTemplate": "0xCfDdA22C9837aE76E0faA845354f33C62E03653a",
"Router": "0x4E6058dC00e90C0DCA47A5d0D3346F409939A5ab",
"FixedPrice": "0xE9397625Df9B63f0C152f975234b7988b54710B8",
"Staking": "0x159924ca0F47D6F704B97E29099b89e518A17B5E",
"ERC20Template": {
"1": "0xc313e19146Fc9a04470689C9d41a4D3054693531",
"2": "0x98679D582AB3398C03D3308dEB9c7AeC50B52ded"
},
"ERC721Template": {
"1": "0x1d535147a97bd87c8443125376E6671B60556E07"
},
"Dispenser": "0x042D709b72B437d7d387F2679bD4ac060e561c9f",
"ERC721Factory": "0x4dD281EB67DED07E76E413Df16176D66ae69e240"
},
"moonriver": {
"chainId": 1285,
"Ocean": "0x99C409E5f62E4bd2AC142f17caFb6810B8F0BAAE",
"OPFCommunityFeeCollector": "0x12bB8D85a091A69A07E22E52d4567dBB91568f52",
"startBlock": 1960563,
"poolTemplate": "0x9497d1d64F2aFeBcd4f9916Eef3d9094E5Df962f",
"Router": "0x7b0576CF01E868bce46cca91b2a8E674141b0355",
"FixedPrice": "0x8389bC1306208488D665F939AFB4079adf6f5a06",
"Staking": "0xc97fa83746aDe91b0eeB16cb51326a0A980Af7c3",
"ERC20Template": {
"1": "0xE5aa2C9B551aFcA4C0A98BB3B37D7A43084d0a66",
"2": "0xf0c7A31D7Ee26bEBfb4BAD8e37490bEadE3F846f"
},
"ERC721Template": {
"1": "0xA0329eFFa1370eAb1DC5998Db4292ae0F535a282"
},
"Dispenser": "0x0Ee8b03Dafc868a0899ebE1c12d734D53A957250",
"ERC721Factory": "0x86F2BB9F8f18B5a836b342199a3eC89F282E4018"
},
"mainnet": {
"chainId": 1,
"Ocean": "0x967da4048cD07aB37855c090aAF366e4ce1b9F48",
"OPFCommunityFeeCollector": "0x49E35cd2bAE043Abd9074B6e5a649a5AdEB05C33",
"startBlock": 14907021,
"poolTemplate": "0x8daC419D5D81Af8c8E795D0D73f64d5220e28cd8",
"Router": "0x8149276f275EEFAc110D74AFE8AFECEaeC7d1593",
"FixedPrice": "0xfa48673a7C36A2A768f89AC1ee8C355D5c367B02",
"Staking": "0x7842Fa3B2d87Ff1cd52C4152382f7C4B3406E5A6",
"ERC20Template": {
"1": "0x973e69303259B0c2543a38665122b773D28405fB",
"2": "0x3E85e7Cb15880b6d4871092E74bF65CE03E8448D"
},
"ERC721Template": {
"1": "0x4344D4Bc29531DB736378e9A3dA85BF1eff0CB22"
},
"Dispenser": "0x8bA04715B1b210f710426b21A29887EEd4EA6751",
"ERC721Factory": "0x1706DF1f2d93558D1d77bEd49ccdB8B88fAfC306"
}
}
24 changes: 24 additions & 0 deletions hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ module.exports = {
},
gasPrice:1000000000
},
mainnet: {
url:
process.env.NETWORK_RPC_URL !== undefined ? process.env.NETWORK_RPC_URL : "",
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
ropsten: {
url:
process.env.NETWORK_RPC_URL !== undefined ? process.env.NETWORK_RPC_URL : "",
Expand Down Expand Up @@ -74,6 +80,24 @@ module.exports = {
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
bsc: {
url:
process.env.NETWORK_RPC_URL !== undefined ? process.env.NETWORK_RPC_URL : "",
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
energyweb:{
url:
process.env.NETWORK_RPC_URL !== undefined ? process.env.NETWORK_RPC_URL : "",
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
moonriver: {
url:
process.env.NETWORK_RPC_URL !== undefined ? process.env.NETWORK_RPC_URL : "",
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},

},
etherscan: {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oceanprotocol/contracts",
"version": "v1.0.0-alpha.35",
"version": "v1.0.0",
"description": "Ocean Protocol Smartcontracts",
"bugs": {
"url": "https://github.com/oceanprotocol/contracts/issues"
Expand Down
35 changes: 24 additions & 11 deletions scripts/deploy-contracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@ async function main() {
case 1:
networkName = "mainnet";
productionNetwork = true;
OPFOwner = "0x7DF5273aD9A6fCce64D45c64c1E43cfb6F861725";
OPFOwner = "0x0d27cd67c4A3fd3Eb9C7C757582f59089F058167";
routerOwner = OPFOwner;
OceanTokenAddress = "0x967da4048cD07aB37855c090aAF366e4ce1b9F48";
gasLimit = 30000000;
additionalApprovedTokens=["0x0642026E7f0B6cCaC5925b4E7Fa61384250e1701"];
gasPrice = ethers.utils.parseUnits('40', 'gwei')
sleepAmount = 30
break;
case 0x3:
networkName = "ropsten";
Expand Down Expand Up @@ -115,9 +116,11 @@ async function main() {
case 0x38:
networkName = "bsc";
productionNetwork = true;
OPFOwner = '0x30E4CC2C7A9c6aA2b2Ce93586E3Df24a3A00bcDD';
OPFOwner = '0x62012804e638A15a5beC5aDE01756A7C8d0E50Cc';
routerOwner = OPFOwner;
OceanTokenAddress = "0xdce07662ca8ebc241316a15b611c89711414dd1a";
gasPrice = ethers.utils.parseUnits('5', 'gwei')
sleepAmount = 5
break;
case 2021001:
networkName = "catenaxtestnet";
Expand All @@ -129,8 +132,9 @@ async function main() {
networkName = "energyweb";
productionNetwork = true;
OceanTokenAddress = "0x593122aae80a6fc3183b2ac0c4ab3336debee528";
OPFOwner = "0x06100AB868206861a4D7936166A91668c2Ce1312";
OPFOwner = "0xB98f46485e8b9206158D8127BAF81Dbfd6139Cef";
routerOwner = OPFOwner;
sleepAmount = 5;
break;
case 1285:
networkName = "moonriver";
Expand Down Expand Up @@ -379,27 +383,36 @@ async function main() {
// SET REQUIRED ADDRESS
if(sleepAmount>0) await sleep(sleepAmount)
if (logging) console.info("Adding factoryERC721.address(" + factoryERC721.address + ") to router");
await router.connect(owner).addFactory(factoryERC721.address, options);
const factoryAddTx=await router.connect(owner).addFactory(factoryERC721.address, options);
await factoryAddTx.wait();
if(sleepAmount>0) await sleep(sleepAmount)
if (logging) console.info("Adding fixedPriceExchange.address(" + fixedPriceExchange.address + ") to router");
await router.connect(owner).addFixedRateContract(fixedPriceExchange.address, options);
const freAddTx=await router.connect(owner).addFixedRateContract(fixedPriceExchange.address, options);
await freAddTx.wait();
if(sleepAmount>0) await sleep(sleepAmount)
if (logging) console.info("Adding dispenser.address(" + dispenser.address + ") to router");
await router.connect(owner).addDispenserContract(dispenser.address, options);
const dispenserAddTx=await router.connect(owner).addDispenserContract(dispenser.address, options);
await dispenserAddTx.wait();
if(sleepAmount>0) await sleep(sleepAmount)
if (logging) console.info("Adding ssPool.address(" + ssPool.address + ") to router");
await router.connect(owner).addSSContract(ssPool.address, options);
const ssAddTx=await router.connect(owner).addSSContract(ssPool.address, options);
await ssAddTx.wait();
if(sleepAmount>0) await sleep(sleepAmount)

// add additional tokens
for (const token of additionalApprovedTokens) {
if (logging) console.info("Adding "+token+" as approved token");
await router.connect(owner).addApprovedToken(token, options);
const tokenTx=await router.connect(owner).addApprovedToken(token, options);
await tokenTx.wait();
}

// Avoid setting Owner an account we cannot use on barge for now
if (logging) console.info("Moving Router ownership to " + routerOwner)
if (owner.address != routerOwner) await router.connect(owner).changeRouterOwner(routerOwner, options)

if (owner.address != routerOwner) {
if (logging) console.info("Moving Router ownership to " + routerOwner)
const routerOwnerTx=await router.connect(owner).changeRouterOwner(routerOwner, options)
await routerOwnerTx.wait()
}

if (addressFile) {
// write address.json if needed
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = ocean-contracts
version = v1.0.0-alpha.35
version = v1.0.0
author = leucothia
author_email = devops@oceanprotocol.com
description = 🐳 Ocean Protocol L1 - v4
Expand Down

0 comments on commit 242e484

Please sign in to comment.