spacemeshos / svm

SVM - Spacemesh Virtual Machine
https://spacemesh.io
MIT License
85 stars 14 forks source link

Funding an `Account` #487

Open YaronWittenstein opened 2 years ago

YaronWittenstein commented 2 years ago

One of the fields each Transaction should have is the amount field. (it's part of the Envelope). It could have been part of the Message, but I think that's the right decision to keep it in the Envelope. (the same holds for the Transaction Nonce field).

The amount records the number of coins to transfer from the Principal account to the Other Account. The interpretation of the Other Account depends on the Transaction type.

For Spawn Transaction - the Other Account will be the spawned account. For Call Transaction - the Other Account will be the target account specified in the Transaction Message.

Notes