native

package
v3.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2019 License: LGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

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"
)

const prefix

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

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 added in v1.1.0

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 added in v1.1.0

func GasABI() *contract.Contract

GasABI generate gas.iost abi and contract

func SystemABI added in v1.1.0

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 added in v1.1.0

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 ...interface{}) (rtn []interface{}, cost contract.Cost, err error)

LoadAndCall implement

func (*Impl) Release

func (i *Impl) Release()

Release .

func (*Impl) Validate added in v1.1.0

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