Documentation ¶
Index ¶
- Constants
- func DecodeToken(token string) string
- func EncodeToken(token string) string
- func WithdrawValue(tx ETGateWithdrawTx) ([]byte, error)
- type Contract
- type Deposit
- type ETGateDepositTx
- type ETGatePlugin
- func (gp *ETGatePlugin) BeginBlock(store types.KVStore, hash []byte, header *abci.Header)
- func (gp *ETGatePlugin) EndBlock(store types.KVStore, height uint64) (res abci.ResponseEndBlock)
- func (gp *ETGatePlugin) InitChain(store types.KVStore, vals []*abci.Validator)
- func (gp *ETGatePlugin) Name() string
- func (gp *ETGatePlugin) RunTx(store types.KVStore, ctx types.CallContext, txBytes []byte) abci.Result
- func (gp *ETGatePlugin) SetOption(store types.KVStore, key string, value string) (log string)
- type ETGatePluginState
- type ETGateStateMachine
- type ETGateTx
- type ETGateUpdateChainTx
- type ETGateWithdrawTx
- type Header
- type LogProof
Constants ¶
View Source
const ( ETGateTxTypeUpdateChain = byte(0x01) //ETGateTxTypeRegisterContract = byte(0x02) ETGateTxTypeWithdraw = byte(0x03) ETGateTxTypeDeposit = byte(0x04) ETGateCodeConflictingChain = abci.CodeType(1001) ETGateCodeMissingAncestor = abci.CodeType(1002) ETGateCodeExistingHeader = abci.CodeType(1003) ETGateCodeInvalidHeader = abci.CodeType(1004) ETGateCodeInvalidLogProof = abci.CodeType(1005) ETGateCodeLogHeaderNotFound = abci.CodeType(1006) ETGateCodeDepositAlreadyExists = abci.CodeType(1007) ETGateCodeLogUnpackingError = abci.CodeType(1008) ETGateCodeInvalidEventName = abci.CodeType(1009) ETGateCodeAlreadyWithdrawn = abci.CodeType(1010) ETGateCodeInvalidCoins = abci.CodeType(1011) ETGateCodeInvalidSequence = abci.CodeType(1012) )
Variables ¶
This section is empty.
Functions ¶
func DecodeToken ¶
func EncodeToken ¶
func WithdrawValue ¶
func WithdrawValue(tx ETGateWithdrawTx) ([]byte, error)
Types ¶
type ETGateDepositTx ¶
type ETGateDepositTx struct {
Proof LogProof
}
type ETGateRegisterContractTx struct { Contract }
func (tx ETGateRegisterContractTx) Validate() abci.Result { codemap := GetCodemap() if _, exists := codemap[tx.Code]; !exists { return abci.ErrInternalError.AppendLog(cmn.Fmt("Invalid code")) } return abci.OK }
func (ETGateDepositTx) Validate ¶
func (tx ETGateDepositTx) Validate() abci.Result
type ETGatePlugin ¶
type ETGatePlugin struct { }
func New ¶
func New() *ETGatePlugin
func (*ETGatePlugin) BeginBlock ¶
func (*ETGatePlugin) EndBlock ¶
func (gp *ETGatePlugin) EndBlock(store types.KVStore, height uint64) (res abci.ResponseEndBlock)
func (*ETGatePlugin) InitChain ¶
func (gp *ETGatePlugin) InitChain(store types.KVStore, vals []*abci.Validator)
func (*ETGatePlugin) Name ¶
func (gp *ETGatePlugin) Name() string
func (*ETGatePlugin) RunTx ¶
func (gp *ETGatePlugin) RunTx(store types.KVStore, ctx types.CallContext, txBytes []byte) abci.Result
type ETGatePluginState ¶
type ETGatePluginState struct { }
type ETGateStateMachine ¶
type ETGateStateMachine struct {
// contains filtered or unexported fields
}
type ETGateUpdateChainTx ¶
type ETGateUpdateChainTx struct {
Headers [][]byte
}
func (ETGateUpdateChainTx) Validate ¶
func (tx ETGateUpdateChainTx) Validate() abci.Result
type ETGateWithdrawTx ¶
type ETGateWithdrawTx struct { Height uint To [20]byte Value uint64 Token string ChainID string Sequence uint64 }
func (ETGateWithdrawTx) Validate ¶
func (tx ETGateWithdrawTx) Validate() abci.Result
Click to show internal directories.
Click to hide internal directories.