dbtypes

package
v0.0.0-...-0908cd3 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AllTables = []interface{}{
		&ERC20Transfer{},
		&ERC1155Transfer{},
		&FaucetClaimed{},
		&GovernorProposal{},
		&GovernorVoteCast{},
	}
)

Functions

This section is empty.

Types

type AddressList

type AddressList []common.Address

func (*AddressList) Get

func (list *AddressList) Get() []common.Address

func (*AddressList) Scan

func (list *AddressList) Scan(src interface{}) error

func (*AddressList) Value

func (list *AddressList) Value() (driver.Value, error)

type BigInt

type BigInt big.Int

func (*BigInt) Get

func (b *BigInt) Get() *big.Int

func (*BigInt) MarshalJSON

func (b *BigInt) MarshalJSON() ([]byte, error)

func (*BigInt) Scan

func (b *BigInt) Scan(src interface{}) error

func (*BigInt) UnmarshalJSON

func (b *BigInt) UnmarshalJSON(input []byte) error

func (*BigInt) Value

func (b *BigInt) Value() (driver.Value, error)

type BigIntList

type BigIntList []*big.Int

func (*BigIntList) Get

func (list *BigIntList) Get() []*big.Int

func (*BigIntList) MarshalJSON

func (list *BigIntList) MarshalJSON() ([]byte, error)

func (*BigIntList) Scan

func (list *BigIntList) Scan(src interface{}) error

func (*BigIntList) UnmarshalJSON

func (list *BigIntList) UnmarshalJSON(input []byte) error

func (*BigIntList) Value

func (list *BigIntList) Value() (driver.Value, error)

type BytesList

type BytesList [][]byte

func (*BytesList) Get

func (list *BytesList) Get() [][]byte

func (*BytesList) Scan

func (list *BytesList) Scan(src interface{}) error

func (*BytesList) Value

func (list *BytesList) Value() (driver.Value, error)

type ERC1155Transfer

type ERC1155Transfer struct {
	Raw
	Index    int            `gorm:"primaryKey"`
	Operator common.Address `gorm:"type:char(20)"`
	From     common.Address `gorm:"column:_from;type:char(20)"`
	To       common.Address `gorm:"column:_to;type:char(20)"`
	Id       *BigInt        `gorm:"type:char(32)"`
	Value    *BigInt        `gorm:"type:char(32)"`
}

type ERC20Transfer

type ERC20Transfer struct {
	Raw
	From  common.Address `gorm:"column:_from;type:char(20)"`
	To    common.Address `gorm:"column:_to;type:char(20)"`
	Value *BigInt        `gorm:"type:char(32)"`
}

type FaucetClaimed

type FaucetClaimed struct {
	Raw
	Account common.Address `gorm:"type:char(20)"`
}

type GovernorProposal

type GovernorProposal struct {
	Raw
	Active      bool           // true:Pending,Active,Succeeded; false:Canceled,Defeated,Expired,Executed
	ProposalId  *BigInt        `gorm:"type:char(32)"`
	Proposer    common.Address `gorm:"type:char(20)"`
	Targets     *AddressList
	Values      *BigIntList
	Signatures  *StringList
	Calldatas   *BytesList
	VoteStart   uint64
	VoteEnd     uint64
	Description string `gorm:"size:2048"`
}

type GovernorVoteCast

type GovernorVoteCast struct {
	Raw
	Voter      common.Address `gorm:"type:char(20)"`
	ProposalId *BigInt        `gorm:"type:char(32)"`
	Support    uint8          `gorm:"type:smallint"`
	Weight     *BigInt        `gorm:"type:char(32)"`
	Reason     string         `gorm:"size:1024"`
}

type HashList

type HashList []common.Hash

func (*HashList) Get

func (list *HashList) Get() []common.Hash

func (*HashList) Scan

func (list *HashList) Scan(src interface{}) error

func (*HashList) Value

func (list *HashList) Value() (driver.Value, error)

type IRecord

type IRecord interface {
	Do(log types.Log) func(db *gorm.DB) error
}

type Raw

type Raw struct {
	TxHash common.Hash `gorm:"primaryKey;column:tx_hash;type:char(32)"`
	Block  uint64      `gorm:"column:block_number"`
}

type StringList

type StringList []string

func (*StringList) Get

func (list *StringList) Get() []string

func (*StringList) Scan

func (list *StringList) Scan(src interface{}) error

func (*StringList) Value

func (list *StringList) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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