Contents of external messages
src— the external address of the sender of the message.dest— the internal address of the contract that will receive the message.import_fee— the amount of Toncoin that the contract will pay for this message.
body field are signed.
The import_fee field will be overwritten by validators processing the messages with a predetermined price, based on a number of cells and bits in the message.
Deploying via external message
A contract can be deployed via an external message only if the newly deployed contract will accept that message after its creation. As usual, the address of the contract must match the hash of theStateInit.
Accepting message
Incoming external messages are sent to the contract from outside the blockchain, so the sender can’t pay for them, and these messages must be paid by the contract that receives them. However, if the contract paid for all incoming external messages it received, it would drain its balance. This is why thegas_credit parameter exists. It defines how much gas the contract can consume without paying for it, giving the contract a chance to decide whether it wants to accept the message and pay for it. A contract can’t modify its state without accepting the message. If a contract accepts a message, it will pay for all gas consumed, even the gas that was previously deducted from gas_credit. Accepting a message can be done using the ACCEPT TVM instruction, or via the SETGASLIMIT instruction with an argument greater than or equal to 263-1.