Documentation ¶
Index ¶
- Constants
- func ActivateContract(tblid int64, prefix string, active bool)
- func Compile(src, prefix string, active bool, tblid int64) error
- func CompileBlock(src, prefix string, active bool, tblid int64) (*script.Block, error)
- func CompileEval(src string, prefix uint32) error
- func EvalIf(src, prefix string, extend *map[string]interface{}) (bool, error)
- func Extend(ext *script.ExtendData)
- func ExtendCost(ext func(string) int64)
- func ExternOff()
- func Float(v interface{}) (ret float64)
- func FlushBlock(root *script.Block)
- func GetUsedContracts(name string, state uint32, full bool) []string
- func Run(block *script.Block, params []interface{}, extend *map[string]interface{}) (ret []interface{}, err error)
- func TxJSON(contract *Contract) string
- type Contract
Constants ¶
View Source
const ( // CallInit is a flag for calling init function of the contract CallInit = 0x01 // CallCondition is a flag for calling condition function of the contract CallCondition = 0x02 // CallAction is a flag for calling action function of the contract CallAction = 0x04 // CallRollback is a flag for calling rollback function of the contract CallRollback = 0x08 )
Variables ¶
This section is empty.
Functions ¶
func ActivateContract ¶
ActivateContract sets Active status of the contract in smartVM
func CompileBlock ¶
CompileBlock calls CompileBlock for smartVM
func CompileEval ¶
CompileEval calls CompileEval for smartVM
func Extend ¶
func Extend(ext *script.ExtendData)
Extend set extendeds variable and functions in smartVM
func ExtendCost ¶
ExtendCost sets the cost of calling extended obj in smartVM
func GetUsedContracts ¶
GetUsedContracts returns the list of contracts which are called from the specified contract
Types ¶
type Contract ¶
type Contract struct { Name string Called uint32 FreeRequest bool TxPrice int64 // custom price for citizens TxGovAccount int64 // state wallet EGSRate float64 // money/EGS rate TableAccounts string StackCont []string // Stack of called contracts Extend *map[string]interface{} Block *script.Block }
Contract contains the information about the contract.
func GetContract ¶
GetContract returns true if the contract exists in smartVM
func GetContractByID ¶
GetContractByID returns true if the contract exists
Click to show internal directories.
Click to hide internal directories.