2019-09-15 16:12:59 +00:00
|
|
|
package types
|
|
|
|
|
|
|
|
import (
|
2021-01-06 20:56:40 +00:00
|
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
2019-09-15 16:12:59 +00:00
|
|
|
)
|
|
|
|
|
2021-01-06 20:56:40 +00:00
|
|
|
// Recipient is a wrapper of the
|
|
|
|
type Recipient struct {
|
|
|
|
Address string
|
2020-04-23 15:49:25 +00:00
|
|
|
}
|
|
|
|
|
2021-01-06 20:56:40 +00:00
|
|
|
// TxData implements the Ethereum transaction data structure. It is used
|
2019-09-15 16:12:59 +00:00
|
|
|
// solely as intended in Ethereum abiding by the protocol.
|
2021-01-06 20:56:40 +00:00
|
|
|
type TxData struct {
|
|
|
|
AccountNonce uint64 `json:"nonce"`
|
|
|
|
Price sdk.Int `json:"gasPrice"`
|
|
|
|
GasLimit uint64 `json:"gas"`
|
|
|
|
Recipient *Recipient `json:"to" rlp:"nil"` // nil means contract creation
|
|
|
|
Amount sdk.Int `json:"value"`
|
|
|
|
Payload []byte `json:"input"`
|
2019-09-15 16:12:59 +00:00
|
|
|
|
|
|
|
// signature values
|
2021-01-06 20:56:40 +00:00
|
|
|
V []byte `json:"v"`
|
|
|
|
R []byte `json:"r"`
|
|
|
|
S []byte `json:"s"`
|
2019-09-15 16:12:59 +00:00
|
|
|
|
|
|
|
// hash is only used when marshaling to JSON
|
2021-01-06 20:56:40 +00:00
|
|
|
Hash string `json:"hash" rlp:"-"`
|
2019-09-15 16:12:59 +00:00
|
|
|
}
|