types

package
v0.0.0-...-6012569 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2023 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeConvertNFT     = "convert_nft"
	EventTypeConvertERC721  = "convert_erc721"
	EventTypeRegisterClass  = "register_class"
	EventTypeRegisterERC721 = "register_erc721"

	AttributeValueCategory = ModuleName

	AttributeKeyClass       = "cosmos_class"
	AttributeKeyERC721      = "erc721"
	AttributeKeyCosmosNFT   = "cosmos_nft"
	AttributeKeyERC721Token = "erc721_token"
	AttributeKeyReceiver    = "receiver"
)

erc721 events

View Source
const (
	// ModuleName is the name of the module
	ModuleName = "converter"

	// StoreKey is the string store representation
	StoreKey = ModuleName

	// RouterKey is the msg router key for the module
	RouterKey = ModuleName
)
View Source
const (
	ERC721MethodMintNFT           = "mint"
	ERC721MethodBurnNFT           = "burn"
	ERC721MethodOwnerOf           = "ownerOf"
	ERC721MethodName              = "name"
	ERC721MethodSymbol            = "symbol"
	ERC721MethodClassData         = "classData"
	ERC721MethodClassURI          = "baseURI"
	ERC721MethodTransferFrom      = "transferFrom"
	ERC721MethodTokenURI          = "tokenURI"
	ERC721MethodTokenData         = "tokenData"
	ERC721MethodSetClass          = "setClass"
	ERC165MethodSupportsInterface = "supportsInterface"
)

ERC721 Method Names

Supported Interface ID

View Source
const (
	TypeMsgConvertNFT    = "convert_NFT"
	TypeMsgConvertERC721 = "convert_ERC721"
)

Variables

View Source
var (

	// ModuleCdc references the global erc20 module codec. Note, the codec should
	// ONLY be used in certain instances of tests and for JSON encoding.
	//
	// The actual codec used for serialization should be provided to modules/erc20 and
	// defined at the application level.
	ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry())

	// AminoCdc is a amino codec created to support amino JSON compatible msgs.
	AminoCdc = codec.NewAminoCodec(amino)
)
View Source
var (
	ErrInvalidLengthErc721        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowErc721          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupErc721 = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInternalClassPair    = errorsmod.Register(ModuleName, 2, "internal class pair error")
	ErrClassPairNotFound    = errorsmod.Register(ModuleName, 3, "class pair not found")
	ErrABIPack              = errorsmod.Register(ModuleName, 4, "contract ABI pack failed")
	ErrABIUnpack            = errorsmod.Register(ModuleName, 5, "contract ABI unpack failed")
	ErrUnauthorized         = errorsmod.Register(ModuleName, 6, "unauthorized address")
	ErrRegisterTokenPair    = errorsmod.Register(ModuleName, 7, "register token pair error")
	ErrUndefinedOwner       = errorsmod.Register(ModuleName, 8, "undefined owner of contract pair")
	ErrSaveNativeClass      = errorsmod.Register(ModuleName, 9, "save native class error")
	ErrNativeNftNotFound    = errorsmod.Register(ModuleName, 10, "native nft not found")
	ErrNativeNFTTransfer    = errorsmod.Register(ModuleName, 11, "native nft transfer error")
	ErrNativeNFTOwner       = errorsmod.Register(ModuleName, 12, "unauthorized owner")
	ErrNativeNFTMint        = errorsmod.Register(ModuleName, 13, "naive nft mint error")
	ErrNativeNFTBurn        = errorsmod.Register(ModuleName, 14, "naive nft burn error")
	ErrERC721TokenMint      = errorsmod.Register(ModuleName, 15, "mint erc721 nft error")
	ErrERC721TokenOwner     = errorsmod.Register(ModuleName, 16, "erc721 token owner check failed")
	ErrERC721TokenTransfer  = errorsmod.Register(ModuleName, 17, "erc721 token transfer error")
	ErrERC721TokenURI       = errorsmod.Register(ModuleName, 18, "erc721 token uri error")
	ErrERC721Brun           = errorsmod.Register(ModuleName, 19, "erc721 token data error")
	ErrNotFoundClassMapping = errorsmod.Register(ModuleName, 20, "not found class mapping")
	ErrNotFoundTokenMapping = errorsmod.Register(ModuleName, 21, "not found token mapping")
	ErrInvalidERC721TokenId = errorsmod.Register(ModuleName, 22, "invalid erc721 token id")
)

errors

View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	KeyPrefixClassPair                    = []byte{0x01}
	KeyPrefixClassPairByERC721            = []byte{0x02}
	KeyPrefixClassPairByClass             = []byte{0x03}
	KeyPrefixNativeTokenIDByERC721TokenID = []byte{0x04}
	KeyPrefixERC721TokenIDByNativeTokenID = []byte{0x05}
	KeyPrefixContractClass                = []byte{0x06}
	KeyPrefixERC721NFT                    = []byte{0x07}
)

KVStore key prefixes

View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	Delimiter = []byte{0x00}
)
View Source
var ModuleAddress common.Address

ModuleAddress is the native module address for the module

View Source
var Owner_name = map[int32]string{
	0: "OWNER_UNSPECIFIED",
	1: "OWNER_MODULE",
	2: "OWNER_EXTERNAL",
}
View Source
var Owner_value = map[string]int32{
	"OWNER_UNSPECIFIED": 0,
	"OWNER_MODULE":      1,
	"OWNER_EXTERNAL":    2,
}

Functions

func CreateClass

func CreateClass(address string) string

CreateClass generates a string the module name plus the address to avoid conflicts with names staring with a number

func KeyTokenIdPair

func KeyTokenIdPair(classId, nftId string) []byte

func KeyTokenPairPrefix

func KeyTokenPairPrefix(classId string) []byte

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces register implementations

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers the necessary x/erc20 interfaces and concrete types on the provided LegacyAmino codec. These types are used for Amino JSON serialization and EIP-712 compatibility.

