native

package
v3.11.5 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: LGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Token721InfoMapPrefix        = "T721I"
	Token721BalanceMapPrefix     = "T721B"
	Token721IssuerMapField       = "T721issuer"
	Token721MetadataMapPrefix    = "T721M"
	Token721MetadataKeySeparator = "#"
)

const prefix

View Source
const (
	TokenInfoMapPrefix            = "TI"
	TokenBalanceMapPrefix         = "TB"
	TokenFreezeMapPrefix          = "TF"
	IssuerMapField                = "issuer"
	SupplyMapField                = "supply"
	TotalSupplyMapField           = "totalSupply"
	CanTransferMapField           = "canTransfer"
	OnlyIssuerCanTransferMapField = "onlyIssuerCanTransfer"
	DefaultRateMapField           = "defaultRate"
	DecimalMapField               = "decimal"
	FullNameMapField              = "fullName"

	NamespacePrefix = "NS"
)

const prefix

View Source
const GasContractName = "gas.iost"

GasContractName the contract name

View Source
const UnpledgeFreezeSeconds int64 = 3 * 24 * 3600

UnpledgeFreezeSeconds coins will be frozen for 3 days after being unpledged

Variables

View Source
var (
	SystemPermission   = "system"
	TokenPermission    = "token"
	TransferPermission = "transfer"
	//ActivePermission   = "active"
	DomainPermission = "domain"

	AdminAccount = "admin"
)

permission used by native contract

Functions

func ABI

func ABI(id string, abiSet *abiSet, version string) *contract.Contract

ABI generate native abis

func CheckCost

func CheckCost(h *host.Host, cost contract.Cost) bool

CheckCost check if cost exceed gas_limit

func DomainABI

func DomainABI() *contract.Contract

DomainABI generate domain.iost abi and contract

func GasABI

func GasABI() *contract.Contract

GasABI generate gas.iost abi and contract

func SystemABI

func SystemABI() *contract.Contract

SystemABI generate system.iost abi and contract

func SystemContractABI

func SystemContractABI(conID, version string) *contract.Contract

SystemContractABI return system contract abi

func Token721ABI

func Token721ABI() *contract.Contract

Token721ABI generate token.iost abi and contract

func TokenABI

func TokenABI() *contract.Contract

TokenABI generate token.iost abi and contract

Types

type Impl

type Impl struct {
}

Impl .

func (*Impl) Compile

func (i *Impl) Compile(contract *contract.Contract) (string, error)

Compile ...

func (*Impl) Init

func (i *Impl) Init() error

Init .

func (*Impl) LoadAndCall

func (i *Impl) LoadAndCall(h *host.Host, con *contract.Contract, api string, args ...any) (rtn []any, cost contract.Cost, err error)

LoadAndCall implement

func (*Impl) Release

func (i *Impl) Release()

Release .

func (*Impl) Validate

func (i *Impl) Validate(c *contract.Contract) error

Validate ...

Jump to

Keyboard shortcuts

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