How does the deployment of the contract take place in TON?
For example, contract A sent contract B a message with a state init and body, if the hash from state init matches the address of B, then the contract code from state init will simply be executed with the received message body?
Dec 25, 2023, 12:30 PM
And what happens if hash of this state_init doesnt matches the address of B?
Dec 25, 2023, 12:32 PM
Yeah, mostly.
First, contract will be deployed (if it's not already deployed). That means that code and data are deployed from the state_init.
Then the message will be delivered to the contract.
First, contract will be deployed (if it's not already deployed). That means that code and data are deployed from the state_init.
Then the message will be delivered to the contract.
The transaction will fail.
Dec 25, 2023, 12:37 PM
Requires testing, in particular regarding frozen contracts.
Dec 25, 2023, 1:52 PM