func RegisterMsgHandler

func RegisterMsgHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterMsgHandler registers the http handlers for service Msg to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterMsgHandlerClient

func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error

RegisterMsgHandlerClient registers the http handlers for service Msg to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MsgClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MsgClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MsgClient" to call the correct interceptors.

func RegisterMsgHandlerFromEndpoint

func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterMsgHandlerFromEndpoint is same as RegisterMsgHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterMsgHandlerServer

func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error

RegisterMsgHandlerServer registers the http handlers for service Msg to "mux". UnaryRPC :call MsgServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMsgHandlerFromEndpoint instead.

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type AccountKeeper

type AccountKeeper interface {
	GetModuleAccount(ctx sdk.Context, moduleName string) authtypes.ModuleAccountI
	GetModuleAddress(moduleName string) sdk.AccAddress
	GetSequence(sdk.Context, sdk.AccAddress) (uint64, error)
	GetAccount(sdk.Context, sdk.AccAddress) authtypes.AccountI
}

AccountKeeper defines the expected interface needed to retrieve account info.

type Class

type Class interface {
	GetID() string
	GetURI() string
	GetData() string
	GetName() string
	GetSymbol() string
}

Class defines the interface specifications of collection that can be transferred across chains

type ClassCollection

type ClassCollection struct {
	ClassPair ClassPair `protobuf:"bytes,1,opt,name=class_pair,json=classPair,proto3" json:"class_pair"`
	// tokens is a array of the token in class or the erc721 contract
	Tokens []TokenTrace `protobuf:"bytes,2,rep,name=tokens,proto3" json:"tokens"`
}

func (*ClassCollection) Descriptor

func (*ClassCollection) Descriptor() ([]byte, []int)

func (*ClassCollection) Equal

func (this *ClassCollection) Equal(that interface{}) bool

func (*ClassCollection) GetClassPair

func (m *ClassCollection) GetClassPair() ClassPair

func (*ClassCollection) GetTokens

func (m *ClassCollection) GetTokens() []TokenTrace

func (*ClassCollection) Marshal

func (m *ClassCollection) Marshal() (dAtA []byte, err error)

func (*ClassCollection) MarshalTo

func (m *ClassCollection) MarshalTo(dAtA []byte) (int, error)

func (*ClassCollection) MarshalToSizedBuffer

func (m *ClassCollection) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ClassCollection) ProtoMessage

func (*ClassCollection) ProtoMessage()

func (*ClassCollection) Reset

func (m *ClassCollection) Reset()

func (*ClassCollection) Size

func (m *ClassCollection) Size() (n int)

func (*ClassCollection) String

func (m *ClassCollection) String() string

func (*ClassCollection) Unmarshal

func (m *ClassCollection) Unmarshal(dAtA []byte) error

func (*ClassCollection) XXX_DiscardUnknown

func (m *ClassCollection) XXX_DiscardUnknown()

func (*ClassCollection) XXX_Marshal

func (m *ClassCollection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClassCollection) XXX_Merge

func (m *ClassCollection) XXX_Merge(src proto.Message)

func (*ClassCollection) XXX_Size

func (m *ClassCollection) XXX_Size() int

func (*ClassCollection) XXX_Unmarshal

func (m *ClassCollection) XXX_Unmarshal(b []byte) error

type ClassPair

type ClassPair struct {
	// contract_address is the hex address of ERC721 contract token
	ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"`
	// class_id is the class of Cosmos x/nft Class ID
	ClassId string `protobuf:"bytes,2,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"`
	// contract_owner is the an ENUM specifying the type of ERC721 owner (0 invalid, 1 ModuleAccount, 2 external address)
	ContractOwner Owner `` /* 139-byte string literal not displayed */
}

TokenPair defines an instance that records a pairing consisting of a native

Cosmos Class and an ERC721 contract address.

func NewClassPair

func NewClassPair(contractAddress common.Address, classId string, contractOwner Owner) ClassPair

func (*ClassPair) Descriptor

func (*ClassPair) Descriptor() ([]byte, []int)

func (*ClassPair) Equal

func (this *ClassPair) Equal(that interface{}) bool

func (*ClassPair) GetClassId

func (m *ClassPair) GetClassId() string

func (*ClassPair) GetContractAddress

func (m *ClassPair) GetContractAddress() string

func (*ClassPair) GetContractOwner

func (m *ClassPair) GetContractOwner() Owner

func (ClassPair) GetERC721Contract

func (tp ClassPair) GetERC721Contract() common.Address

GetERC721Contract casts the hex string address of the ERC721 to common.Address

func (ClassPair) GetID

func (tp ClassPair) GetID() []byte

GetID returns the SHA256 hash of the ERC721 address and denomination

func (ClassPair) IsNativeERC721

func (tp ClassPair) IsNativeERC721() bool

IsNativeERC721 returns true if the owner of the ERC721 contract not the erc721 module account

func (ClassPair) IsNativeNFT

func (tp ClassPair) IsNativeNFT() bool

IsNativeNFT returns true if the owner of the ERC721 contract is the erc721 module account

func (*ClassPair) Marshal

func (m *ClassPair) Marshal() (dAtA []byte, err error)

func (*ClassPair) MarshalTo

func (m *ClassPair) MarshalTo(dAtA []byte) (int, error)

func (*ClassPair) MarshalToSizedBuffer

func (m *ClassPair) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ClassPair) ProtoMessage

func (*ClassPair) ProtoMessage()

func (*ClassPair) Reset

func (m *ClassPair) Reset()

func (*ClassPair) Size

func (m *ClassPair) Size() (n int)

func (*ClassPair) String

func (m *ClassPair) String() string

func (*ClassPair) Unmarshal

func (m *ClassPair) Unmarshal(dAtA []byte) error

func (ClassPair) Validate

func (tp ClassPair) Validate() error

Validate performs a stateless validation of a TokenPair

