Skip to content

Commit

Permalink
Merge pull request #701 from oceanprotocol/feature/polygonedge_and_ga…
Browse files Browse the repository at this point in the history
…iaxtestnet_deployments

Feature/polygonedge and gaiaxtestnet deployments
  • Loading branch information
alexcos20 authored Sep 1, 2022
2 parents eb3c138 + 3547fb0 commit ec95f05
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 27 deletions.
36 changes: 36 additions & 0 deletions addresses/address.json
Original file line number Diff line number Diff line change
Expand Up @@ -225,5 +225,41 @@
"veDelegationProxy": "0xfa48673a7C36A2A768f89AC1ee8C355D5c367B02",
"DFRewards": "0x7842Fa3B2d87Ff1cd52C4152382f7C4B3406E5A6",
"DFStrategyV1": "0x973e69303259B0c2543a38665122b773D28405fB"
},
"polygonedge": {
"chainId": 81001,
"Ocean": "0x8c98ea273bA22327F896Aa1a1a46E1BFf56e9b1D",
"OPFCommunityFeeCollector": "0x8daC419D5D81Af8c8E795D0D73f64d5220e28cd8",
"startBlock": 3256707,
"Router": "0x8149276f275EEFAc110D74AFE8AFECEaeC7d1593",
"FixedPrice": "0xfa48673a7C36A2A768f89AC1ee8C355D5c367B02",
"Staking": "0x7842Fa3B2d87Ff1cd52C4152382f7C4B3406E5A6",
"ERC20Template": {
"1": "0x973e69303259B0c2543a38665122b773D28405fB",
"2": "0x3E85e7Cb15880b6d4871092E74bF65CE03E8448D"
},
"ERC721Template": {
"1": "0x4344D4Bc29531DB736378e9A3dA85BF1eff0CB22"
},
"Dispenser": "0x8bA04715B1b210f710426b21A29887EEd4EA6751",
"ERC721Factory": "0x1706DF1f2d93558D1d77bEd49ccdB8B88fAfC306"
},
"gaiaxtestnet": {
"chainId": 2021000,
"Ocean": "0x80E63f73cAc60c1662f27D2DFd2EA834acddBaa8",
"OPFCommunityFeeCollector": "0xD3173c3E3d9ea662E914C30Bcd647eF573AcE405",
"startBlock": 7711332,
"Router": "0x23A8b2D7176485a6349e4830605F323f31019333",
"FixedPrice": "0xb65F19225fEBb650Fcc211dC9F18FEC6f4a328D5",
"Staking": "0xcD8674D32E940B14ABF2Cc8C32B21952cB354101",
"ERC20Template": {
"1": "0x43eC0a34E1b70C7f8E579ab866F37642777727E7",
"2": "0x6976320eC365202118B4B0B0906E13DDf21633A5"
},
"ERC721Template": {
"1": "0x5494711392a67DA50D3bC7b1fcC2d1877cFaA4d2"
},
"Dispenser": "0x8c98ea273bA22327F896Aa1a1a46E1BFf56e9b1D",
"ERC721Factory": "0x49E35cd2bAE043Abd9074B6e5a649a5AdEB05C33"
}
}
6 changes: 6 additions & 0 deletions hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ module.exports = {
accounts:
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [],
},
gaiaxtestnet: {
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
32 changes: 15 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@
"test:full:cover": "npx hardhat coverage"
},
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.0.5",
"@nomiclabs/hardhat-ethers": "^2.1.1",
"@nomiclabs/hardhat-etherscan": "^3.1.0",
"@nomiclabs/hardhat-vyper": "^3.0.0",
"@nomiclabs/hardhat-waffle": "^2.0.3",
"@openzeppelin/contracts": "^4.5.0",
"@openzeppelin/test-helpers": "^0.5.15",
"chai": "^4.3.6",
"dotenv": "^16.0.0",
"eth-permit": "^0.2.1",
"eth-permit": "^0.2.3",
"ethereum-waffle": "^3.4.4",
"ethereumjs-util": "^7.1.3",
"ethers": "^5.7.0",
Expand Down
20 changes: 12 additions & 8 deletions scripts/deploy-contracts.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ async function main() {
shouldDeployOceanToken = true;
shouldDeployDF = false;
shouldDeployVE = false;
gasLimit = 5242800;
gasLimit = 8388608;
break;
case 0x507:
networkName = "moonbase";
Expand All @@ -134,6 +134,11 @@ async function main() {
OPFOwner = '0x2112Eb973af1DBf83a4f11eda82f7a7527D7Fde5'
routerOwner = OPFOwner;
OceanTokenAddress = "0x80E63f73cAc60c1662f27D2DFd2EA834acddBaa8";
gasLimit = 6666666
shouldDeployOceanToken = false;
shouldDeployDF = false;
shouldDeployVE = false;
sleepAmount = 1
break;
case 80001:
networkName = "mumbai";
Expand Down Expand Up @@ -407,20 +412,19 @@ async function main() {
}
if (sleepAmount > 0) await sleep(sleepAmount)
addresses.ERC721Factory = factoryERC721.address;
const nftCount = await factoryERC721.getCurrentNFTTemplateCount();
const nftTemplate = await factoryERC721.getNFTTemplate(nftCount);
const nftCount = await factoryERC721.getCurrentNFTTemplateCount(options);
const nftTemplate = await factoryERC721.getNFTTemplate(nftCount,options);
addresses.ERC721Template[nftCount.toString()] = templateERC721.address;

let currentTokenCount = await factoryERC721.getCurrentTemplateCount();
let tokenTemplate = await factoryERC721.getTokenTemplate(currentTokenCount);
let currentTokenCount = await factoryERC721.getCurrentTemplateCount(options);
let tokenTemplate = await factoryERC721.getTokenTemplate(currentTokenCount,options);
addresses.ERC20Template[currentTokenCount.toString()] = templateERC20.address;
if (sleepAmount > 0) await sleep(sleepAmount)
if (logging) console.info("Adding ERC20Enterprise to ERC721Factory");
const templateadd = await factoryERC721.connect(owner).addTokenTemplate(templateERC20Enterprise.address, options);
await templateadd.wait();
if (sleepAmount > 0) await sleep(sleepAmount)
currentTokenCount = await factoryERC721.getCurrentTemplateCount();
tokenTemplate = await factoryERC721.getTokenTemplate(currentTokenCount);
currentTokenCount = await factoryERC721.getCurrentTemplateCount(options);
tokenTemplate = await factoryERC721.getTokenTemplate(currentTokenCount,options);
addresses.ERC20Template[currentTokenCount.toString()] =
templateERC20Enterprise.address;

Expand Down

0 comments on commit ec95f05

Please sign in to comment.