2021-02-08 08:10:25 +00:00
|
|
|
package ledger
|
|
|
|
|
|
|
|
import "github.com/nspcc-dev/neo-go/pkg/interop"
|
|
|
|
|
|
|
|
// Transaction represents a NEO transaction. It's similar to Transaction class
|
|
|
|
// in Neo .net framework.
|
|
|
|
type Transaction struct {
|
|
|
|
// Hash represents the hash (256 bit BE value in a 32 byte slice) of the
|
|
|
|
// given transaction (which also is its ID).
|
|
|
|
Hash interop.Hash256
|
|
|
|
// Version represents the transaction version.
|
|
|
|
Version int
|
|
|
|
// Nonce is a random number to avoid hash collision.
|
|
|
|
Nonce int
|
|
|
|
// Sender represents the sender (160 bit BE value in a 20 byte slice) of the
|
|
|
|
// given Transaction.
|
|
|
|
Sender interop.Hash160
|
2022-04-20 18:30:09 +00:00
|
|
|
// SysFee represents the fee to be burned.
|
2021-02-08 08:10:25 +00:00
|
|
|
SysFee int
|
2022-04-20 18:30:09 +00:00
|
|
|
// NetFee represents the fee to be distributed to consensus nodes.
|
2021-02-08 08:10:25 +00:00
|
|
|
NetFee int
|
|
|
|
// ValidUntilBlock is the maximum blockchain height exceeding which
|
2022-04-20 18:30:09 +00:00
|
|
|
// a transaction should fail verification.
|
2021-02-08 08:10:25 +00:00
|
|
|
ValidUntilBlock int
|
2022-04-20 18:30:09 +00:00
|
|
|
// Script represents a code to run in NeoVM for this transaction.
|
2021-02-08 08:10:25 +00:00
|
|
|
Script []byte
|
|
|
|
}
|