func (*ClassPair) XXX_DiscardUnknown

func (m *ClassPair) XXX_DiscardUnknown()

func (*ClassPair) XXX_Marshal

func (m *ClassPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClassPair) XXX_Merge

func (m *ClassPair) XXX_Merge(src proto.Message)

func (*ClassPair) XXX_Size

func (m *ClassPair) XXX_Size() int

func (*ClassPair) XXX_Unmarshal

func (m *ClassPair) XXX_Unmarshal(b []byte) error

type ClassTrace

type ClassTrace struct {
	// class_id is the ibc class id
	ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"`
	// contract is the address of the erc721 contract
	Contract string `protobuf:"bytes,2,opt,name=contract,proto3" json:"contract,omitempty"`
	// tokens is a array of the token in class or the erc721 contract
	Tokens []TokenTrace `protobuf:"bytes,3,rep,name=tokens,proto3" json:"tokens"`
}

ClassTrace defines an instance that records a pairing consisting of a native

class and an ERC721 contract.

func (*ClassTrace) Descriptor

func (*ClassTrace) Descriptor() ([]byte, []int)

func (*ClassTrace) Equal

func (this *ClassTrace) Equal(that interface{}) bool

func (*ClassTrace) GetClassId

func (m *ClassTrace) GetClassId() string

func (*ClassTrace) GetContract

func (m *ClassTrace) GetContract() string

func (*ClassTrace) GetTokens

func (m *ClassTrace) GetTokens() []TokenTrace

func (*ClassTrace) Marshal

func (m *ClassTrace) Marshal() (dAtA []byte, err error)

func (*ClassTrace) MarshalTo

func (m *ClassTrace) MarshalTo(dAtA []byte) (int, error)

func (*ClassTrace) MarshalToSizedBuffer

func (m *ClassTrace) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ClassTrace) ProtoMessage

func (*ClassTrace) ProtoMessage()

func (*ClassTrace) Reset

func (m *ClassTrace) Reset()

func (*ClassTrace) Size

func (m *ClassTrace) Size() (n int)

func (*ClassTrace) String

func (m *ClassTrace) String() string

func (*ClassTrace) Unmarshal

func (m *ClassTrace) Unmarshal(dAtA []byte) error

func (*ClassTrace) XXX_DiscardUnknown

func (m *ClassTrace) XXX_DiscardUnknown()

func (*ClassTrace) XXX_Marshal

func (m *ClassTrace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClassTrace) XXX_Merge

func (m *ClassTrace) XXX_Merge(src proto.Message)

func (*ClassTrace) XXX_Size

func (m *ClassTrace) XXX_Size() int

func (*ClassTrace) XXX_Unmarshal

func (m *ClassTrace) XXX_Unmarshal(b []byte) error

type ERC721Contract

type ERC721Contract struct {
	Contract common.Address
	URI      string
	Data     string
}

func (ERC721Contract) GetData

func (e ERC721Contract) GetData() string

func (ERC721Contract) GetID

func (e ERC721Contract) GetID() string

func (ERC721Contract) GetURI

func (e ERC721Contract) GetURI() string

type ERC721Data

type ERC721Data struct {
	Name   string `json:"name"`
	Symbol string `json:"symbol"`
	URI    string `json:"uri,omitempty"`
	Data   string `json:"data,omitempty"`
}

ERC721Data is the struct that holds the data of an ERC721 token

func NewERC721Data

func NewERC721Data(name, symbol string) ERC721Data

NewERC721Data creates a new ERC20Data instance

type ERC721StringResponse

type ERC721StringResponse struct {
	Value string
}

ERC721StringResponse defines the string value from the call response

type ERC721Token

type ERC721Token struct {
	Contract common.Address
	ID       *big.Int
	URI      string
	Data     string
}

func (ERC721Token) GetClassID

func (e ERC721Token) GetClassID() string

func (ERC721Token) GetData

func (e ERC721Token) GetData() string

func (ERC721Token) GetID

func (e ERC721Token) GetID() string

func (ERC721Token) GetURI

func (e ERC721Token) GetURI() string

type ERC721TokenData

type ERC721TokenData struct {
	URI  string
	Data string
}

func NewERC721TokenData

func NewERC721TokenData(URI string) ERC721TokenData

type EVMKeeper

type EVMKeeper interface {
	GetParams(ctx sdk.Context) evmtypes.Params
	GetAccountWithoutBalance(ctx sdk.Context, addr common.Address) *statedb.Account
	EstimateGas(c context.Context, req *evmtypes.EthCallRequest) (*evmtypes.EstimateGasResponse, error)
	ApplyMessage(ctx sdk.Context, msg core.Message, tracer vm.EVMLogger, commit bool) (*evmtypes.MsgEthereumTxResponse, error)
	ChainID() *big.Int
}

EVMKeeper defines the expected EVM keeper interface used on erc20

type GenesisState

type GenesisState struct {
	// class_collections is a slice of the registered token pairs at genesis
	ClassCollections []ClassCollection `protobuf:"bytes,1,rep,name=class_collections,json=classCollections,proto3" json:"class_collections"`
	// class_traces is a slice of the transfered on `erc-721` port token by nft-transfer
	ClassTraces []ClassTrace `protobuf:"bytes,2,rep,name=class_traces,json=classTraces,proto3" json:"class_traces"`
}

GenesisState defines the module's genesis state.

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState creates a default GenesisState object

func NewGenesisState

func NewGenesisState(classCollections []ClassCollection) *GenesisState

NewGenesisState creates a new GenesisState object

func (*GenesisState) Descriptor

func (*GenesisState) Descriptor() ([]byte, []int)

func (*GenesisState) GetClassCollections

func (m *GenesisState) GetClassCollections() []ClassCollection

func (*GenesisState) GetClassTraces

func (m *GenesisState) GetClassTraces() []ClassTrace

func (*GenesisState) Marshal

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)

func (*GenesisState) MarshalToSizedBuffer

