Documentation ¶
Index ¶
- Constants
- func Decode(b []byte) (types.Tx, types.Error)
- func ErrFailTransfer(codespace types.CodespaceType, msg string) types.Error
- func ErrInvalidCall(codespace types.CodespaceType, msg string) types.Error
- func ErrInvalidDeploy(codespace types.CodespaceType, msg string) types.Error
- func ErrInvalidTransfer(codespace types.CodespaceType, msg string) types.Error
- func ErrInvalidTx(codespace types.CodespaceType, msg string) types.Error
- func GetNonceByAddress(addr common.Address) (uint64, error)
- type CommonTx
- type ContractCallTx
- type ContractDeployTx
- type Transaction
- type TransferTx
- type TxIndexMapper
Constants ¶
View Source
const ( DefaultCodespace types.CodespaceType = "2" CodeInvalidTx types.CodeType = 101 CodeInvalidTransfer types.CodeType = 102 CodeFailTransfer types.CodeType = 103 CodeInvalidDeploy types.CodeType = 104 CodeInvalidCall types.CodeType = 105 )
Bank errors reserve 100 ~ 199.
View Source
const ( TRANSFER uint8 = 1 + iota CONTRACT_DEPLOY CONTRACT_CALL )
View Source
const (
ContractInitFunc = "init"
)
Variables ¶
This section is empty.
Functions ¶
func ErrFailTransfer ¶
func ErrFailTransfer(codespace types.CodespaceType, msg string) types.Error
func ErrInvalidCall ¶
func ErrInvalidCall(codespace types.CodespaceType, msg string) types.Error
func ErrInvalidDeploy ¶
func ErrInvalidDeploy(codespace types.CodespaceType, msg string) types.Error
func ErrInvalidTransfer ¶
func ErrInvalidTransfer(codespace types.CodespaceType, msg string) types.Error
func ErrInvalidTx ¶
func ErrInvalidTx(codespace types.CodespaceType, msg string) types.Error
Types ¶
type ContractCallTx ¶
type ContractCallTx struct { Address common.Address Func string // function name Args [][]byte RWSetsHash []byte CommonTx }
func (*ContractCallTx) Bytes ¶
func (tx *ContractCallTx) Bytes() []byte
func (*ContractCallTx) Decode ¶
func (tx *ContractCallTx) Decode(b []byte) error
func (*ContractCallTx) GetSignBytes ¶
func (tx *ContractCallTx) GetSignBytes() []byte
func (*ContractCallTx) ValidateBasic ¶
func (tx *ContractCallTx) ValidateBasic() types.Error
type ContractDeployTx ¶
func (*ContractDeployTx) Bytes ¶
func (tx *ContractDeployTx) Bytes() []byte
func (*ContractDeployTx) Decode ¶
func (tx *ContractDeployTx) Decode(b []byte) error
func (*ContractDeployTx) GetSignBytes ¶
func (tx *ContractDeployTx) GetSignBytes() []byte
func (*ContractDeployTx) ValidateBasic ¶
func (tx *ContractDeployTx) ValidateBasic() types.Error
type Transaction ¶
type TransferTx ¶
func (*TransferTx) Bytes ¶
func (tx *TransferTx) Bytes() []byte
func (*TransferTx) Decode ¶
func (tx *TransferTx) Decode(b []byte) error
func (*TransferTx) GetSignBytes ¶
func (tx *TransferTx) GetSignBytes() []byte
func (*TransferTx) ValidateBasic ¶
func (tx *TransferTx) ValidateBasic() types.Error
type TxIndexMapper ¶
func NewTxIndexMapper ¶
func NewTxIndexMapper(k types.StoreKey) TxIndexMapper
Click to show internal directories.
Click to hide internal directories.