add comp instance deployment
This commit is contained in:
parent
9c4035f15b
commit
f521ef6703
|
@ -3,6 +3,7 @@ DEPLOYER=0xCEe71753C9820f063b38FDbE4cFDAf1d3D928A80
|
|||
HASHER=0x83584f83f26aF4eDDA9CBe8C730bc87C364b28fe
|
||||
VERIFIER=0xce172ce1F20EC0B3728c9965470eaf994A03557A
|
||||
SALT=0x0000000000000000000000000000000000000000000000000000000047941987
|
||||
COMP_ADDRESS=0xc00e94Cb662C3520282E6f5717214004A7f26888
|
||||
|
||||
# Goerli
|
||||
DEPLOYER=0xCEe71753C9820f063b38FDbE4cFDAf1d3D928A80
|
||||
|
|
71
instances.js
71
instances.js
|
@ -1,17 +1,70 @@
|
|||
module.exports = [
|
||||
{
|
||||
isETH: false,
|
||||
tokenAddress: "0xBA62BCfcAaFc6622853cca2BE6Ac7d845BC0f2Dc",
|
||||
denomination: "1000000000000000000",
|
||||
domain: "fau-1.tornadocash.eth",
|
||||
symbol: "FAU",
|
||||
tokenAddress: "0x6B175474E89094C44Da98b954EedeAC495271d0F",
|
||||
denomination: "10000000000000000000000",
|
||||
domain: "dai-10000.tornadocash.eth",
|
||||
symbol: "DAI",
|
||||
decimals: 18
|
||||
},
|
||||
{
|
||||
tokenAddress: "0x6B175474E89094C44Da98b954EedeAC495271d0F",
|
||||
denomination: "100000000000000000000000",
|
||||
domain: "dai-100000.tornadocash.eth",
|
||||
symbol: "DAI",
|
||||
decimals: 18
|
||||
},
|
||||
{
|
||||
isCToken: true,
|
||||
tokenAddress: "0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643",
|
||||
denomination: "5000000000000",
|
||||
domain: "cdai-50000.tornadocash.eth",
|
||||
symbol: "cDAI",
|
||||
decimals: 8
|
||||
},
|
||||
{
|
||||
isCToken: true,
|
||||
tokenAddress: "0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643",
|
||||
denomination: "50000000000000",
|
||||
domain: "cdai-500000.tornadocash.eth",
|
||||
symbol: "cDAI",
|
||||
decimals: 8
|
||||
},
|
||||
{
|
||||
isCToken: true,
|
||||
tokenAddress: "0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643",
|
||||
denomination: "500000000000000",
|
||||
domain: "cdai-5000000.tornadocash.eth",
|
||||
symbol: "cDAI",
|
||||
decimals: 8
|
||||
},
|
||||
{
|
||||
tokenAddress: "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
|
||||
denomination: "10000000",
|
||||
domain: "wbtc-01.tornadocash.eth",
|
||||
symbol: "wBTC",
|
||||
decimals: 8
|
||||
},
|
||||
{
|
||||
tokenAddress: "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
|
||||
denomination: "100000000",
|
||||
domain: "wbtc-1.tornadocash.eth",
|
||||
symbol: "wBTC",
|
||||
decimals: 8
|
||||
},
|
||||
{
|
||||
tokenAddress: "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
|
||||
denomination: "1000000000",
|
||||
domain: "wbtc-10.tornadocash.eth",
|
||||
symbol: "wBTC",
|
||||
decimals: 8
|
||||
},
|
||||
// {
|
||||
// isETH: true,
|
||||
// denomination: "2000000000000000000",
|
||||
// domain: "eth-2.tornadocash.eth",
|
||||
// symbol: "ETH",
|
||||
// isETH: false,
|
||||
// isCToken: true,
|
||||
// tokenAddress: "0xBA62BCfcAaFc6622853cca2BE6Ac7d845BC0f2Dc",
|
||||
// denomination: "1000000000000000000",
|
||||
// domain: "fau-2.tornadocash.eth",
|
||||
// symbol: "FAU",
|
||||
// decimals: 18
|
||||
// },
|
||||
]
|
||||
|
|
|
@ -24,7 +24,7 @@ async function main() {
|
|||
continue
|
||||
}
|
||||
console.log(`Deploying ${action.contract} to ${action.domain} (${action.expectedAddress})`)
|
||||
const tx = await deployer.deploy(action.bytecode, actions.salt, { gasLimit: 7e6, gasPrice: 20000000000 })
|
||||
const tx = await deployer.deploy(action.bytecode, actions.salt, { gasLimit: 7e6, gasPrice: 1e6 })
|
||||
console.log(`TX hash ${explorer}/tx/${tx.hash}`)
|
||||
try {
|
||||
await tx.wait()
|
||||
|
|
|
@ -4,7 +4,7 @@ const ethers = require('ethers')
|
|||
const { formatUnits } = ethers.utils
|
||||
const { deploy, getContractData } = require('./utils')
|
||||
|
||||
const { DEPLOYER, SALT, HASHER, VERIFIER } = process.env
|
||||
const { DEPLOYER, SALT, HASHER, VERIFIER, COMP_ADDRESS } = process.env
|
||||
|
||||
const instances = require('../instances')
|
||||
// const deployer = getContractData('../deployer/build/contracts/Deployer.json')
|
||||
|
@ -12,9 +12,12 @@ const instances = require('../instances')
|
|||
// const hasher = getContractData('../tornado-core/build/contracts/Hasher.json')
|
||||
const ethTornado = getContractData('../tornado-core/build/contracts/ETHTornado.json')
|
||||
const ercTornado = getContractData('../tornado-core/build/contracts/ERC20Tornado.json')
|
||||
const compTornado = getContractData('../tornado-core/build/contracts/cTornado.json')
|
||||
|
||||
const actions = []
|
||||
|
||||
// Actions needed for new blockchains
|
||||
// Assumes that EIP-2470 deployer is already present on the chain
|
||||
// actions.push(
|
||||
// deploy({
|
||||
// domain: config.deployer.address,
|
||||
|
@ -56,15 +59,18 @@ for (const instance of instances) {
|
|||
if (!instance.isETH) {
|
||||
args.push(instance.tokenAddress)
|
||||
}
|
||||
if (instance.isCToken) {
|
||||
args.unshift(COMP_ADDRESS)
|
||||
}
|
||||
actions.push(
|
||||
deploy({
|
||||
domain: instance.domain,
|
||||
contract: instance.isETH ? ethTornado : ercTornado,
|
||||
contract: instance.isETH ? ethTornado : instance.isCToken ? compTornado : ercTornado,
|
||||
args,
|
||||
title: `New Tornado.cash pool for ${formatUnits(instance.denomination, instance.decimals)} of ${
|
||||
title: `New Tornado.cash pool for ${formatUnits(instance.denomination, instance.decimals).replace(/\.0$/, '')} of ${
|
||||
instance.symbol
|
||||
}`,
|
||||
description: `Tornado cash instance for ${formatUnits(instance.denomination, instance.decimals)} of ${
|
||||
description: `Tornado cash instance for ${formatUnits(instance.denomination, instance.decimals).replace(/\.0$/, '')} of ${
|
||||
instance.symbol
|
||||
}${instance.isETH ? '' : ` at address ${instance.tokenAddress}`}`,
|
||||
}),
|
||||
|
@ -77,5 +83,5 @@ const result = {
|
|||
salt: SALT,
|
||||
actions: actions,
|
||||
}
|
||||
fs.writeFileSync('actions.json', JSON.stringify(result, null, ' '))
|
||||
fs.writeFileSync('actions.json', JSON.stringify(result, null, 2))
|
||||
console.log('Created actions.json')
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit f5d8f6d9718db7cfe3a1d3cbb038618ce52b31cb
|
||||
Subproject commit 54a7bdcb04aa9d29b3726cf1f177aa5e955ec626
|
Loading…
Reference in New Issue