func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

func (m *GenesisState) Size() (n int)

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

func (m *GenesisState) Unmarshal(dAtA []byte) error

func (GenesisState) Validate

func (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenesisState) XXX_Merge

func (m *GenesisState) XXX_Merge(src proto.Message)

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

func (m *GenesisState) XXX_Unmarshal(b []byte) error

type MsgClient

type MsgClient interface {
	// ConvertNFT mints a ERC721 representation of the native Cosmos Class
	// that is registered on the token mapping.
	ConvertNFT(ctx context.Context, in *MsgConvertNFT, opts ...grpc.CallOption) (*MsgConvertNFTResponse, error)
	// ConvertERC721 mints a native Cosmos Class representation of the x/nft token
	// contract that is registered on the token mapping.
	ConvertERC721(ctx context.Context, in *MsgConvertERC721, opts ...grpc.CallOption) (*MsgConvertERC721Response, error)
}

MsgClient is the client API for Msg service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgConvertERC721

type MsgConvertERC721 struct {
	// contract_address of an ERC721 contract, that is registered in a class pair
	ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"`
	// token_id of the ERC721 token to convert
	TokenId github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=token_id,json=tokenId,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"token_id"`
	// receiver is the bech32 address to receive native Cosmos Class
	Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"`
	// sender is the hex address from the owner of the given ERC721 tokens
	Sender string `protobuf:"bytes,4,opt,name=sender,proto3" json:"sender,omitempty"`
}

MsgConvertERC721 defines a Msg to convert a ERC721 token to a native Cosmos NFT

func NewConvertERC721Msg

func NewConvertERC721Msg(contractAddress string, tokenId sdk.Int, receiver, sender sdk.AccAddress) *MsgConvertERC721

NewConvertERC721Msg creates a new instance of MsgConvertERC721

func (*MsgConvertERC721) Descriptor

func (*MsgConvertERC721) Descriptor() ([]byte, []int)

func (*MsgConvertERC721) GetContractAddress

func (m *MsgConvertERC721) GetContractAddress() string

func (*MsgConvertERC721) GetReceiver

func (m *MsgConvertERC721) GetReceiver() string

func (*MsgConvertERC721) GetSender

func (m *MsgConvertERC721) GetSender() string

func (MsgConvertERC721) GetSignBytes

func (msg MsgConvertERC721) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgConvertERC721) GetSigners

func (msg MsgConvertERC721) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required

func (*MsgConvertERC721) Marshal

func (m *MsgConvertERC721) Marshal() (dAtA []byte, err error)

func (*MsgConvertERC721) MarshalTo

func (m *MsgConvertERC721) MarshalTo(dAtA []byte) (int, error)

func (*MsgConvertERC721) MarshalToSizedBuffer

func (m *MsgConvertERC721) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgConvertERC721) ProtoMessage

func (*MsgConvertERC721) ProtoMessage()

func (*MsgConvertERC721) Reset

func (m *MsgConvertERC721) Reset()

func (MsgConvertERC721) Route

func (msg MsgConvertERC721) Route() string

Route should return the name of the module

func (*MsgConvertERC721) Size

func (m *MsgConvertERC721) Size() (n int)

func (*MsgConvertERC721) String

func (m *MsgConvertERC721) String() string

func (MsgConvertERC721) Type

func (msg MsgConvertERC721) Type() string

Type should return the action

func (*MsgConvertERC721) Unmarshal

func (m *MsgConvertERC721) Unmarshal(dAtA []byte) error

func (MsgConvertERC721) ValidateBasic

func (msg MsgConvertERC721) ValidateBasic() error

ValidateBasic runs stateless checks on the message

func (*MsgConvertERC721) XXX_DiscardUnknown

func (m *MsgConvertERC721) XXX_DiscardUnknown()

func (*MsgConvertERC721) XXX_Marshal

func (m *MsgConvertERC721) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgConvertERC721) XXX_Merge

func (m *MsgConvertERC721) XXX_Merge(src proto.Message)

func (*MsgConvertERC721) XXX_Size

func (m *MsgConvertERC721) XXX_Size() int

func (*MsgConvertERC721) XXX_Unmarshal

func (m *MsgConvertERC721) XXX_Unmarshal(b []byte) error

type MsgConvertERC721Response

type MsgConvertERC721Response struct {
}

MsgConvertERC721Response returns no fields

func (*MsgConvertERC721Response) Descriptor

func (*MsgConvertERC721Response) Descriptor() ([]byte, []int)

func (*MsgConvertERC721Response) Marshal

func (m *MsgConvertERC721Response) Marshal() (dAtA []byte, err error)

func (*MsgConvertERC721Response) MarshalTo

func (m *MsgConvertERC721Response) MarshalTo(dAtA []byte) (int, error)

func (*MsgConvertERC721Response) MarshalToSizedBuffer

func (m *MsgConvertERC721Response) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgConvertERC721Response) ProtoMessage

func (*MsgConvertERC721Response) ProtoMessage()

func (*MsgConvertERC721Response) Reset

func (m *MsgConvertERC721Response) Reset()

func (*MsgConvertERC721Response) Size

func (m *MsgConvertERC721Response) Size() (n int)

func (*MsgConvertERC721Response) String

func (m *MsgConvertERC721Response) String() string

func (*MsgConvertERC721Response) Unmarshal

func (m *MsgConvertERC721Response) Unmarshal(dAtA []byte) error

func (*MsgConvertERC721Response) XXX_DiscardUnknown

func (m *MsgConvertERC721Response) XXX_DiscardUnknown()

func (*MsgConvertERC721Response) XXX_Marshal

func (m *MsgConvertERC721Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgConvertERC721Response) XXX_Merge

func (m *MsgConvertERC721Response) XXX_Merge(src proto.Message)

func (*MsgConvertERC721Response) XXX_Size

func (m *MsgConvertERC721Response) XXX_Size() int

