Skip to content

[Bug]: When trying to deploy the ICTT contracts following the guide i get the error: max code size exceeded #2667

@PietroFaggion

Description

@PietroFaggion

Describe the bug
Following the guide at the link

https://build.avax.network/academy/interchain-token-transfer/06-erc-20-to-erc-20-bridge/06-deploy-with-avalanche-cli

when i execute the command avalanche ictt deploy after indicating the address of the ERC20 (this ERC20 was deployed through Avalanche cli) which needs the new Home Token i get the max code size exceeded error.
I've tried to deploy a L1 with a 120KB max code size (setting it in the genesis file) but it didn't change anything. I've tried to look for the error in the repositories of avalanche-cli, avalanchego and subnet-evm and what i'm supposing is that where you do the checks you're taking the max contract size from somewhere hardcoded and not dynamically based on the genesis file of the specific VM causing this issue.
Anyway us users do not have any control regarding what is being deployed so it must be an issue on coding side.

To Reproduce
Simply trying to deploy the ictt contracts through the avalanche cli commands

Expected behavior
It should deploy, as of the guide above, the ictt contracts on my L1

Screenshots
If applicable, add screenshots to help explain your problem.

Logs
avalanche ictt deploy
✔ Fuji Testnet
✔ C-Chain
Home RPC Endpoint: api.avax-test.network/ext/bc/C/rpc
✔ Deploy a new Home for the token
✔ Enter the address of the ERC-20 Token: 0x07a390823B43369e85b3f81c1387fF1697dd1f8e
✔ Get private key from an existing stored key (created from avalanche key create or avalanche key import)
✔ avafuji
✔ Blockchain ispcktest3
Which is the RPC endpoint for ispcktest3: 127.0.0.1:9650/ext/bc/FCh52jnNELXiZaMGBmBmCX4rqgYTeUNx5J2tB4vereQpKHSkU/rpc
Remote RPC Endpoint: 127.0.0.1:9650/ext/bc/FCh52jnNELXiZaMGBmBmCX4rqgYTeUNx5J2tB4vereQpKHSkU/rpc
✔ Use the private key of the Genesis Allocated address 0x63208f0f50Cd0FA10C1FB979c46Dc5740C096fFC
Downloading Avalanche ICTT Contracts
Compiling Avalanche ICTT Contracts
Error: max code size exceeded

Operating System
Linux

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Done 🎉

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions