types

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: LGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERC20EventAbi   = `` /* 580-byte string literal not displayed */
	ERC721EventAbi  = `` /* 878-byte string literal not displayed */
	ERC1155EventAbi = `` /* 1194-byte string literal not displayed */
)
View Source
const (
	ERC20   = "ERC20"
	ERC721  = "ERC721"
	ERC1155 = "ERC1155"
	Unknown = "Unknown"
)
View Source
const (
	// ERC20 | ERC721 Events
	EventTransferSignature = "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
	EventApprovalSignature = "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925"
	// ERC721 | ERC1155 Events
	EventApprovalForAllSignature = "0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31"
	// ERC1155 Events
	EventTransferSingleSignature = "0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62"
	EventTransferBatchSignature  = "0x4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb"
)
View Source
const CHAINTYPE_ETHEREUM = "ethereum"

Variables

This section is empty.

Functions

func GetAddressFromPubKey added in v0.0.2

func GetAddressFromPubKey(pubKey cryptotypes.PubKey) (string, error)

GetAddressFromPubKey returns the address of a public key

func GetERC1155Sigs

func GetERC1155Sigs() map[string]struct{}

func GetERC20Sigs

func GetERC20Sigs() map[string]struct{}

func GetERC721EnumerableSigs

func GetERC721EnumerableSigs() map[string]struct{}

func GetERC721Sigs

func GetERC721Sigs() map[string]struct{}

func PadBytes

func PadBytes(pad int, b []byte) []byte

func TrimHexZeroes added in v0.3.1

func TrimHexZeroes(s string) string

func ValidateHexString

func ValidateHexString(s string) bool

Types

type BlockByHashOutput added in v0.2.0

type BlockByHashOutput struct {
	Jsonrpc string  `json:"jsonrpc"`
	Id      int     `json:"id"`
	Result  *Header `json:"result"`
}

BlockByHashOutput is a JSON-RPC response containing a block header.

type BlockByNumberOutput added in v0.2.0

type BlockByNumberOutput struct {
	Jsonrpc string  `json:"jsonrpc"`
	Id      string  `json:"id"`
	Result  *Header `json:"result"`
	Error   *struct {
		Code    int    `json:"code"`
		Message string `json:"message"`
	} `json:"error"`
}

BlockByNumberOutput is a JSON-RPC response containing a block header. if an error occurred, the error field will be non-nil.

type BlockEventData

type BlockEventData struct {
	BlockNumber    *big.Int
	BlockHash      []byte
	Timestamp      uint64
	NftTransferred []*OwnershipTransferEvent
}

type BlockNumberOutput added in v0.2.0

type BlockNumberOutput struct {
	Jsonrpc string `json:"jsonrpc"`
	Id      int    `json:"id"`
	Result  string `json:"result"`
}

BlockNumberOutput is a JSON-RPC response containing the current block number.

type EthRpcInput added in v0.2.0

type EthRpcInput struct {
	JsonRpc string        `json:"jsonrpc"`
	Method  string        `json:"method"`
	Params  []interface{} `json:"params"`
	Id      string        `json:"id"`
}

type FilterLogOutput added in v0.2.0

type FilterLogOutput struct {
	Jsonrpc string         `json:"jsonrpc"`
	Id      string         `json:"id"`
	Result  []ethtypes.Log `json:"result"`
}
type Header struct {
	Hash      string `json:"hash"`
	Number    string `json:"number"`
	Timestamp string `json:"timestamp"`
}

Header represents a block header in the Ethereum blockchain.

type NotFoundError

type NotFoundError struct {
	// contains filtered or unexported fields
}

func NewNotFoundError

func NewNotFoundError(msg string) *NotFoundError

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

type OwnerOfOutput added in v0.2.0

type OwnerOfOutput struct {
	JsonRpc string `json:"jsonrpc"`
	Id      string `json:"id"`
	Result  string `json:"result"`
	Error   *struct {
		Code    int    `json:"code"`
		Message string `json:"message"`
	} `json:"error"`
}

type OwnershipTransferEvent

type OwnershipTransferEvent struct {
	TxId         string
	BlockNumber  uint64
	ContractAddr []byte
	To           []byte
	TokenId      *big.Int
}

type VoteDataArr added in v0.3.0

type VoteDataArr []*oracletypes.VoteData

Jump to

Keyboard shortcuts

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