corecontracts

package
v0.5.1-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

README

Core contract calls are manually written and stored here, but are not built as services. They are meant to be replaced by a library that can handle these calls dynamically in the future.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoRecord = errors.New("no request record")

Functions

This section is empty.

Types

type Accounts

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

func NewAccounts

func NewAccounts(vmService interfaces.VMService) *Accounts

func (*Accounts) GetAccountBalance

func (a *Accounts) GetAccountBalance(chainID isc.ChainID, agentID isc.AgentID) (*isc.Assets, error)

func (*Accounts) GetAccountFoundries

func (a *Accounts) GetAccountFoundries(chainID isc.ChainID, agentID isc.AgentID) ([]uint32, error)

func (*Accounts) GetAccountNFTs

func (a *Accounts) GetAccountNFTs(chainID isc.ChainID, agentID isc.AgentID) ([]iotago.NFTID, error)

func (*Accounts) GetAccountNonce

func (a *Accounts) GetAccountNonce(chainID isc.ChainID, agentID isc.AgentID) (uint64, error)

func (*Accounts) GetAccounts

func (a *Accounts) GetAccounts(chainID isc.ChainID) ([]isc.AgentID, error)

func (*Accounts) GetFoundryOutput

func (a *Accounts) GetFoundryOutput(chainID isc.ChainID, serialNumber uint32) (*iotago.FoundryOutput, error)

func (*Accounts) GetNFTData

func (a *Accounts) GetNFTData(chainID isc.ChainID, nftID iotago.NFTID) (*isc.NFT, error)

func (*Accounts) GetNativeTokenIDRegistry

func (a *Accounts) GetNativeTokenIDRegistry(chainID isc.ChainID) ([]iotago.NativeTokenID, error)

func (*Accounts) GetTotalAssets

func (a *Accounts) GetTotalAssets(chainID isc.ChainID) (*isc.Assets, error)

type Blob

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

func NewBlob

func NewBlob(vmService interfaces.VMService) *Blob

func (*Blob) GetBlobInfo

func (b *Blob) GetBlobInfo(chainID isc.ChainID, blobHash hashing.HashValue) (map[string]uint32, bool, error)

func (*Blob) GetBlobValue

func (b *Blob) GetBlobValue(chainID isc.ChainID, blobHash hashing.HashValue, key string) ([]byte, error)

func (*Blob) ListBlobs

func (b *Blob) ListBlobs(chainID isc.ChainID) (map[hashing.HashValue]uint32, error)

type BlockLog

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

func NewBlockLog

func NewBlockLog(vmService interfaces.VMService) *BlockLog

func (*BlockLog) GetBlockInfo

func (b *BlockLog) GetBlockInfo(chainID isc.ChainID, blockIndex uint32) (*blocklog.BlockInfo, error)

func (*BlockLog) GetControlAddresses

func (b *BlockLog) GetControlAddresses(chainID isc.ChainID) (*blocklog.ControlAddresses, error)

func (*BlockLog) GetEventsForBlock

func (b *BlockLog) GetEventsForBlock(chainID isc.ChainID, blockIndex uint32) ([]string, error)

func (*BlockLog) GetEventsForContract

func (b *BlockLog) GetEventsForContract(chainID isc.ChainID, contractHname isc.Hname) ([]string, error)

func (*BlockLog) GetEventsForRequest

func (b *BlockLog) GetEventsForRequest(chainID isc.ChainID, requestID isc.RequestID) ([]string, error)

func (*BlockLog) GetLatestBlockInfo

func (b *BlockLog) GetLatestBlockInfo(chainID isc.ChainID) (*blocklog.BlockInfo, error)

func (*BlockLog) GetRequestIDsForBlock

func (b *BlockLog) GetRequestIDsForBlock(chainID isc.ChainID, blockIndex uint32) ([]isc.RequestID, error)

func (*BlockLog) GetRequestIDsForLatestBlock

func (b *BlockLog) GetRequestIDsForLatestBlock(chainID isc.ChainID) ([]isc.RequestID, error)

func (*BlockLog) GetRequestReceipt

func (b *BlockLog) GetRequestReceipt(chainID isc.ChainID, requestID isc.RequestID) (*blocklog.RequestReceipt, error)

func (*BlockLog) GetRequestReceiptsForBlock

func (b *BlockLog) GetRequestReceiptsForBlock(chainID isc.ChainID, blockIndex uint32) ([]*blocklog.RequestReceipt, error)

func (*BlockLog) IsRequestProcessed

func (b *BlockLog) IsRequestProcessed(chainID isc.ChainID, requestID isc.RequestID) (bool, error)

type Errors

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

func NewErrors

func NewErrors(vmService interfaces.VMService) *Errors

func (*Errors) GetMessageFormat

func (e *Errors) GetMessageFormat(chainID isc.ChainID, contractID isc.Hname, errorID uint16) (string, error)

type Governance

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

func NewGovernance

func NewGovernance(vmService interfaces.VMService) *Governance

func (*Governance) GetAllowedStateControllerAddresses

func (g *Governance) GetAllowedStateControllerAddresses(chainID isc.ChainID) ([]iotago.Address, error)

func (*Governance) GetChainInfo

func (g *Governance) GetChainInfo(chainID isc.ChainID) (*isc.ChainInfo, error)

func (*Governance) GetChainOwner

func (g *Governance) GetChainOwner(chainID isc.ChainID) (isc.AgentID, error)

Jump to

Keyboard shortcuts

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