Versions in this module Expand all Collapse all v0 v0.1.2 Feb 6, 2023 Changes in this version + const AXCAXCDecimals + const AXCContractAddr + const AXCContractDecimals + const BindChannel + const BindChannelID + const BindMsgType + const BindRelayFeeName + const CodeBindRequestExists + const CodeBindRequestNotExists + const CodeDeserializePackageFailed + const CodeFeeNotFound + const CodeInvalidAmount + const CodeInvalidClaim + const CodeInvalidContractAddress + const CodeInvalidDecimals + const CodeInvalidEthereumAddress + const CodeInvalidExpireTime + const CodeInvalidLength + const CodeInvalidMirror + const CodeInvalidMirrorSync + const CodeInvalidSymbol + const CodeMirrorSymbolExists + const CodeMirrorSyncInvalidSupply + const CodeNotBoundByMirror + const CodeScriptsExecutionError + const CodeTokenBindRelationChanged + const CodeTokenBound + const CodeTokenNotBound + const CodeTransferInExpire + const DefaultCodespace + const MaxSymbolLength + const MinBindExpireTimeGap + const MinTransferOutExpireTimeGap + const MirrorChannel + const MirrorChannelID + const MirrorErrCodeBEP2SymbolExists + const MirrorErrCodeDecimalOverflow + const MirrorErrCodeExpired + const MirrorErrCodeInvalidSupply + const MirrorErrCodeInvalidSymbol + const MirrorSyncChannel + const MirrorSyncChannelID + const MirrorSyncErrCodeExpired + const MirrorSyncErrInvalidSupply + const MirrorSyncErrNotBoundByMirror + const RouteBridge + const TagChannel + const TagMirrorContract + const TagMirrorErrorCode + const TagMirrorSupply + const TagMirrorSymbol + const TagRelayerFee + const TagSendSequence + const TransferInChannel + const TransferInChannelID + const TransferOutChannel + const TransferOutChannelID + const TransferOutMsgType + const TransferOutRelayFeeName + const UnbindMsgType + const UnbindRelayFeeName + var PegAccount = sdk.AccAddress(crypto.AddressHash([]byte("AximchainPegAccount"))) + func BytesToSymbol(symbolBytes [32]byte) string + func ConvertAXCAmountToBCAmount(contractDecimals int8, axcAmount sdk.Int) (int64, sdk.Error) + func ConvertAXCAmountToBCAmountBigInt(contractDecimals int8, axcAmount sdk.Int) (sdk.Int, sdk.Error) + func ConvertBCAmountToAXCAmount(contractDecimals int8, bcAmount int64) (sdk.Int, sdk.Error) + func ErrBindRequestExists(msg string) sdk.Error + func ErrBindRequestNotExists(msg string) sdk.Error + func ErrDeserializePackageFailed(msg string) sdk.Error + func ErrFeeNotFound(msg string) sdk.Error + func ErrInvalidAmount(msg string) sdk.Error + func ErrInvalidClaim(msg string) sdk.Error + func ErrInvalidContractAddress(msg string) sdk.Error + func ErrInvalidDecimals(msg string) sdk.Error + func ErrInvalidEthereumAddress(msg string) sdk.Error + func ErrInvalidExpireTime(msg string) sdk.Error + func ErrInvalidLength(msg string) sdk.Error + func ErrInvalidMirror(msg string) sdk.Error + func ErrInvalidMirrorSync(msg string) sdk.Error + func ErrInvalidSymbol(msg string) sdk.Error + func ErrMirrorSymbolExists(msg string) sdk.Error + func ErrMirrorSyncInvalidSupply(msg string) sdk.Error + func ErrNotBoundByMirror(msg string) sdk.Error + func ErrScriptsExecutionError(msg string) sdk.Error + func ErrTokenBindRelationChanged(msg string) sdk.Error + func ErrTokenBound(msg string) sdk.Error + func ErrTokenNotBound(msg string) sdk.Error + func ErrTransferInExpire(msg string) sdk.Error + func GenerateTransferInTags(receiverAddresses []sdk.AccAddress, symbol string, amounts []*big.Int, ...) sdk.Tags + func GetBindRequestKey(symbol string) []byte + func GetContractDecimalsKey(contractAddr []byte) []byte + func GetFee(feeName string) (sdk.Fee, sdk.Error) + func SymbolToBytes(symbol string) [32]byte + type ApproveBindAckPackage struct + TokenSymbol [32]byte + type ApproveBindSynPackage struct + Status BindStatus + TokenSymbol [32]byte + func DeserializeApproveBindSynPackage(serializedPackage []byte) (*ApproveBindSynPackage, sdk.Error) + type BindAckPackage struct + TokenSymbol [32]byte + type BindMsg struct + Amount int64 + ContractAddress sdk.SmartChainAddress + ContractDecimals int8 + ExpireTime int64 + From sdk.AccAddress + Symbol string + func NewBindMsg(from sdk.AccAddress, symbol string, amount int64, ...) BindMsg + func (msg BindMsg) GetInvolvedAddresses() []sdk.AccAddress + func (msg BindMsg) GetSignBytes() []byte + func (msg BindMsg) GetSigners() []sdk.AccAddress + func (msg BindMsg) Route() string + func (msg BindMsg) String() string + func (msg BindMsg) Type() string + func (msg BindMsg) ValidateBasic() sdk.Error + type BindPackageType uint8 + const BindTypeBind + const BindTypeUnbind + type BindRequest struct + Amount int64 + ContractAddress sdk.SmartChainAddress + ContractDecimals int8 + DeductedAmount int64 + ExpireTime int64 + From sdk.AccAddress + Symbol string + type BindStatus uint32 + const BindStatusInvalidParameter + const BindStatusRejected + const BindStatusSuccess + const BindStatusTimeout + func ParseBindStatus(input string) (BindStatus, error) + func (status BindStatus) String() string + type BindSynPackage struct + ContractAddr sdk.SmartChainAddress + Decimals uint8 + ExpireTime uint64 + PackageType BindPackageType + PeggyAmount *big.Int + TokenSymbol [32]byte + TotalSupply *big.Int + func DeserializeBindSynPackage(serializedPackage []byte) (*BindSynPackage, sdk.Error) + type MirrorAckPackage struct + BEP2Symbol [32]byte + ContractAddr sdk.SmartChainAddress + Decimals uint8 + ErrorCode uint8 + MirrorFee *big.Int + MirrorSender sdk.SmartChainAddress + type MirrorSynPackage struct + BEP20Decimals uint8 + BEP20Name [32]byte + BEP20Symbol [32]byte + BEP20TotalSupply *big.Int + ContractAddr sdk.SmartChainAddress + ExpireTime uint64 + MirrorFee *big.Int + MirrorSender sdk.SmartChainAddress + func DeserializeMirrorSynPackage(serializedPackage []byte) (*MirrorSynPackage, sdk.Error) + type MirrorSyncAckPackage struct + ContractAddr sdk.SmartChainAddress + ErrorCode uint8 + SyncFee *big.Int + SyncSender sdk.SmartChainAddress + type MirrorSyncSynPackage struct + BEP20TotalSupply *big.Int + BEP2Symbol [32]byte + ContractAddr sdk.SmartChainAddress + ExpireTime uint64 + SyncFee *big.Int + SyncSender sdk.SmartChainAddress + func DeserializeMirrorSyncSynPackage(serializedPackage []byte) (*MirrorSyncSynPackage, sdk.Error) + type RefundReason uint32 + const ForbidTransferToBPE12Addr + const InsufficientBalance + const Timeout + const UnboundToken + const Unknown + type TransferInRefundPackage struct + ContractAddr sdk.SmartChainAddress + RefundAddresses []sdk.SmartChainAddress + RefundAmounts []*big.Int + RefundReason RefundReason + type TransferInSynPackage struct + Amounts []*big.Int + ContractAddress sdk.SmartChainAddress + ExpireTime uint64 + ReceiverAddresses []sdk.AccAddress + RefundAddresses []sdk.SmartChainAddress + TokenSymbol [32]byte + func DeserializeTransferInSynPackage(serializedPackage []byte) (*TransferInSynPackage, sdk.Error) + type TransferOutMsg struct + Amount sdk.Coin + ExpireTime int64 + From sdk.AccAddress + To sdk.SmartChainAddress + func NewTransferOutMsg(from sdk.AccAddress, to sdk.SmartChainAddress, amount sdk.Coin, ...) TransferOutMsg + func (msg TransferOutMsg) GetInvolvedAddresses() []sdk.AccAddress + func (msg TransferOutMsg) GetSignBytes() []byte + func (msg TransferOutMsg) GetSigners() []sdk.AccAddress + func (msg TransferOutMsg) Route() string + func (msg TransferOutMsg) String() string + func (msg TransferOutMsg) Type() string + func (msg TransferOutMsg) ValidateBasic() sdk.Error + type TransferOutRefundPackage struct + RefundAddr sdk.AccAddress + RefundAmount *big.Int + RefundReason RefundReason + TokenSymbol [32]byte + func DeserializeTransferOutRefundPackage(serializedPackage []byte) (*TransferOutRefundPackage, sdk.Error) + type TransferOutSynPackage struct + Amount *big.Int + ContractAddress sdk.SmartChainAddress + ExpireTime uint64 + Recipient sdk.SmartChainAddress + RefundAddress sdk.AccAddress + TokenSymbol [32]byte + func DeserializeTransferOutSynPackage(serializedPackage []byte) (*TransferOutSynPackage, sdk.Error) + type UnbindMsg struct + From sdk.AccAddress + Symbol string + func NewUnbindMsg(from sdk.AccAddress, symbol string) UnbindMsg + func (msg UnbindMsg) GetInvolvedAddresses() []sdk.AccAddress + func (msg UnbindMsg) GetSignBytes() []byte + func (msg UnbindMsg) GetSigners() []sdk.AccAddress + func (msg UnbindMsg) Route() string + func (msg UnbindMsg) String() string + func (msg UnbindMsg) Type() string + func (msg UnbindMsg) ValidateBasic() sdk.Error