diff --git a/packages/currency/src/native.ts b/packages/currency/src/native.ts index 407d903d8a..be240b3060 100644 --- a/packages/currency/src/native.ts +++ b/packages/currency/src/native.ts @@ -111,6 +111,12 @@ export const nativeCurrencies: Record = { bsc: { chainId: 56, name: 'bsc' }, optimism: { chainId: 10, name: 'optimism' }, moonbeam: { chainId: 1284, name: 'moonbeam' }, + tombchain: { chainId: 6969, name: 'tombchain' }, }; /** diff --git a/packages/smart-contracts/hardhat.config.ts b/packages/smart-contracts/hardhat.config.ts index 2adcbf2bbf..e02716a455 100644 --- a/packages/smart-contracts/hardhat.config.ts +++ b/packages/smart-contracts/hardhat.config.ts @@ -135,6 +135,11 @@ export default { chainId: 1284, accounts, }, + tombchain: { + url: url('tombchain'), + chainId: 6969, + accounts, + }, }, etherscan: { apiKey: { diff --git a/packages/smart-contracts/scripts-create2/contract-setup/adminTasks.ts b/packages/smart-contracts/scripts-create2/contract-setup/adminTasks.ts index 9cd54929f8..f6445261eb 100644 --- a/packages/smart-contracts/scripts-create2/contract-setup/adminTasks.ts +++ b/packages/smart-contracts/scripts-create2/contract-setup/adminTasks.ts @@ -248,7 +248,13 @@ export const getSignerAndGasFees = async ( provider = utils.getDefaultProvider(network); } const signer = new hre.ethers.Wallet(hre.config.xdeploy.signer).connect(provider); - const txOverrides = await utils.estimateGasFees({ provider }); + + let txOverrides; + try { + txOverrides = await utils.estimateGasFees({ provider }); + } catch (err) { + txOverrides = {}; + } return { signer, diff --git a/packages/smart-contracts/scripts-create2/xdeployer.ts b/packages/smart-contracts/scripts-create2/xdeployer.ts index 26a0392afa..c8e8e00880 100644 --- a/packages/smart-contracts/scripts-create2/xdeployer.ts +++ b/packages/smart-contracts/scripts-create2/xdeployer.ts @@ -71,12 +71,15 @@ export const xdeploy = async ( let receipt = undefined; let deployed = false; let error = undefined; + let txOverrides: Overrides; - const txOverrides: Overrides = await utils.estimateGasFees({ provider }); try { + txOverrides = await utils.estimateGasFees({ provider }); const gasLimit = hre.config.xdeploy.gasLimit; txOverrides.gasLimit = gasLimit; } catch (e) { + // NOTE: On some networks utils.estimateGasFees do not work + txOverrides = {}; console.log('Cannot estimate gasLimit'); } diff --git a/packages/smart-contracts/src/lib/artifacts/ERC20FeeProxy/index.ts b/packages/smart-contracts/src/lib/artifacts/ERC20FeeProxy/index.ts index 29b7f5ed61..8ad42c2ccf 100644 --- a/packages/smart-contracts/src/lib/artifacts/ERC20FeeProxy/index.ts +++ b/packages/smart-contracts/src/lib/artifacts/ERC20FeeProxy/index.ts @@ -131,6 +131,10 @@ export const erc20FeeProxyArtifact = new ContractArtifact( address: '0x399F5EE127ce7432E4921a61b8CF52b0af52cbfE', creationBlockNumber: 2415492, }, + tombchain: { + address: '0x399F5EE127ce7432E4921a61b8CF52b0af52cbfE', + creationBlockNumber: 2951048, + }, }, }, // Additional deployments of same versions, not worth upgrading the version number but worth using within next versions diff --git a/packages/smart-contracts/src/lib/artifacts/EthereumFeeProxy/index.ts b/packages/smart-contracts/src/lib/artifacts/EthereumFeeProxy/index.ts index 71e97cd5e5..7dedc8ed99 100644 --- a/packages/smart-contracts/src/lib/artifacts/EthereumFeeProxy/index.ts +++ b/packages/smart-contracts/src/lib/artifacts/EthereumFeeProxy/index.ts @@ -118,6 +118,10 @@ export const ethereumFeeProxyArtifact = new ContractArtifact( address: '0xe11BF2fDA23bF0A98365e1A4c04A87C9339e8687', creationBlockNumber: 2415490, }, + tombchain: { + address: '0xe11BF2fDA23bF0A98365e1A4c04A87C9339e8687', + creationBlockNumber: 2951047, + }, }, }, }, diff --git a/packages/smart-contracts/src/lib/artifacts/RequestDeployer/index.ts b/packages/smart-contracts/src/lib/artifacts/RequestDeployer/index.ts index 07ee300a7f..1269c6abe5 100644 --- a/packages/smart-contracts/src/lib/artifacts/RequestDeployer/index.ts +++ b/packages/smart-contracts/src/lib/artifacts/RequestDeployer/index.ts @@ -69,6 +69,10 @@ export const requestDeployer = new ContractArtifact( address: '0xE99Ab70a5FAE59551544FA326fA048f7B95A24B2', creationBlockNumber: 2415122, }, + tombchain: { + address: '0xE99Ab70a5FAE59551544FA326fA048f7B95A24B2', + creationBlockNumber: 2950756, + }, }, }, }, diff --git a/packages/utils/src/providers.ts b/packages/utils/src/providers.ts index 6eb2b3fa1b..13cdc1046b 100644 --- a/packages/utils/src/providers.ts +++ b/packages/utils/src/providers.ts @@ -43,6 +43,7 @@ const networkRpcs: Record = { avalanche: 'https://api.avax.network/ext/bc/C/rpc', optimism: 'https://mainnet.optimism.io', moonbeam: 'https://moonbeam.public.blastapi.io', + tombchain: 'https://rpc.tombchain.com/', }; /**