According to the following reported issue:
https://www.xdc.dev/ncode/multicall3-not-working-1p2a
And the discussion at:
https://github.com/mds1/multicall/issues/278
This contract is crucial to get supported on XDC mainnet and testnet due to the its popularity among smart contract devs and tooling like viem.sh.
Multicall3 smart contract should be deployed with one of the following ways:
1- Deploying unofficially:
This does not support the default 0xcA11bde05977b3631167028862bE2a173976CA11
address. it'll be changed and considered as unofficial deployment.
** UPDATED:
Here you can find the individual deployments:
Apothem:
https://apothem.xdcscan.io/address/0xD4449Bf3f8E6a1b3fb5224F4e1Ec4288BD765547
Mainnet: https://xdcscan.io/address/0x0B1795ccA8E4eC4df02346a082df54D437F8D9aF
2- Deploying officially as pre-compile contract:
This requires the XDC protocol team to locate and deploy it as a pre-deploy contract on the XDPOS repo.
Arbitrum has done the deployment as pre-compile:
https://arbiscan.io/tx/0x211f6689adbb0f3fba7392e899d23bde029cef532cbd0ae900920cc09f7d1f32
The successful scenario should affect the below mentioned files on viem.sh:
https://github.com/wevm/viem/blob/main/src/chains/definitions/xdcTestnet.ts#L21
https://github.com/wevm/viem/blob/main/src/chains/definitions/xdc.ts#L25
and override viem/chain like this:
{
...xdcTestnet, // and ** xdc ** for mainnet
contracts: {
multicall3: {
address: '<Multicall_ADDRESS>',
},
},
},
Leave a comment if there is any other solution in your head.
Discussion (6)
xdcscan.io/address/0x0B1795ccA8E4e...
I think this should move forward fast.
The fastest one is option 1. and Making a PR on Viem.sh.