ton-org / blueprint

TON development for professionals - all-in-one tool for writing, testing and deploying smart contracts
456 stars 90 forks source link

Error in deploying large contracts with TonConnect #53

Open behrang opened 1 year ago

behrang commented 1 year ago

I have a large contract, which I should also pass the code of two child contracts to it on deployment. When I try to deploy it using TonConnect option, in TonKeeper I get a weird error, and deployment fails.

After more investigation, it looks like that when the total size of deployment is more than a certain limit, this error happens. I checked it by removing the code for one of the child contracts in the deployment and it was successfully deployed (although the result was the contract in an incorrect state).

I tried the mnemonic option and it was successfully deployed the big contract with two child contracts.

krigga commented 1 year ago

So when you deployed a large contract using a mnemonic, was it using the exact same parameters as the ton connect option (and failed with ton connect) and succeeded this time? Is that correct?

behrang commented 1 year ago

Yes it was the same.

I'm not sure it's related to the bug or not, but when the base64 encoded message displayed in terminal before deploying fit the screen, it was successful with TonConnect, but when it didn't fit, and at the end of the base64 encoded message showd a message like '... 2500 more characters', it didn't work.

behrang commented 1 year ago

In case you needed to see the size of code and data of the problematic deployment, I've deployed my contract on testnet at this address: kQBfaiRXxnwuDxP0YkvK9H8Zd0W4uVgkhDZ8EAmbWko-6S6Z.