Cannot depoly contract when content is large

We using https://www.sway-playground.org/ to deploy contract.
Recently, new features have been added to our game. When the number of lines of our contract code exceeds 3350, it cannot be deployed and the error is reported as follows.

Compiled with forc 0.63.1
9/14/2024, 12:44:50 PM
Deploying contract...
9/14/2024, 12:45:18 PM
Deployment failed: FuelError: Invalid transaction data: Validity(TransactionSizeLimitExceeded)

We tried modifying the code to line 3300, but it still didn’t work. I still reported this error.

After deleting 2 small functions, the number of lines of code is around 3260 and can be deployed.

In case you run into this again:
https://rust.fuel.network/v0.66.4/deploying/large_contracts.html

1 Like