Skip to content

Commit

Permalink
feat: deploy ConstAddressDeployer/Create3Deployer to stagenet chains
Browse files Browse the repository at this point in the history
  • Loading branch information
milapsheth committed Nov 10, 2023
1 parent d0c520b commit d6498ae
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 5 deletions.
6 changes: 5 additions & 1 deletion axelar-chains-config/info/mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@
"deployer": "0xd55cd98cdE61c3CcE1286F9aF50cDbF16f5dba5b"
},
"ConstAddressDeployer": {
"address": "0x98B2920D53612483F91F12Ed7754E51b4A77919e"
"address": "0x98B2920D53612483F91F12Ed7754E51b4A77919e",
"deployer": "0xE86375704CDb8491a5Ed82D90DceCE02Ee0ac25F",
"deploymentMethod": "create",
"codehash": "0x8fda47a596dfba923270da84e0c32a2d0312f1c03389f83e16f2b5a35ed37fbe",
"predeployCodehash": "0x8fda47a596dfba923270da84e0c32a2d0312f1c03389f83e16f2b5a35ed37fbe"
},
"Create3Deployer": {
"address": "0x6513Aedb4D1593BA12e50644401D976aebDc90d8",
Expand Down
93 changes: 92 additions & 1 deletion axelar-chains-config/info/stagenet.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@
"refundIssuer": "0x2517bA7a3E2cef54c1CD8618e7B0B661A7623817"
},
"ConstAddressDeployer": {
"address": "0x98B2920D53612483F91F12Ed7754E51b4A77919e"
"address": "0x98B2920D53612483F91F12Ed7754E51b4A77919e",
"deployer": "0xE86375704CDb8491a5Ed82D90DceCE02Ee0ac25F",
"deploymentMethod": "create",
"codehash": "0x8fda47a596dfba923270da84e0c32a2d0312f1c03389f83e16f2b5a35ed37fbe",
"predeployCodehash": "0x8fda47a596dfba923270da84e0c32a2d0312f1c03389f83e16f2b5a35ed37fbe"
},
"Create3Deployer": {
"salt": "Create3Deployer",
Expand Down Expand Up @@ -907,6 +911,93 @@
"salt": "InterchainGovernance v5.5"
}
}
},
"ethereum-sepolia": {
"name": "Ethereum-Sepolia",
"id": "ethereum-sepolia",
"chainId": 11155111,
"rpc": "https://1rpc.io/sepolia",
"tokenSymbol": "ETH",
"confirmations": 2,
"contracts": {
"ConstAddressDeployer": {
"address": "0x98B2920D53612483F91F12Ed7754E51b4A77919e",
"deployer": "0xE86375704CDb8491a5Ed82D90DceCE02Ee0ac25F",
"deploymentMethod": "create",
"codehash": "0x8fda47a596dfba923270da84e0c32a2d0312f1c03389f83e16f2b5a35ed37fbe",
"predeployCodehash": "0x8fda47a596dfba923270da84e0c32a2d0312f1c03389f83e16f2b5a35ed37fbe"
},
"Create3Deployer": {
"address": "0x6513Aedb4D1593BA12e50644401D976aebDc90d8",
"deployer": "0x6f24A47Fc8AE5441Eb47EFfC3665e70e69Ac3F05",
"deploymentMethod": "create2",
"codehash": "0xf0ad66defbe082df243d4d274e626f557f97579c5c9e19f33d8093d6160808b7",
"predeployCodehash": "0x73fc31262c4bad113c79439fd231281201c7c7d45b50328bd86bccf37684bf92",
"salt": "Create3Deployer"
}
},
"explorer": {
"url": "https://sepolia.etherscan.io",
"api": "https://api-sepolia.etherscan.io/api"
},
"gasOptions": {
"maxFeePerGas": 110000000,
"maxPriorityFeePerGas": 100000000
}
},
"arbitrum-sepolia": {
"name": "Arbitrum-Sepolia",
"id": "arbitrum-sepolia",
"chainId": 421614,
"rpc": "https://arbitrum-sepolia.blockpi.network/v1/rpc/public",
"tokenSymbol": "ETH",
"confirmations": 2,
"contracts": {
"ConstAddressDeployer": {
"address": "0x98B2920D53612483F91F12Ed7754E51b4A77919e",
"deployer": "0xE86375704CDb8491a5Ed82D90DceCE02Ee0ac25F",
"deploymentMethod": "create",
"codehash": "0x8fda47a596dfba923270da84e0c32a2d0312f1c03389f83e16f2b5a35ed37fbe",
"predeployCodehash": "0x8fda47a596dfba923270da84e0c32a2d0312f1c03389f83e16f2b5a35ed37fbe"
},
"Create3Deployer": {
"address": "0x6513Aedb4D1593BA12e50644401D976aebDc90d8",
"deployer": "0x6f24A47Fc8AE5441Eb47EFfC3665e70e69Ac3F05",
"deploymentMethod": "create2",
"codehash": "0xf0ad66defbe082df243d4d274e626f557f97579c5c9e19f33d8093d6160808b7",
"predeployCodehash": "0x73fc31262c4bad113c79439fd231281201c7c7d45b50328bd86bccf37684bf92",
"salt": "Create3Deployer"
}
},
"explorer": {
"url": "https://sepolia.arbiscan.io",
"api": "https://api-sepolia.arbiscan.io/api"
}
},
"centrifuge": {
"name": "Centrifuge",
"id": "centrifuge-2",
"chainId": 2090,
"rpc": "https://node-7118620155331796992.gx.onfinality.io/rpc?apikey=00538f2d-6297-44e3-8812-4b9d579524b2",
"tokenSymbol": "CFG",
"confirmations": 1,
"contracts": {
"ConstAddressDeployer": {
"address": "0x98B2920D53612483F91F12Ed7754E51b4A77919e",
"deployer": "0xE86375704CDb8491a5Ed82D90DceCE02Ee0ac25F",
"deploymentMethod": "create",
"codehash": "0x8fda47a596dfba923270da84e0c32a2d0312f1c03389f83e16f2b5a35ed37fbe",
"predeployCodehash": "0x8fda47a596dfba923270da84e0c32a2d0312f1c03389f83e16f2b5a35ed37fbe"
},
"Create3Deployer": {
"address": "0x6513Aedb4D1593BA12e50644401D976aebDc90d8",
"deployer": "0x6f24A47Fc8AE5441Eb47EFfC3665e70e69Ac3F05",
"deploymentMethod": "create2",
"codehash": "0xf0ad66defbe082df243d4d274e626f557f97579c5c9e19f33d8093d6160808b7",
"predeployCodehash": "0x73fc31262c4bad113c79439fd231281201c7c7d45b50328bd86bccf37684bf92",
"salt": "Create3Deployer"
}
}
}
},
"axelar": {
Expand Down
6 changes: 5 additions & 1 deletion axelar-chains-config/info/testnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@
"refundIssuer": "0x4f671f34d2d23fec3eE3087E3A0221f8D314D9dF"
},
"ConstAddressDeployer": {
"address": "0x98B2920D53612483F91F12Ed7754E51b4A77919e"
"address": "0x98B2920D53612483F91F12Ed7754E51b4A77919e",
"deployer": "0xE86375704CDb8491a5Ed82D90DceCE02Ee0ac25F",
"deploymentMethod": "create",
"codehash": "0x8fda47a596dfba923270da84e0c32a2d0312f1c03389f83e16f2b5a35ed37fbe",
"predeployCodehash": "0x8fda47a596dfba923270da84e0c32a2d0312f1c03389f83e16f2b5a35ed37fbe"
},
"Create3Deployer": {
"salt": "Create3Deployer",
Expand Down
8 changes: 7 additions & 1 deletion evm/deploy-contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,13 @@ async function processCommand(config, chain, options) {
const existingAddress = config.chains.ethereum?.contracts?.[contractName]?.address;

if (existingAddress !== undefined && predictedAddress !== existingAddress) {
printWarn(`Predicted address ${predictedAddress} does not match existing deployment ${existingAddress} on chain ${chain.name}.`);
printWarn(`Predicted address ${predictedAddress} does not match existing deployment ${existingAddress} on chain ${config.chains.ethereum.name}.`);

const existingCodeHash = config.chains.ethereum.contracts[contractName].predeployCodehash;
if (predeployCodehash !== existingCodeHash) {
printWarn(`Pre-deploy bytecode hash ${predeployCodehash} does not match existing deployment's predeployCodehash ${existingCodeHash} on chain ${config.chains.ethereum.name}.`);
}

printWarn('For official deployment, recheck the deployer, salt, args, or contract bytecode.');
}

Expand Down
3 changes: 2 additions & 1 deletion evm/sign-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,11 @@ const signTransaction = async (wallet, chain, tx, options = {}) => {

const sendTransaction = async (tx, provider, confirmations = undefined) => {
const response = await provider.sendTransaction(tx);
const receipt = await response.wait(confirmations);

printInfo('Broadcasted tx', response.hash);

const receipt = await response.wait(confirmations);

return { response, receipt };
};

Expand Down
2 changes: 2 additions & 0 deletions evm/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,8 @@ const mainProcessor = async (options, processCommand, save = true, catchErr = fa
throw new Error('Chain names were not provided');
}

printInfo('Environment', options.env);

const config = loadConfig(options.env);
let chains = options.chainName ? [options.chainName] : options.chainNames.split(',').map((str) => str.trim());
const chainsToSkip = (options.skipChains || '').split(',').map((str) => str.trim());
Expand Down

0 comments on commit d6498ae

Please sign in to comment.