func (*MsgConvertERC721Response) XXX_Unmarshal

func (m *MsgConvertERC721Response) XXX_Unmarshal(b []byte) error

type MsgConvertNFT

type MsgConvertNFT struct {
	// class_id of the native Cosmos Class to convert
	ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"`
	// token_id of the native Cosmos Class to convert
	TokenId string `protobuf:"bytes,2,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"`
	// receiver is the hex address to receive ERC721 token
	Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"`
	// sender is the cosmos bech32 address from the owner of the given Cosmos Class
	Sender string `protobuf:"bytes,4,opt,name=sender,proto3" json:"sender,omitempty"`
}

MsgConvertNFT defines a Msg to convert a native Cosmos coin to a ERC721 token

func NewConvertNFTMsg

func NewConvertNFTMsg(classId string, tokenId string, receiver common.Address, sender sdk.AccAddress) *MsgConvertNFT

NewConvertNFTMsg creates a new instance of MsgConvertNFT

func (*MsgConvertNFT) Descriptor

func (*MsgConvertNFT) Descriptor() ([]byte, []int)

func (*MsgConvertNFT) GetClassId

func (m *MsgConvertNFT) GetClassId() string

func (*MsgConvertNFT) GetReceiver

func (m *MsgConvertNFT) GetReceiver() string

func (*MsgConvertNFT) GetSender

func (m *MsgConvertNFT) GetSender() string

func (MsgConvertNFT) GetSignBytes

func (msg MsgConvertNFT) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgConvertNFT) GetSigners

func (msg MsgConvertNFT) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required

func (*MsgConvertNFT) GetTokenId

func (m *MsgConvertNFT) GetTokenId() string

func (*MsgConvertNFT) Marshal

func (m *MsgConvertNFT) Marshal() (dAtA []byte, err error)

func (*MsgConvertNFT) MarshalTo

func (m *MsgConvertNFT) MarshalTo(dAtA []byte) (int, error)

func (*MsgConvertNFT) MarshalToSizedBuffer

func (m *MsgConvertNFT) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgConvertNFT) ProtoMessage

func (*MsgConvertNFT) ProtoMessage()

func (*MsgConvertNFT) Reset

func (m *MsgConvertNFT) Reset()

func (MsgConvertNFT) Route

func (msg MsgConvertNFT) Route() string

Route should return the name of the module

func (*MsgConvertNFT) Size

func (m *MsgConvertNFT) Size() (n int)

func (*MsgConvertNFT) String

func (m *MsgConvertNFT) String() string

func (MsgConvertNFT) Type

func (msg MsgConvertNFT) Type() string

Type should return the action

func (*MsgConvertNFT) Unmarshal

func (m *MsgConvertNFT) Unmarshal(dAtA []byte) error

func (MsgConvertNFT) ValidateBasic

func (msg MsgConvertNFT) ValidateBasic() error

ValidateBasic runs stateless checks on the message

func (*MsgConvertNFT) XXX_DiscardUnknown

func (m *MsgConvertNFT) XXX_DiscardUnknown()

func (*MsgConvertNFT) XXX_Marshal

func (m *MsgConvertNFT) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgConvertNFT) XXX_Merge

func (m *MsgConvertNFT) XXX_Merge(src proto.Message)

func (*MsgConvertNFT) XXX_Size

func (m *MsgConvertNFT) XXX_Size() int

func (*MsgConvertNFT) XXX_Unmarshal

func (m *MsgConvertNFT) XXX_Unmarshal(b []byte) error

type MsgConvertNFTResponse

type MsgConvertNFTResponse struct {
}

MsgConvertNFTResponse returns no fields

func (*MsgConvertNFTResponse) Descriptor

func (*MsgConvertNFTResponse) Descriptor() ([]byte, []int)

func (*MsgConvertNFTResponse) Marshal

func (m *MsgConvertNFTResponse) Marshal() (dAtA []byte, err error)

func (*MsgConvertNFTResponse) MarshalTo

func (m *MsgConvertNFTResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgConvertNFTResponse) MarshalToSizedBuffer

func (m *MsgConvertNFTResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgConvertNFTResponse) ProtoMessage

func (*MsgConvertNFTResponse) ProtoMessage()

func (*MsgConvertNFTResponse) Reset

func (m *MsgConvertNFTResponse) Reset()

func (*MsgConvertNFTResponse) Size

func (m *MsgConvertNFTResponse) Size() (n int)

func (*MsgConvertNFTResponse) String

func (m *MsgConvertNFTResponse) String() string

func (*MsgConvertNFTResponse) Unmarshal

func (m *MsgConvertNFTResponse) Unmarshal(dAtA []byte) error

func (*MsgConvertNFTResponse) XXX_DiscardUnknown

func (m *MsgConvertNFTResponse) XXX_DiscardUnknown()

func (*MsgConvertNFTResponse) XXX_Marshal

func (m *MsgConvertNFTResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgConvertNFTResponse) XXX_Merge

func (m *MsgConvertNFTResponse) XXX_Merge(src proto.Message)

func (*MsgConvertNFTResponse) XXX_Size

func (m *MsgConvertNFTResponse) XXX_Size() int

func (*MsgConvertNFTResponse) XXX_Unmarshal

func (m *MsgConvertNFTResponse) XXX_Unmarshal(b []byte) error

type MsgServer

type MsgServer interface {
	// ConvertNFT mints a ERC721 representation of the native Cosmos Class
	// that is registered on the token mapping.
	ConvertNFT(context.Context, *MsgConvertNFT) (*MsgConvertNFTResponse, error)
	// ConvertERC721 mints a native Cosmos Class representation of the x/nft token
	// contract that is registered on the token mapping.
	ConvertERC721(context.Context, *MsgConvertERC721) (*MsgConvertERC721Response, error)
}

MsgServer is the server API for Msg service.

type NFT

type NFT interface {
	GetClassID() string
	GetID() string
	GetURI() string
	GetData() string
}

