github.com/okex/exchain@v1.8.0/libs/tendermint/abci/types/tx.go (about) 1 package types 2 3 import "math/big" 4 5 type TxEssentials interface { 6 GetRaw() []byte 7 TxHash() []byte 8 GetEthAddr() string 9 GetNonce() uint64 10 GetGasPrice() *big.Int 11 } 12 13 type MockTx struct { 14 Raw []byte 15 Hash []byte 16 From string 17 Nonce uint64 18 GasPrice *big.Int 19 } 20 21 func (tx MockTx) GetRaw() []byte { 22 return tx.Raw 23 } 24 25 func (tx MockTx) TxHash() []byte { 26 return tx.Hash 27 } 28 29 func (tx MockTx) GetEthAddr() string { 30 return tx.From 31 } 32 33 func (tx MockTx) GetNonce() uint64 { 34 return tx.Nonce 35 } 36 37 func (tx MockTx) GetGasPrice() *big.Int { 38 return tx.GasPrice 39 }