laconicd/x/evm/types/tx_data.go
Federico Kunze 9cbb4dcf6d
stargate: migrate types (#670)
* changelog v0.4.0

* stargate: types changes

* msg and handler changes

* validation

* fixes

* more fixes

* more test fixes

* changelog

* changelog

* lint

* rm comment

* lint

* redundant if condition
2021-01-06 17:56:40 -03:00

30 lines
746 B
Go

package types
import (
sdk "github.com/cosmos/cosmos-sdk/types"
)
// Recipient is a wrapper of the
type Recipient struct {
Address string
}
// TxData implements the Ethereum transaction data structure. It is used
// solely as intended in Ethereum abiding by the protocol.
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"`
// signature values
V []byte `json:"v"`
R []byte `json:"r"`
S []byte `json:"s"`
// hash is only used when marshaling to JSON
Hash string `json:"hash" rlp:"-"`
}