NFT defines the interface specification of nft that can be transferred across chains

type NFTKeeper

type NFTKeeper interface {
	SaveClass(ctx sdk.Context, classID, classURI string, classData string) error
	Mint(ctx sdk.Context, classID, tokenID, tokenURI string, tokenData string, receiver sdk.AccAddress) error
	Transfer(ctx sdk.Context, classID string, tokenID string, tokenData string, receiver sdk.AccAddress) error
	Burn(ctx sdk.Context, classID string, tokenID string) error

	GetOwner(ctx sdk.Context, classID string, tokenID string) sdk.AccAddress
	HasClass(ctx sdk.Context, classID string) bool
	GetClass(ctx sdk.Context, classID string) (Class, bool)
	GetNFT(ctx sdk.Context, classID string, tokenID string) (NFT, bool)
}

NFTKeeper defines the expected interface needed to retrieve the IRSMod NFT denom.

type Owner

type Owner int32

Owner enumerates the ownership of a ERC721 contract.

const (
	// OWNER_UNSPECIFIED defines an invalid/undefined owner.
	OWNER_UNSPECIFIED Owner = 0
	// OWNER_MODULE - ERC721 is owned by the ERC721 module account.
	OWNER_MODULE Owner = 1
	// OWNER_EXTERNAL - ERC721 is owned by an external account.
	OWNER_EXTERNAL Owner = 2
)

func (Owner) EnumDescriptor

func (Owner) EnumDescriptor() ([]byte, []int)

func (Owner) String

func (x Owner) String() string

type QueryClassPairRequest

type QueryClassPairRequest struct {
	// token identifier can be either the hex contract address of the ERC721 or the
	// Cosmos base denomination
	Class string `protobuf:"bytes,1,opt,name=class,proto3" json:"class,omitempty"`
}

QueryClassPairRequest is the request type for the Query/ClassPair RPC method.

func (*QueryClassPairRequest) Descriptor

func (*QueryClassPairRequest) Descriptor() ([]byte, []int)

func (*QueryClassPairRequest) GetClass

func (m *QueryClassPairRequest) GetClass() string

func (*QueryClassPairRequest) Marshal

func (m *QueryClassPairRequest) Marshal() (dAtA []byte, err error)

func (*QueryClassPairRequest) MarshalTo

func (m *QueryClassPairRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryClassPairRequest) MarshalToSizedBuffer

func (m *QueryClassPairRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryClassPairRequest) ProtoMessage

func (*QueryClassPairRequest) ProtoMessage()

func (*QueryClassPairRequest) Reset

func (m *QueryClassPairRequest) Reset()

func (*QueryClassPairRequest) Size

func (m *QueryClassPairRequest) Size() (n int)

func (*QueryClassPairRequest) String

func (m *QueryClassPairRequest) String() string

func (*QueryClassPairRequest) Unmarshal

func (m *QueryClassPairRequest) Unmarshal(dAtA []byte) error

func (*QueryClassPairRequest) XXX_DiscardUnknown

func (m *QueryClassPairRequest) XXX_DiscardUnknown()

func (*QueryClassPairRequest) XXX_Marshal

func (m *QueryClassPairRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryClassPairRequest) XXX_Merge

func (m *QueryClassPairRequest) XXX_Merge(src proto.Message)

func (*QueryClassPairRequest) XXX_Size

func (m *QueryClassPairRequest) XXX_Size() int

func (*QueryClassPairRequest) XXX_Unmarshal

func (m *QueryClassPairRequest) XXX_Unmarshal(b []byte) error

type QueryClassPairResponse

type QueryClassPairResponse struct {
	// class_pairs returns the info about a registered class pair for the ERC721 module
	ClassPair ClassPair `protobuf:"bytes,1,opt,name=class_pair,json=classPair,proto3" json:"class_pair"`
}

QueryClassPairResponse is the response type for the Query/ClassPair RPC method.

func (*QueryClassPairResponse) Descriptor

func (*QueryClassPairResponse) Descriptor() ([]byte, []int)

func (*QueryClassPairResponse) GetClassPair

func (m *QueryClassPairResponse) GetClassPair() ClassPair

func (*QueryClassPairResponse) Marshal

func (m *QueryClassPairResponse) Marshal() (dAtA []byte, err error)

func (*QueryClassPairResponse) MarshalTo

func (m *QueryClassPairResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryClassPairResponse) MarshalToSizedBuffer

func (m *QueryClassPairResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryClassPairResponse) ProtoMessage

func (*QueryClassPairResponse) ProtoMessage()

func (*QueryClassPairResponse) Reset

func (m *QueryClassPairResponse) Reset()

func (*QueryClassPairResponse) Size

func (m *QueryClassPairResponse) Size() (n int)

func (*QueryClassPairResponse) String

func (m *QueryClassPairResponse) String() string

func (*QueryClassPairResponse) Unmarshal

func (m *QueryClassPairResponse) Unmarshal(dAtA []byte) error

func (*QueryClassPairResponse) XXX_DiscardUnknown

func (m *QueryClassPairResponse) XXX_DiscardUnknown()

func (*QueryClassPairResponse) XXX_Marshal

func (m *QueryClassPairResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryClassPairResponse) XXX_Merge

func (m *QueryClassPairResponse) XXX_Merge(src proto.Message)

func (*QueryClassPairResponse) XXX_Size

func (m *QueryClassPairResponse) XXX_Size() int

func (*QueryClassPairResponse) XXX_Unmarshal

func (m *QueryClassPairResponse) XXX_Unmarshal(b []byte) error

type QueryClassPairsRequest

