Documentation ¶
Index ¶
- Constants
- type Account
- type Address
- type Array
- type Boolean
- type Builtin
- type BuiltinFunction
- type Bytes
- type Contract
- type Environment
- func (e *Environment) AddBuiltin(name string, b *Builtin)
- func (e *Environment) AddBuiltins(builtins map[string]*Builtin)
- func (e *Environment) BuildArgs(envs []string)
- func (e *Environment) BuildEnvs(envs []string)
- func (e *Environment) Get(name string) (Object, bool)
- func (e *Environment) GetContract(name string) *Contract
- func (e *Environment) GetContracts() map[string]*Contract
- func (e *Environment) GetOnStatements() []*Event
- func (e *Environment) GetRPCEndpoint() (string, error)
- func (e *Environment) Set(name string, val Object) Object
- type Error
- type Event
- type Function
- type Hash
- type HashKey
- type HashPair
- type Hashable
- type Instance
- type Integer
- type Multiple
- type Null
- type Object
- type ObjectType
- type ReturnValue
- type String
Constants ¶
View Source
const ( INSTANCE_OBJ = "INSTANCE" CONTRACT_OBJ = "CONTRACT" ACCOUNT_OBJ = "ACCOUNT" MULTIPLE_OBJ = "MULTIPLE" INTEGER_OBJ = "INTEGER" BOOLEAN_OBJ = "BOOLEAN" BYTES_OBJ = "BYTES_OBJ" ADDRESS_OBJ = "ADDRESS_OBJ" NULL_OBJ = "NULL" RETURN_VALUE_OBJ = "RETURN_VALUE" ERROR_OBJ = "ERROR" FUNCTION_OBJ = "FUNCTION" EVENT_OBJ = "EVENT" STRING_OBJ = "STRING" BUILTIN_OBJ = "BUILTIN" ARRAY_OBJ = "ARRAY" HASH_OBJ = "HASH" )
View Source
const ADDRESS_SIZE = 20
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
Addr web3.Address
}
func NewAccount ¶
func (*Account) Type ¶
func (a *Account) Type() ObjectType
type Address ¶
type Address struct {
Value string
}
func (*Address) Type ¶
func (a *Address) Type() ObjectType
type Array ¶
type Array struct {
Elements []Object
}
func (*Array) Type ¶
func (ao *Array) Type() ObjectType
type Boolean ¶
type Boolean struct {
Value bool
}
func (*Boolean) Type ¶
func (b *Boolean) Type() ObjectType
type Builtin ¶
type Builtin struct {
Fn BuiltinFunction
}
func (*Builtin) Type ¶
func (b *Builtin) Type() ObjectType
type BuiltinFunction ¶
type Bytes ¶
type Bytes struct {
Value string
}
func (*Bytes) Type ¶
func (b *Bytes) Type() ObjectType
type Environment ¶
func NewEnclosedEnvironment ¶
func NewEnclosedEnvironment(outer *Environment) *Environment
func NewEnvironment ¶
func NewEnvironment() *Environment
func (*Environment) AddBuiltin ¶
func (e *Environment) AddBuiltin(name string, b *Builtin)
func (*Environment) AddBuiltins ¶
func (e *Environment) AddBuiltins(builtins map[string]*Builtin)
func (*Environment) BuildArgs ¶
func (e *Environment) BuildArgs(envs []string)
func (*Environment) BuildEnvs ¶
func (e *Environment) BuildEnvs(envs []string)
func (*Environment) GetContract ¶
func (e *Environment) GetContract(name string) *Contract
func (*Environment) GetContracts ¶
func (e *Environment) GetContracts() map[string]*Contract
func (*Environment) GetOnStatements ¶
func (e *Environment) GetOnStatements() []*Event
func (*Environment) GetRPCEndpoint ¶
func (e *Environment) GetRPCEndpoint() (string, error)
type Error ¶
type Error struct {
Message string
}
func (*Error) Type ¶
func (e *Error) Type() ObjectType
type Event ¶
type Event struct { Contract string Method string Address *web3.Address ABI *abi.ABI Parameters []*ast.OnIdentifier Body *ast.BlockStatement Env *Environment }
func (*Event) Type ¶
func (e *Event) Type() ObjectType
type Function ¶
type Function struct { Parameters []*ast.Identifier Body *ast.BlockStatement Env *Environment }
func (*Function) Type ¶
func (f *Function) Type() ObjectType
type HashKey ¶
type HashKey struct { Type ObjectType Value uint64 }
type Multiple ¶
type Multiple struct {
Values []Object
}
func (*Multiple) Type ¶
func (m *Multiple) Type() ObjectType
type Object ¶
type Object interface { Type() ObjectType Inspect() string }
type ObjectType ¶
type ObjectType string
type ReturnValue ¶
type ReturnValue struct {
Value Object
}
func (*ReturnValue) Inspect ¶
func (rv *ReturnValue) Inspect() string
func (*ReturnValue) Type ¶
func (rv *ReturnValue) Type() ObjectType
Click to show internal directories.
Click to hide internal directories.