native

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2018 License: LGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TokenInfoMapPrefix    = "TI"
	TokenBalanceMapPrefix = "TB"
	TokenFreezeMapPrefix  = "TF"
	IssuerMapField        = "issuer"
	SupplyMapField        = "supply"
	TotalSupplyMapField   = "totalSupply"
	CanTransferMapField   = "canTransfer"
	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 IOSTRatio int64 = 100000000

IOSTRatio ...

Variables

View Source
var DomainABIs *abiSet

DomainABIs list of domain abi

View Source
var GasFulfillSeconds int64 = 2 * 24 * 3600

GasFulfillSeconds it takes 2 days to fulfill the gas buffer.

View Source
var GasImmediateReward = &common.Fixed{Value: 10000 * 100, Decimal: 2}

GasImmediateReward immediate reward per IOST

View Source
var GasIncreaseRate = GasLimit.Sub(GasImmediateReward).Div(GasFulfillSeconds)

GasIncreaseRate gas increase per IOST per second

View Source
var GasLimit = &common.Fixed{Value: 30000 * 100, Decimal: 2}

GasLimit gas limit per IOST

View Source
var GasMinPledge = &common.Fixed{Value: GasMinPledgeInIOST * IOSTRatio, Decimal: 8}

GasMinPledge Every user must pledge a minimum amount of IOST (including GAS and RAM)

View Source
var GasMinPledgeInIOST int64 = 10

GasMinPledgeInIOST Every user must pledge a minimum amount of IOST

View Source
var UnpledgeFreezeSeconds int64 = 3 * 24 * 3600

UnpledgeFreezeSeconds coins will be frozen for 3 days after being unpledged

Functions

func ABI

func ABI(id string, abiSet *abiSet) *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 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 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