asc20

package
v0.0.0-...-e69715a Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EventTopicHashExchange avascriptions_protocol_TransferASC20TokenForListing (index_topic_1 address from, index_topic_2 address to, bytes32 id)
	EventTopicHashExchange = "0xe2750d6418e3719830794d3db788aa72febcd657bcd18ed8f1facdbf61a69a9a"

	// EventTopicHashExchange2 avascriptions_protocol_TransferASC20Token(index_topic_1 address, index_topic_2 address, index_topic_3 tick_idx string, amount uint256)
	// https://snowtrace.io/tx/0x71e2b9c31608f89b4e191af8817a61b3df4d74d4f829a75000c8a9e4ca67c4f2/eventlog?chainId=43114
	EventTopicHashExchange2 = "0x8cdf9e10a7b20e7a9c4e778fc3eb28f2766e438a9856a62eac39fbd2be98cbc2"
)

Variables

View Source
var ParsedABI abi.ABI

Functions

func ParseMetaDataByEventLogs

func ParseMetaDataByEventLogs(chain string, tx *xycommon.RpcTransaction) (*devents.MetaData, error)

Types

type ASC20Order

type ASC20Order struct {
	Seller  common.Address
	Creator common.Address
	ListId  [32]byte
	Ticker  string
	Amount  *big.Int
	Price   *big.Int
	Operate string
}

ASC20Order is an auto generated low-level Go binding around an user-defined struct.

type Exchange

type Exchange struct {
	Operate string
	Tick    string
	From    string
	To      string
	Amount  decimal.Decimal
}

type List

type List struct {
	Amount decimal.Decimal `json:"amt"`
}

type Protocol

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

func NewProtocol

func NewProtocol(cache *dcache.Manager) *Protocol

func (*Protocol) Exchange

func (p *Protocol) Exchange(block *xycommon.RpcBlock, tx *xycommon.RpcTransaction, omd *devents.MetaData) (items []*devents.TxResult, err *xyerrors.InsError)

func (*Protocol) List

func (*Protocol) Parse

type TransferASC20Token

type TransferASC20Token struct {
	From   common.Address `json:"from"`
	To     common.Address `json:"to"`
	Ticker common.Hash    `json:"ticker"`
	Amount *big.Int       `json:"amount"`
}

Jump to

Keyboard shortcuts

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