diff --git a/README.md b/README.md index 019cf7d..95bb4e3 100644 --- a/README.md +++ b/README.md @@ -26,10 +26,10 @@ There is Tornado governance proposal for upgrade nova contract on Xdai chain. ## Deploy -1. Check `config.json` for actual values. +1. Check `config.js` for actual values. Take `newNovaImpl` address from README of [repository](https://github.com/tornadocash/tornado-nova). 2. Run deploy: ``` - npx hardhat run scripts/deploy.js --network + npx hardhat run scripts/deploy.js --network mainnet ``` diff --git a/config.js b/config.js new file mode 100644 index 0000000..323430d --- /dev/null +++ b/config.js @@ -0,0 +1,13 @@ +module.exports = { + gasLimit: 200000, + + // BSC TEST VALUES + // novaProxy: "0xC953965A9287d298bbECF13fd59aA3F4cE69d322", + // newNovaImpl: "0x75Df5AF045d91108662D8080fD1FEFAd6aA0bb59", // random contract + // ethAmbBridge: "0x05185872898b6f94AA600177EF41B9334B1FA48B", + + // MAINNET VALUES + novaProxy: '0xD692Fd2D0b2Fbd2e52CFa5B5b9424bC981C30696', + newNovaImpl: '0xAEE471D6FD5c6B3f377f45B0a3c705505d172090', + ethAmbBridge: '0x4C36d2919e407f0Cc2Ee3c993ccF8ac26d9CE64e', +} diff --git a/scripts/deploy.js b/scripts/deploy.js index dd2b31e..30980e5 100644 --- a/scripts/deploy.js +++ b/scripts/deploy.js @@ -1,18 +1,7 @@ const { ethers } = require('hardhat') +const config = require('../config') async function main() { - const gasLimit = 200000 - - // BSC TEST VALUES - const novaProxy = '0xC953965A9287d298bbECF13fd59aA3F4cE69d322' // test one - const newNovaImpl = '0x75Df5AF045d91108662D8080fD1FEFAd6aA0bb59' // random contract - const ethAmbBridge = '0x05185872898b6f94AA600177EF41B9334B1FA48B' // on bsc - - // MAINNET VALUES - // const novaProxy = "0xD692Fd2D0b2Fbd2e52CFa5B5b9424bC981C30696" - // const newNovaImpl = "TODO" - // const ethAmbBridge = "0x4C36d2919e407f0Cc2Ee3c993ccF8ac26d9CE64e" - const [deployer] = await ethers.getSigners() console.log('Deploying contracts with the account:', deployer.address) @@ -20,7 +9,12 @@ async function main() { console.log('Account balance:', (await deployer.getBalance()).toString()) const Proposal = await ethers.getContractFactory('NovaUpgradeProposal') - const proposal = await Proposal.deploy(novaProxy, newNovaImpl, ethAmbBridge, gasLimit) + const proposal = await Proposal.deploy( + config.novaProxy, + config.newNovaImpl, + config.ethAmbBridge, + config.gasLimit, + ) console.log('Proposal address:', proposal.address) }