flattened

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package flattened is a an on-chain light client checkpoint oracle.

Index

Constants

View Source
const (

	// 合约函数
	MusicbeeMint           = "musicbee_mint"
	MusicbeeMintWithSig    = "musicbee_mintWithSig"
	MusicbeeUpdateTokenURI = "musicbee_updateTokenURI"
	MusicbeeTransfer       = "musicbee_transfer"
	MusicbeeBurn           = "musicbee_burn"

	MusicbeeMintV2           = "musicbee_mint_v2"
	MusicbeeMintWithSigV2    = "musicbee_mintWithSig_v2"
	MusicbeeUpdateTokenURIV2 = "musicbee_updateTokenURI_v2"
	MusicbeeTransferV2       = "musicbee_transfer_v2"
	MusicbeeBurnV2           = "musicbee_burn_v2"

	LecTransfer       = "lec_transfer"
	SocialPostComment = "social_post_comment"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Media

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

Media is a Go wrapper around an on-chain checkpoint oracle contract.

func NewMedia

func NewMedia(contractAddr common.Address, backend bind.ContractBackend) (ctrt *Media, err error)

NewFlattened binds checkpoint contract and returns a registrar instance.

func (*Media) Burn

func (ctrct *Media) Burn(ctx context.Context, chainID *big.Int, from common.Address, fromPriv *ecdsa.PrivateKey, nonce *big.Int, tokenId *big.Int) (txHash, rawTx string, err error)

func (*Media) Contract

func (ctrct *Media) Contract() *contract.Media

Contract returns the underlying contract instance.

func (*Media) ContractAddr

func (ctrct *Media) ContractAddr() common.Address

ContractAddr returns the address of contract.

func (*Media) GetTokenIdByContentHash

func (ctrct *Media) GetTokenIdByContentHash(ctx context.Context, from common.Address, hash string) (string, error)

func (*Media) Mint

func (ctrct *Media) Mint(ctx context.Context, chainID *big.Int, from common.Address, fromPriv *ecdsa.PrivateKey, nonce *big.Int, tokenId *big.Int, tokenURI string, hash string) (txHash, rawTx string, err error)

func (*Media) MintForCreator

func (ctrct *Media) MintForCreator(ctx context.Context, chainID *big.Int, from common.Address, fromPriv *ecdsa.PrivateKey, to common.Address, nonce *big.Int, tokenId *big.Int, tokenURI string, hash string) (txHash, rawTx string, err error)

func (*Media) MintKs

func (ctrct *Media) MintKs(ctx context.Context, chainID *big.Int, ks *keystore.KeyStore, acc accounts.Account, nonce *big.Int, tokenId *big.Int, tokenURI string, hash string) (txHash, rawTx string, err error)

func (*Media) MintWithSig

func (ctrct *Media) MintWithSig(ctx context.Context, chainID *big.Int, from common.Address, fromPriv *ecdsa.PrivateKey, nonce *big.Int, tokenId *big.Int, tokenURI string, hash string) (txHash, rawTx string, err error)

func (*Media) Name

func (ctrct *Media) Name(ctx context.Context, from common.Address) (string, error)

func (*Media) OwnerOf

func (ctrct *Media) OwnerOf(ctx context.Context, from common.Address, tokenId *big.Int) (string, error)

func (*Media) Symbol

func (ctrct *Media) Symbol(ctx context.Context, from common.Address) (string, error)

func (*Media) TokenByIndex

func (ctrct *Media) TokenByIndex(ctx context.Context, from common.Address, index *big.Int) (string, error)

func (*Media) TokenContentHashes

func (ctrct *Media) TokenContentHashes(ctx context.Context, from common.Address, tokenId *big.Int) (string, error)

func (*Media) TokenOfOwnerByIndex

func (ctrct *Media) TokenOfOwnerByIndex(ctx context.Context, from common.Address, owner common.Address, index *big.Int) (string, error)

func (*Media) TokenURI

func (ctrct *Media) TokenURI(ctx context.Context, from common.Address, tokenId *big.Int) (string, error)

func (*Media) TransferFrom

func (ctrct *Media) TransferFrom(ctx context.Context, chainID *big.Int, from common.Address, fromPriv *ecdsa.PrivateKey, nonce *big.Int, fromx common.Address, to common.Address, tokenId *big.Int) (txHash, rawTx string, err error)

func (*Media) UpdateTokenURI

func (ctrct *Media) UpdateTokenURI(ctx context.Context, chainID *big.Int, from common.Address, fromPriv *ecdsa.PrivateKey, nonce *big.Int, tokenId *big.Int, tokenURI string) (txHash, rawTx string, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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