Skip to content

Commit

Permalink
deploy to mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
andresaiello committed Jan 23, 2024
1 parent 3f7f62f commit 13aafe1
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 11 deletions.
10 changes: 5 additions & 5 deletions data/addresses.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
"zetaTokenConsumerUniV3": ""
},
"eth_mainnet": {
"connector": "0x054197b11aA98E6d842073F9362b64b10F2c24A7",
"erc20Custody": "0xb77277Cf4c734894d4f2471492B184E5C71C32a9",
"connector": "0x000007Cf399229b2f5A4D043F20E90C9C98B7C6a",
"erc20Custody": "0x000001b91C19A31809e769110d35FAd2C15BCeA7",
"immutableCreate2Factory": "0x095a03c6a68137fE9a566bBc3e552F299d8b886d",
"tss": "0x6F28967E382765cEF6149fa02Cd0Ba0753B01A6b",
"tssUpdater": "0xfCA0392567D5eb77681843b2608dE9C625F57948",
"zetaToken": "0x5CDf9f824526Bf2A4638BF6879591F635Bb8f0B8"
"tss": "0xaeB6dDB7708467814D557e340283248be8E43124",
"tssUpdater": "0xaeB6dDB7708467814D557e340283248be8E43124",
"zetaToken": "0xf091867EC603A6628eD83D274E835539D82e9cc8"
},
"goerli_testnet": {
"connector": "0x00005e3125aba53c5652f9f0ce1a4cf91d8b15ea",
Expand Down
6 changes: 3 additions & 3 deletions lib/contracts.constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ const SALT_NUMBERS = {
zetaToken: "",
},
eth_mainnet: {
zetaConnector: "1414",
zetaConnector: "84286",
zetaConsumer: "0",
zetaERC20Custody: "87967",
zetaToken: "84108",
zetaERC20Custody: "926526",
zetaToken: "0",
},
goerli_testnet: {
zetaConnector: "1414",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export const deterministicDeployERC20Custody = async () => {

const accounts = await ethers.getSigners();
const [signer] = accounts;
const initialBalance = await signer.getBalance();

const DEPLOYER_ADDRESS = process.env.DEPLOYER_ADDRESS || signer.address;

Expand All @@ -24,7 +25,7 @@ export const deterministicDeployERC20Custody = async () => {
const tssUpdaterAddress = getAddress("tssUpdater", network.name);
const immutableCreate2FactoryAddress = getAddress("immutableCreate2Factory", network.name);

const saltNumber = getSaltNumber(network.name, "zetaERC20Custody");
const saltNumber = getSaltNumber("zetaERC20Custody", network.name);
const saltStr = BigNumber.from(saltNumber).toHexString();

const zetaFee = ERC20_CUSTODY_ZETA_FEE;
Expand All @@ -46,8 +47,11 @@ export const deterministicDeployERC20Custody = async () => {
signer,
});

const finalBalance = await signer.getBalance();
console.log("Deployed ERC20 Custody. Address:", address);
console.log("Constructor Args", constructorArgs);
console.log("ETH spent:", initialBalance.sub(finalBalance).toString());

return address;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const deterministicDeployZetaConnector = async () => {

const accounts = await ethers.getSigners();
const [signer] = accounts;
const initialBalance = await signer.getBalance();

const DEPLOYER_ADDRESS = process.env.DEPLOYER_ADDRESS || signer.address;

Expand All @@ -25,7 +26,7 @@ export const deterministicDeployZetaConnector = async () => {
const tssUpdaterAddress = getAddress("tssUpdater", network.name);
const immutableCreate2FactoryAddress = getAddress("immutableCreate2Factory", network.name);

const saltNumber = getSaltNumber(network.name, "zetaConnector");
const saltNumber = getSaltNumber("zetaConnector", network.name);
const saltStr = BigNumber.from(saltNumber).toHexString();

const salthex = saltToHex(saltStr, DEPLOYER_ADDRESS);
Expand All @@ -48,8 +49,11 @@ export const deterministicDeployZetaConnector = async () => {
signer,
});

const finalBalance = await signer.getBalance();
console.log("Deployed ZetaConnector. Address:", address);
console.log("Constructor Args", constructorArgs);
console.log("ETH spent:", initialBalance.sub(finalBalance).toString());

return address;
};

Expand Down
5 changes: 4 additions & 1 deletion scripts/deployments/core/deterministic-deploy-zeta-token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@ export const deterministicDeployZetaToken = async () => {

const accounts = await ethers.getSigners();
const [signer] = accounts;
const initialBalance = await signer.getBalance();

const DEPLOYER_ADDRESS = process.env.DEPLOYER_ADDRESS || signer.address;

const tssAddress = getAddress("tss", network.name);
const tssUpdaterAddress = getAddress("tssUpdater", network.name);
const immutableCreate2FactoryAddress = getAddress("immutableCreate2Factory", network.name);

const saltNumber = getSaltNumber(network.name, "zetaToken");
const saltNumber = getSaltNumber("zetaToken", network.name);
const saltStr = BigNumber.from(saltNumber).toHexString();

const salthex = saltToHex(saltStr, DEPLOYER_ADDRESS);
Expand Down Expand Up @@ -53,8 +54,10 @@ export const deterministicDeployZetaToken = async () => {
signer,
});

const finalBalance = await signer.getBalance();
console.log("Deployed zetaToken. Address:", address);
console.log("Constructor Args", constructorArgs);
console.log("ETH spent:", initialBalance.sub(finalBalance).toString());

return address;
};
Expand Down

0 comments on commit 13aafe1

Please sign in to comment.