pb

package
v0.0.0-...-72888ac Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PREFIX_CONFIRMED_BLOCK = []byte(".confirmedblok")

	KEY_ERC20 = []byte(".erc20")
	KEY_COIN  = []byte(".coin") // native coin, like ETH
	KEY_NFT   = []byte(".nft")
)
View Source
var (
	ErrInvalidLengthBlock        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBlock          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupBlock = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	PREFIX_EVENT_ERC20 = []byte(".eventerc20")
	PREFIX_EVENT_NFT   = []byte(".eventnft")
)
View Source
var (
	ErrInvalidLengthEvent        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvent          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthPair        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPair          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPair = fmt.Errorf("proto: unexpected end of group")
)
View Source
var EventStatus_name = map[int32]string{
	0: "UNDEFINED",
	1: "FAILED",
	2: "SUCCEEDED",
}
View Source
var EventStatus_value = map[string]int32{
	"UNDEFINED": 0,
	"FAILED":    1,
	"SUCCEEDED": 2,
}
View Source
var (
	PREFIX_ADDR_PAIR = []byte(".pair")
)
View Source
var Pair_Type_name = map[int32]string{
	0: "ORIGINAL",
	1: "WRAPPED",
}
View Source
var Pair_Type_value = map[string]int32{
	"ORIGINAL": 0,
	"WRAPPED":  1,
}

Functions

func GetPairStore

func GetPairStore(db store.Store) *store.PrefixStore

Types

type BlockType

type BlockType int
const (
	BlockERC20 BlockType = iota
	BlockNFT
)

type ConfirmedBlock

