Documentation ¶
Index ¶
Constants ¶
const ( // module name ModuleName = "mapping" // StoreKey is the default store key for guardian MapinfoStoreKey = ModuleName VerifyStoreKey = ModuleName + "verify" // RouterKey is the message route for guardian RouterKey = ModuleName // QuerierRoute is the querier route for the guardian store. QuerierRoute = MapinfoStoreKey )
const ( TypeMsgRegister = "register" TypeMsgMapVerify = "verify" )
const ( QueryInfoByErc = "queryInfoByErc" // QueryFeed QueryInfoByCC = "queryInfoByCC" )
const ( MappingWaitVerify int = iota MappingVerifyFailed // 注册并且verify失败 MappingVerifyPassed // 注册并且verify成功 MappingOutline // 超过了verify的时间,注册已经无效 )
const (
DefaultParamspace = ModuleName
)
Default parameter namespace
Variables ¶
var ( // key for constant fee parameter RefreshPoint = []byte("RefreshPoint") WaitVerifyTimeout = []byte("WaitVerifyTimeout") )
var ModuleCdc = codec.New()
ModuleCdc defines the codec to be used by evm module
Functions ¶
func MapedKey ¶
func MapedKey(info MappingInfo) []byte
func RegisterCodec ¶
RegisterCodec registers concrete types and interfaces on the given codec.
Types ¶
type CodeType ¶
const ( DefaultCodespace sdk.CodespaceType = ModuleName CodeInvalidInput CodeType = 101 CodeInvalidAddress CodeType = sdk.CodeInvalidAddress CodeInternal CodeType = sdk.CodeInternal CodeUnknownRequest CodeType = sdk.CodeUnknownRequest )
type MappingInfo ¶
type MsgMapVerify ¶
type MsgMapVerify struct { ErcAddr string `json:"erc_addr"` // 用户的ERC20地址 CCAddr string `json:"cross_addr"` // cross chain address to binding }
func NewMsgMapVerify ¶
func NewMsgMapVerify(ercAddr string, ccAddr string) *MsgMapVerify
func (MsgMapVerify) GetMsgs ¶
func (msg MsgMapVerify) GetMsgs() []sdk.Msg
GetMsgs returns a single MsgSetAccName as an sdk.Msg.
func (MsgMapVerify) GetSignBytes ¶
func (msg MsgMapVerify) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgMapVerify) GetSigners ¶
func (msg MsgMapVerify) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgMapVerify) Route ¶
func (msg MsgMapVerify) Route() string
Route should return the name of the module
func (MsgMapVerify) ValidateBasic ¶
func (msg MsgMapVerify) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type MsgRegister ¶
type MsgRegister struct { Sender string `json:"sender"` ErcAddr string `json:"erc_addr"` // 用户的ERC20地址 CCAddr string `json:"cross_addr"` // cross chain address to binding }
func NewMsgRegister ¶
func NewMsgRegister(sender string, ercAddr string, ccAddr string) *MsgRegister
func (MsgRegister) GetMsgs ¶
func (msg MsgRegister) GetMsgs() []sdk.Msg
GetMsgs returns a single MsgSetAccName as an sdk.Msg.
func (MsgRegister) GetSignBytes ¶
func (msg MsgRegister) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgRegister) GetSigners ¶
func (msg MsgRegister) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (MsgRegister) Route ¶
func (msg MsgRegister) Route() string
Route should return the name of the module
func (MsgRegister) ValidateBasic ¶
func (msg MsgRegister) ValidateBasic() sdk.Error
ValidateBasic runs stateless checks on the message
type QueryInfoByCCParams ¶
type QueryInfoByCCParams struct {
CCAddr string
}
QueryInfoByCCParams defines the params to query map info by crossnode addr.
type QueryInfoByErcParams ¶
type QueryInfoByErcParams struct {
ErcAddr string
}
QueryInfoByErcParams defines the params to query map info by oin erc20 addr.
type QueryInfoResponse ¶
type QueryInfoResponse struct { Found bool `json:"found"` ErcAddr string `json:"ercAddress"` CCAddr string `json:"ccAddress"` RegisterBlock uint64 `json:"registerBlock"` Balance uint64 `json:"balance"` Status int `json:"status"` }
func (QueryInfoResponse) String ¶
func (q QueryInfoResponse) String() string