Skip to content

Commit 13a640d

Browse files
Merge pull request #220 from BitGo/WIN-5558-eth-change
chore: add verify contract script
2 parents fd89a04 + c408e44 commit 13a640d

File tree

3 files changed

+41
-3
lines changed

3 files changed

+41
-3
lines changed

hardhat.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ const config: HardhatUserConfig = {
603603
network: 'worldTestnet',
604604
chainId: 4801,
605605
urls: {
606-
apiURL: 'https://worldchain-sepolia.gateway.tenderly.co',
606+
apiURL: 'https://api-sepolia.worldscan.org/api',
607607
browserURL: 'https://sepolia.worldscan.org/'
608608
}
609609
},

scripts/deploy.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ async function main() {
3939
deployForwarderContracts = false;
4040
const [deployer] = await ethers.getSigners();
4141
const txCount = await deployer.getTransactionCount();
42-
4342
if (txCount === 1 || txCount === 3) {
4443
throw Error('Cannot deploy contracts, please update the script');
4544
}
@@ -183,6 +182,12 @@ async function main() {
183182
case 1868:
184183
//Somnia
185184
case 50312:
185+
eip1559GasParams.gasLimit = 5000000;
186+
walletImplementationContractName = 'WalletSimple';
187+
forwarderContractName = 'ForwarderV4';
188+
forwarderFactoryContractName = 'ForwarderFactoryV4';
189+
contractPath = `contracts/${walletImplementationContractName}.sol:${walletImplementationContractName}`;
190+
break;
186191
//Songbird
187192
case 19:
188193
case 16:
@@ -245,6 +250,8 @@ async function main() {
245250
console.log('⛽ Gas params:', gasParams);
246251
const balance = await deployer.getBalance();
247252
console.log('💰 Balance:', ethers.utils.formatEther(balance), 'ETH');
253+
const address = await deployer.getAddress();
254+
console.log(' Address:', address);
248255
const walletSimple = await WalletSimple.deploy(gasParams);
249256
console.log('📤 TX hash:', walletSimple.deployTransaction.hash);
250257
console.log('⏳ Waiting for confirmation...');

scripts/deployBatcherContract.ts

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,17 @@ async function main() {
2424
contractName,
2525
batcherDeployer
2626
);
27-
27+
const address = await batcherDeployer.getAddress();
28+
console.log(' Address:', address);
2829
let gasParams: Overrides | undefined = undefined;
2930

3031
const chainId = await signers[0].getChainId();
3132
switch (chainId) {
33+
//Monad
34+
case 10143:
35+
//World
36+
case 480:
37+
case 4801:
3238
//Soneium
3339
case 1946:
3440
case 1868:
@@ -50,6 +56,23 @@ async function main() {
5056
gasLimit: BigNumber.from('3000000')
5157
};
5258
break;
59+
//Somnia
60+
case 50312:
61+
const feeDataSomnia = await ethers.provider.getFeeData();
62+
gasParams = {
63+
maxFeePerGas: (feeDataSomnia.maxFeePerGas?.lt(
64+
feeDataSomnia.gasPrice as BigNumber
65+
)
66+
? feeDataSomnia.gasPrice
67+
: feeDataSomnia.maxFeePerGas) as BigNumberish,
68+
maxPriorityFeePerGas: (feeDataSomnia.maxFeePerGas?.lt(
69+
feeDataSomnia.gasPrice as BigNumber
70+
)
71+
? feeDataSomnia.gasPrice
72+
: feeDataSomnia.maxPriorityFeePerGas) as BigNumberish,
73+
gasLimit: BigNumber.from('5000000')
74+
};
75+
break;
5376
}
5477

5578
let batcher = null;
@@ -94,6 +117,14 @@ async function verifyContract(
94117
constructorArguments: [string, number, number],
95118
contract?: string
96119
) {
120+
console.log(
121+
'contractName: ' +
122+
contractName +
123+
'contractAddress: ' +
124+
contractAddress +
125+
'constructorArguments: ' +
126+
constructorArguments
127+
);
97128
try {
98129
const verifyContractArgs: {
99130
address: string;

0 commit comments

Comments
 (0)