type ConfirmedBlock struct {
	Hash                 string     `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	Number               uint64     `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"`
	UpdatedAt            *time.Time `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3,stdtime" json:"updated_at,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*ConfirmedBlock) Descriptor

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

func (*ConfirmedBlock) Equal

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

func (*ConfirmedBlock) Get

func (m *ConfirmedBlock) Get(db store.Store, t BlockType) error

func (*ConfirmedBlock) GetHash

func (m *ConfirmedBlock) GetHash() string

func (*ConfirmedBlock) GetNumber

func (m *ConfirmedBlock) GetNumber() uint64

func (*ConfirmedBlock) GetUpdatedAt

func (m *ConfirmedBlock) GetUpdatedAt() *time.Time

func (*ConfirmedBlock) GoString

func (this *ConfirmedBlock) GoString() string

func (*ConfirmedBlock) Marshal

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

func (*ConfirmedBlock) MarshalTo

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

func (*ConfirmedBlock) MarshalToSizedBuffer

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

func (*ConfirmedBlock) ProtoMessage

func (*ConfirmedBlock) ProtoMessage()

func (ConfirmedBlock) Put

func (m ConfirmedBlock) Put(db store.Store, t BlockType) error

func (*ConfirmedBlock) Reset

func (m *ConfirmedBlock) Reset()

func (*ConfirmedBlock) Size

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

func (*ConfirmedBlock) String

func (this *ConfirmedBlock) String() string

func (*ConfirmedBlock) Unmarshal

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

func (*ConfirmedBlock) XXX_DiscardUnknown

func (m *ConfirmedBlock) XXX_DiscardUnknown()

func (*ConfirmedBlock) XXX_Marshal

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

func (*ConfirmedBlock) XXX_Merge

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

func (*ConfirmedBlock) XXX_Size

func (m *ConfirmedBlock) XXX_Size() int

func (*ConfirmedBlock) XXX_Unmarshal

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

type Event

type Event interface {
	GetRetry() uint32
	SetRetry(retry uint32)
	GetStatus() EventStatus
	SetStatus(status EventStatus)
	GetToken() string
	Get(db store.Store) error
	Put(db store.Store) error
}

type EventERC20Deposited

type EventERC20Deposited struct {
	Id                   uint64      `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Token                string      `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
	Sender               string      `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"`
	Amount               string      `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"`
	Retry                uint32      `protobuf:"varint,5,opt,name=retry,proto3" json:"retry,omitempty"`
	Status               EventStatus `protobuf:"varint,6,opt,name=status,proto3,enum=tak1827.evmbridge.cli.EventStatus" json:"status,omitempty"`
	UpdatedAt            *time.Time  `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3,stdtime" json:"updated_at,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*EventERC20Deposited) Descriptor

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

func (*EventERC20Deposited) Equal

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

func (*EventERC20Deposited) Get

func (m *EventERC20Deposited) Get(db store.Store) error

func (*EventERC20Deposited) GetAmount

func (m *EventERC20Deposited) GetAmount() string

func (*EventERC20Deposited) GetId

func (m *EventERC20Deposited) GetId() uint64

func (*EventERC20Deposited) GetRetry

func (m *EventERC20Deposited) GetRetry() uint32

func (*EventERC20Deposited) GetSender

func (m *EventERC20Deposited) GetSender() string

func (*EventERC20Deposited) GetStatus

func (m *EventERC20Deposited) GetStatus() EventStatus

func (*EventERC20Deposited) GetToken

func (m *EventERC20Deposited) GetToken() string

func (*EventERC20Deposited) GetUpdatedAt

func (m *EventERC20Deposited) GetUpdatedAt() *time.Time

func (*EventERC20Deposited) GoString

func (this *EventERC20Deposited) GoString() string

func (*EventERC20Deposited) Marshal

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

func (*EventERC20Deposited) MarshalTo

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

func (*EventERC20Deposited) MarshalToSizedBuffer

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

func (*EventERC20Deposited) ProtoMessage

func (*EventERC20Deposited) ProtoMessage()

func (*EventERC20Deposited) Put

func (m *EventERC20Deposited) Put(db store.Store) error

func (*EventERC20Deposited) Reset

func (m *EventERC20Deposited) Reset()

func (*EventERC20Deposited) SetRetry

func (m *EventERC20Deposited) SetRetry(retry uint32)

func (*EventERC20Deposited) SetStatus

func (m *EventERC20Deposited) SetStatus(status EventStatus)

func (*EventERC20Deposited) Size

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

func (*EventERC20Deposited) StoreKey

func (m *EventERC20Deposited) StoreKey() []byte

func (*EventERC20Deposited) String

func (this *EventERC20Deposited) String() string

func (*EventERC20Deposited) Unmarshal

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

func (*EventERC20Deposited) XXX_DiscardUnknown

func (m *EventERC20Deposited) XXX_DiscardUnknown()

func (*EventERC20Deposited) XXX_Marshal

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

func (*EventERC20Deposited) XXX_Merge

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

func (*EventERC20Deposited) XXX_Size

func (m *EventERC20Deposited) XXX_Size() int

func (*EventERC20Deposited) XXX_Unmarshal

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

type EventNFTDeposited

type EventNFTDeposited struct {
	Id                   uint64      `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Token                string      `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
	Sender               string      `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"`
	Tokenid              uint64      `protobuf:"varint,4,opt,name=tokenid,proto3" json:"tokenid,omitempty"`
	Retry                uint32      `protobuf:"varint,5,opt,name=retry,proto3" json:"retry,omitempty"`
	Status               EventStatus `protobuf:"varint,6,opt,name=status,proto3,enum=tak1827.evmbridge.cli.EventStatus" json:"status,omitempty"`
	UpdatedAt            *time.Time  `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3,stdtime" json:"updated_at,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func ToEventNFTDeposited

func ToEventNFTDeposited(e *client.IBankNFTDeposited) *EventNFTDeposited

func (*EventNFTDeposited) Descriptor

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

func (*EventNFTDeposited) Equal

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

func (*EventNFTDeposited) Get

func (m *EventNFTDeposited) Get(db store.Store) error

func (*EventNFTDeposited) GetId

func (m *EventNFTDeposited) GetId() uint64

func (*EventNFTDeposited) GetRetry

func (m *EventNFTDeposited) GetRetry() uint32

func (*EventNFTDeposited) GetSender

func (m *EventNFTDeposited) GetSender() string

func (*EventNFTDeposited) GetStatus

func (m *EventNFTDeposited) GetStatus() EventStatus

func (*EventNFTDeposited) GetToken

func (m *EventNFTDeposited) GetToken() string

func (*EventNFTDeposited) GetTokenid

func (m *EventNFTDeposited) GetTokenid() uint64

func (*EventNFTDeposited) GetUpdatedAt

func (m *EventNFTDeposited) GetUpdatedAt() *time.Time

func (*EventNFTDeposited) GoString

func (this *EventNFTDeposited) GoString() string

func (*EventNFTDeposited) Marshal

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

func (*EventNFTDeposited) MarshalTo

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

func (*EventNFTDeposited) MarshalToSizedBuffer

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

func (*EventNFTDeposited) ProtoMessage

func (*EventNFTDeposited) ProtoMessage()

func (*EventNFTDeposited) Put

func (m *EventNFTDeposited) Put(db store.Store) error

func (*EventNFTDeposited) Reset

func (m *EventNFTDeposited) Reset()

func (*EventNFTDeposited) SetRetry

func (m *EventNFTDeposited) SetRetry(retry uint32)

func (*EventNFTDeposited) SetStatus

func (m *EventNFTDeposited) SetStatus(status EventStatus)

func (*EventNFTDeposited) Size

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

func (*EventNFTDeposited) StoreKey

func (m *EventNFTDeposited) StoreKey() []byte

func (*EventNFTDeposited) String

func (this *EventNFTDeposited) String() string

func (*EventNFTDeposited) Unmarshal

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

func (*EventNFTDeposited) XXX_DiscardUnknown

func (m *EventNFTDeposited) XXX_DiscardUnknown()

func (*EventNFTDeposited) XXX_Marshal

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

func (*EventNFTDeposited) XXX_Merge

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

func (*EventNFTDeposited) XXX_Size

func (m *EventNFTDeposited) XXX_Size() int

func (*EventNFTDeposited) XXX_Unmarshal

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

type EventStatus

type EventStatus int32
const (
	EventStatus_UNDEFINED EventStatus = 0
	EventStatus_FAILED    EventStatus = 1
	EventStatus_SUCCEEDED EventStatus = 2
)

func (EventStatus) EnumDescriptor

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

func (EventStatus) String

func (x EventStatus) String() string

type Pair

type Pair struct {
	Inaddr               string     `protobuf:"bytes,1,opt,name=inaddr,proto3" json:"inaddr,omitempty"`
	Outaddr              string     `protobuf:"bytes,2,opt,name=outaddr,proto3" json:"outaddr,omitempty"`
	Intype               Pair_Type  `protobuf:"varint,3,opt,name=intype,proto3,enum=tak1827.evmbridge.cli.Pair_Type" json:"intype,omitempty"`
	Outtype              Pair_Type  `protobuf:"varint,4,opt,name=outtype,proto3,enum=tak1827.evmbridge.cli.Pair_Type" json:"outtype,omitempty"`
	UpdatedAt            *time.Time `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3,stdtime" json:"updated_at,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func GetPair

func GetPair(db store.Store, inaddr string) (m Pair, err error)

func (*Pair) Descriptor

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

func (*Pair) Equal

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

func (*Pair) GetInaddr

func (m *Pair) GetInaddr() string

func (*Pair) GetIntype

func (m *Pair) GetIntype() Pair_Type

func (*Pair) GetOutaddr

func (m *Pair) GetOutaddr() string

func (*Pair) GetOuttype

func (m *Pair) GetOuttype() Pair_Type

func (*Pair) GetUpdatedAt

func (m *Pair) GetUpdatedAt() *time.Time

func (*Pair) GoString

func (this *Pair) GoString() string

func (*Pair) Marshal

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

func (*Pair) MarshalTo

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

func (*Pair) MarshalToSizedBuffer

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

func (*Pair) ProtoMessage

func (*Pair) ProtoMessage()

func (*Pair) Put

func (m *Pair) Put(db store.Store) error

func (*Pair) Reset

func (m *Pair) Reset()

func (*Pair) Size

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

func (*Pair) StoreKey

func (m *Pair) StoreKey() []byte

func (*Pair) String

func (this *Pair) String() string

func (*Pair) Unmarshal

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

func (*Pair) XXX_DiscardUnknown

func (m *Pair) XXX_DiscardUnknown()

func (*Pair) XXX_Marshal

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

func (*Pair) XXX_Merge

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

func (*Pair) XXX_Size

func (m *Pair) XXX_Size() int

func (*Pair) XXX_Unmarshal

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

type Pair_Type

type Pair_Type int32
const (
	Pair_ORIGINAL Pair_Type = 0
	Pair_WRAPPED  Pair_Type = 1
)

func (Pair_Type) EnumDescriptor

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

func (Pair_Type) String

func (x Pair_Type) String() string

Jump to

Keyboard shortcuts

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