type QueryClassPairsRequest struct {
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryClassPairsRequest is the request type for the Query/ClassPairs RPC method.

func (*QueryClassPairsRequest) Descriptor

func (*QueryClassPairsRequest) Descriptor() ([]byte, []int)

func (*QueryClassPairsRequest) GetPagination

func (m *QueryClassPairsRequest) GetPagination() *query.PageRequest

func (*QueryClassPairsRequest) Marshal

func (m *QueryClassPairsRequest) Marshal() (dAtA []byte, err error)

func (*QueryClassPairsRequest) MarshalTo

func (m *QueryClassPairsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryClassPairsRequest) MarshalToSizedBuffer

func (m *QueryClassPairsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryClassPairsRequest) ProtoMessage

func (*QueryClassPairsRequest) ProtoMessage()

func (*QueryClassPairsRequest) Reset

func (m *QueryClassPairsRequest) Reset()

func (*QueryClassPairsRequest) Size

func (m *QueryClassPairsRequest) Size() (n int)

func (*QueryClassPairsRequest) String

func (m *QueryClassPairsRequest) String() string

func (*QueryClassPairsRequest) Unmarshal

func (m *QueryClassPairsRequest) Unmarshal(dAtA []byte) error

func (*QueryClassPairsRequest) XXX_DiscardUnknown

func (m *QueryClassPairsRequest) XXX_DiscardUnknown()

func (*QueryClassPairsRequest) XXX_Marshal

func (m *QueryClassPairsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryClassPairsRequest) XXX_Merge

func (m *QueryClassPairsRequest) XXX_Merge(src proto.Message)

func (*QueryClassPairsRequest) XXX_Size

func (m *QueryClassPairsRequest) XXX_Size() int

func (*QueryClassPairsRequest) XXX_Unmarshal

func (m *QueryClassPairsRequest) XXX_Unmarshal(b []byte) error

type QueryClassPairsResponse

type QueryClassPairsResponse struct {
	// class_pairs is a slice of registered class pairs for the ERC721 module
	ClassPairs []ClassPair `protobuf:"bytes,1,rep,name=class_pairs,json=classPairs,proto3" json:"class_pairs"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryClassPairsResponse is the response type for the Query/ClassPairs RPC method.

func (*QueryClassPairsResponse) Descriptor

func (*QueryClassPairsResponse) Descriptor() ([]byte, []int)

func (*QueryClassPairsResponse) GetClassPairs

func (m *QueryClassPairsResponse) GetClassPairs() []ClassPair

func (*QueryClassPairsResponse) GetPagination

func (m *QueryClassPairsResponse) GetPagination() *query.PageResponse

func (*QueryClassPairsResponse) Marshal

func (m *QueryClassPairsResponse) Marshal() (dAtA []byte, err error)

func (*QueryClassPairsResponse) MarshalTo

func (m *QueryClassPairsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryClassPairsResponse) MarshalToSizedBuffer

func (m *QueryClassPairsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryClassPairsResponse) ProtoMessage

func (*QueryClassPairsResponse) ProtoMessage()

func (*QueryClassPairsResponse) Reset

func (m *QueryClassPairsResponse) Reset()

func (*QueryClassPairsResponse) Size

func (m *QueryClassPairsResponse) Size() (n int)

func (*QueryClassPairsResponse) String

func (m *QueryClassPairsResponse) String() string

func (*QueryClassPairsResponse) Unmarshal

func (m *QueryClassPairsResponse) Unmarshal(dAtA []byte) error

func (*QueryClassPairsResponse) XXX_DiscardUnknown

func (m *QueryClassPairsResponse) XXX_DiscardUnknown()

func (*QueryClassPairsResponse) XXX_Marshal

func (m *QueryClassPairsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryClassPairsResponse) XXX_Merge

func (m *QueryClassPairsResponse) XXX_Merge(src proto.Message)

func (*QueryClassPairsResponse) XXX_Size

func (m *QueryClassPairsResponse) XXX_Size() int

func (*QueryClassPairsResponse) XXX_Unmarshal

func (m *QueryClassPairsResponse) XXX_Unmarshal(b []byte) error

type QueryClient

type QueryClient interface {
	// ClassPairs retrieves registered class pairs
	ClassPairs(ctx context.Context, in *QueryClassPairsRequest, opts ...grpc.CallOption) (*QueryClassPairsResponse, error)
	// ClassPair retrieves a registered class pair
	ClassPair(ctx context.Context, in *QueryClassPairRequest, opts ...grpc.CallOption) (*QueryClassPairResponse, error)
	// TokenTrace retrieves a cross-chain token trace
	TokenTrace(ctx context.Context, in *QueryTokenTraceRequest, opts ...grpc.CallOption) (*QueryTokenTraceResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryServer

type QueryServer interface {
	// ClassPairs retrieves registered class pairs
	ClassPairs(context.Context, *QueryClassPairsRequest) (*QueryClassPairsResponse, error)
	// ClassPair retrieves a registered class pair
	ClassPair(context.Context, *QueryClassPairRequest) (*QueryClassPairResponse, error)
	// TokenTrace retrieves a cross-chain token trace
	TokenTrace(context.Context, *QueryTokenTraceRequest) (*QueryTokenTraceResponse, error)
}

QueryServer is the server API for Query service.

type QueryTokenTraceRequest

type QueryTokenTraceRequest struct {
	// class_id is class_id entered by the user (may be ibc_class_id or erc721 contract address)
	ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"`
	// token_id is token_id entered by the user (may be nft_id or erc721 token_id)
	TokenId string `protobuf:"bytes,2,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"`
}

QueryTokenTraceRequest is the request type for the Query/TokenTrace RPC method.

func (*QueryTokenTraceRequest) Descriptor

func (*QueryTokenTraceRequest) Descriptor() ([]byte, []int)

func (*QueryTokenTraceRequest) GetClassId

func (m *QueryTokenTraceRequest) GetClassId() string

func (*QueryTokenTraceRequest) GetTokenId

func (m *QueryTokenTraceRequest) GetTokenId() string

func (*QueryTokenTraceRequest) Marshal

func (m *QueryTokenTraceRequest) Marshal() (dAtA []byte, err error)

func (*QueryTokenTraceRequest) MarshalTo

func (m *QueryTokenTraceRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryTokenTraceRequest) MarshalToSizedBuffer

func (m *QueryTokenTraceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryTokenTraceRequest) ProtoMessage

func (*QueryTokenTraceRequest) ProtoMessage()

func (*QueryTokenTraceRequest) Reset

func (m *QueryTokenTraceRequest) Reset()

func (*QueryTokenTraceRequest) Size

func (m *QueryTokenTraceRequest) Size() (n int)

func (*QueryTokenTraceRequest) String

func (m *QueryTokenTraceRequest) String() string

func (*QueryTokenTraceRequest) Unmarshal

func (m *QueryTokenTraceRequest) Unmarshal(dAtA []byte) error

func (*QueryTokenTraceRequest) XXX_DiscardUnknown

func (m *QueryTokenTraceRequest) XXX_DiscardUnknown()

func (*QueryTokenTraceRequest) XXX_Marshal

func (m *QueryTokenTraceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryTokenTraceRequest) XXX_Merge

func (m *QueryTokenTraceRequest) XXX_Merge(src proto.Message)

func (*QueryTokenTraceRequest) XXX_Size

func (m *QueryTokenTraceRequest) XXX_Size() int

func (*QueryTokenTraceRequest) XXX_Unmarshal

func (m *QueryTokenTraceRequest) XXX_Unmarshal(b []byte) error

type QueryTokenTraceResponse

type QueryTokenTraceResponse struct {
	ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"`
	TokenId string `protobuf:"bytes,2,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"`
}

QueryTokenTraceResponse is the response type for the Query/TokenTrace RPC method.

func (*QueryTokenTraceResponse) Descriptor

func (*QueryTokenTraceResponse) Descriptor() ([]byte, []int)

func (*QueryTokenTraceResponse) GetClassId

func (m *QueryTokenTraceResponse) GetClassId() string

func (*QueryTokenTraceResponse) GetTokenId

func (m *QueryTokenTraceResponse) GetTokenId() string

func (*QueryTokenTraceResponse) Marshal

func (m *QueryTokenTraceResponse) Marshal() (dAtA []byte, err error)

func (*QueryTokenTraceResponse) MarshalTo

func (m *QueryTokenTraceResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryTokenTraceResponse) MarshalToSizedBuffer

func (m *QueryTokenTraceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryTokenTraceResponse) ProtoMessage

func (*QueryTokenTraceResponse) ProtoMessage()

func (*QueryTokenTraceResponse) Reset

func (m *QueryTokenTraceResponse) Reset()

func (*QueryTokenTraceResponse) Size

func (m *QueryTokenTraceResponse) Size() (n int)

func (*QueryTokenTraceResponse) String

func (m *QueryTokenTraceResponse) String() string

func (*QueryTokenTraceResponse) Unmarshal

func (m *QueryTokenTraceResponse) Unmarshal(dAtA []byte) error

func (*QueryTokenTraceResponse) XXX_DiscardUnknown

func (m *QueryTokenTraceResponse) XXX_DiscardUnknown()

func (*QueryTokenTraceResponse) XXX_Marshal

func (m *QueryTokenTraceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryTokenTraceResponse) XXX_Merge

func (m *QueryTokenTraceResponse) XXX_Merge(src proto.Message)

func (*QueryTokenTraceResponse) XXX_Size

func (m *QueryTokenTraceResponse) XXX_Size() int

func (*QueryTokenTraceResponse) XXX_Unmarshal

func (m *QueryTokenTraceResponse) XXX_Unmarshal(b []byte) error

type TokenTrace

type TokenTrace struct {
	// token_id is the token id of the native nft module
	TokenId string `protobuf:"bytes,1,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"`
	// erc721_id is the id of the erc721 contract token
	Erc721Id string `protobuf:"bytes,2,opt,name=erc721_id,json=erc721Id,proto3" json:"erc721_id,omitempty"`
}

TokenTrace defines an instance that records a pairing consisting of a native

nft and an ERC721 token.

func (*TokenTrace) Descriptor

func (*TokenTrace) Descriptor() ([]byte, []int)

func (*TokenTrace) Equal

func (this *TokenTrace) Equal(that interface{}) bool

func (*TokenTrace) GetErc721Id

func (m *TokenTrace) GetErc721Id() string

func (*TokenTrace) GetTokenId

func (m *TokenTrace) GetTokenId() string

func (*TokenTrace) Marshal

func (m *TokenTrace) Marshal() (dAtA []byte, err error)

func (*TokenTrace) MarshalTo

func (m *TokenTrace) MarshalTo(dAtA []byte) (int, error)

func (*TokenTrace) MarshalToSizedBuffer

func (m *TokenTrace) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TokenTrace) ProtoMessage

func (*TokenTrace) ProtoMessage()

func (*TokenTrace) Reset

func (m *TokenTrace) Reset()

func (*TokenTrace) Size

func (m *TokenTrace) Size() (n int)

func (*TokenTrace) String

func (m *TokenTrace) String() string

func (*TokenTrace) Unmarshal

func (m *TokenTrace) Unmarshal(dAtA []byte) error

func (*TokenTrace) XXX_DiscardUnknown

func (m *TokenTrace) XXX_DiscardUnknown()

func (*TokenTrace) XXX_Marshal

func (m *TokenTrace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TokenTrace) XXX_Merge

func (m *TokenTrace) XXX_Merge(src proto.Message)

func (*TokenTrace) XXX_Size

func (m *TokenTrace) XXX_Size() int

func (*TokenTrace) XXX_Unmarshal

func (m *TokenTrace) XXX_Unmarshal(b []byte) error

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) ConvertERC721

func (*UnimplementedMsgServer) ConvertNFT

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) ClassPair

func (*UnimplementedQueryServer) ClassPairs

func (*UnimplementedQueryServer) TokenTrace

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL