interpreter

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const Fix64MaxDivisorValue = sema.Fix64Factor * sema.Fix64Factor
View Source
const Fix64MaxIntDividend = Fix64MaxValue / sema.Fix64Factor
View Source
const Fix64MaxValue = math.MaxInt64
View Source
const ResourceUUIDMemberName = "uuid"
View Source
const UFix64MaxDivisorValue = sema.Fix64Factor * sema.Fix64Factor
View Source
const UFix64MaxIntDividend = UFix64MaxValue / sema.Fix64Factor
View Source
const UFix64MaxValue = math.MaxUint64

Variables

View Source
var Fix64MulPrecision = int64(math.Sqrt(float64(sema.Fix64Factor)))
View Source
var UFix64MulPrecision = uint64(math.Sqrt(float64(sema.Fix64Factor)))

Functions

func ByteArrayValueToByteSlice added in v0.2.0

func ByteArrayValueToByteSlice(value Value) ([]byte, error)

func ByteValueToByte added in v0.2.0

func ByteValueToByte(element Value) (byte, error)

func ConvertStaticToSemaType

func ConvertStaticToSemaType(
	typ StaticType,
	getInterface func(location ast.Location, id sema.TypeID) *sema.InterfaceType,
	getComposite func(location ast.Location, id sema.TypeID) *sema.CompositeType,
) sema.Type

func IsSubType added in v0.2.0

func IsSubType(subType DynamicType, superType sema.Type) bool

func PadLeft

func PadLeft(value string, separator rune, minLength uint) string

Types

type AccountValue

type AccountValue interface {
	AddressValue() AddressValue
	// contains filtered or unexported methods
}

type AddressDynamicType

type AddressDynamicType struct{}

func (AddressDynamicType) IsDynamicType

func (AddressDynamicType) IsDynamicType()

type AddressValue

type AddressValue common.Address

func NewAddressValue

func NewAddressValue(a common.Address) AddressValue

func NewAddressValueFromBytes

func NewAddressValueFromBytes(b []byte) AddressValue

func (AddressValue) Copy

func (v AddressValue) Copy() Value

func (AddressValue) DynamicType

func (AddressValue) DynamicType(_ *Interpreter) DynamicType

func (AddressValue) Equal

func (v AddressValue) Equal(other Value) BoolValue

func (AddressValue) GetMember added in v0.3.0

func (v AddressValue) GetMember(_ *Interpreter, _ LocationRange, name string) Value

func (AddressValue) GetOwner

func (AddressValue) GetOwner() *common.Address

func (AddressValue) Hex

func (v AddressValue) Hex() string

func (AddressValue) IsModified added in v0.3.0

func (AddressValue) IsModified() bool

func (AddressValue) IsValue

func (AddressValue) IsValue()

func (AddressValue) KeyString

func (v AddressValue) KeyString() string

func (AddressValue) SetMember added in v0.3.0

func (AddressValue) SetMember(_ *Interpreter, _ LocationRange, _ string, _ Value)

func (AddressValue) SetModified added in v0.3.0

func (AddressValue) SetModified(_ bool)

func (AddressValue) SetOwner

func (AddressValue) SetOwner(_ *common.Address)

func (AddressValue) String

func (v AddressValue) String() string

func (AddressValue) ToAddress

func (v AddressValue) ToAddress() common.Address

type ArgumentCountError

type ArgumentCountError struct {
	ParameterCount int
	ArgumentCount  int
}

func (*ArgumentCountError) Error

func (e *ArgumentCountError) Error() string

type ArrayDynamicType

type ArrayDynamicType struct {
	ElementTypes []DynamicType
}

func (ArrayDynamicType) IsDynamicType

func (ArrayDynamicType) IsDynamicType()

type ArrayValue

type ArrayValue struct {
	Values []Value
	Owner  *common.Address
	// contains filtered or unexported fields
}

func ByteSliceToByteArrayValue added in v0.2.0

func ByteSliceToByteArrayValue(buf []byte) *ArrayValue

func NewArrayValueUnownedNonCopying

func NewArrayValueUnownedNonCopying(values ...Value) *ArrayValue

func (*ArrayValue) Append

func (v *ArrayValue) Append(element Value)

func (*ArrayValue) Concat

func (v *ArrayValue) Concat(other ConcatenatableValue) Value

func (*ArrayValue) Contains

func (v *ArrayValue) Contains(needleValue Value) BoolValue

func (*ArrayValue) Copy

func (v *ArrayValue) Copy() Value

func (*ArrayValue) Count

func (v *ArrayValue) Count() int

func (*ArrayValue) Destroy

func (v *ArrayValue) Destroy(interpreter *Interpreter, locationRange LocationRange) trampoline.Trampoline

func (*ArrayValue) DynamicType

func (v *ArrayValue) DynamicType(interpreter *Interpreter) DynamicType

func (*ArrayValue) Get

func (v *ArrayValue) Get(_ *Interpreter, _ LocationRange, key Value) Value

func (*ArrayValue) GetMember

func (v *ArrayValue) GetMember(_ *Interpreter, _ LocationRange, name string) Value

func (*ArrayValue) GetOwner

func (v *ArrayValue) GetOwner() *common.Address

func (*ArrayValue) Insert

func (v *ArrayValue) Insert(i int, element Value)

func (*ArrayValue) IsModified added in v0.3.0

func (v *ArrayValue) IsModified() bool

func (*ArrayValue) IsValue

func (*ArrayValue) IsValue()

func (*ArrayValue) Remove

func (v *ArrayValue) Remove(i int) Value

TODO: unset owner?

func (*ArrayValue) RemoveFirst

func (v *ArrayValue) RemoveFirst() Value

TODO: unset owner?

func (*ArrayValue) RemoveLast

func (v *ArrayValue) RemoveLast() Value

TODO: unset owner?

func (*ArrayValue) Set

func (v *ArrayValue) Set(_ *Interpreter, _ LocationRange, key Value, value Value)

func (*ArrayValue) SetIndex added in v0.2.1

func (v *ArrayValue) SetIndex(index int, value Value)

func (*ArrayValue) SetMember

func (v *ArrayValue) SetMember(_ *Interpreter, _ LocationRange, _ string, _ Value)

func (*ArrayValue) SetModified added in v0.2.1

func (v *ArrayValue) SetModified(modified bool)

func (*ArrayValue) SetOwner

func (v *ArrayValue) SetOwner(owner *common.Address)

func (*ArrayValue) String

func (v *ArrayValue) String() string

type AuthAccountDynamicType

type AuthAccountDynamicType struct{}

func (AuthAccountDynamicType) IsDynamicType

func (AuthAccountDynamicType) IsDynamicType()

type AuthAccountValue

type AuthAccountValue struct {
	Address AddressValue
	// contains filtered or unexported fields
}

func NewAuthAccountValue

func NewAuthAccountValue(
	address AddressValue,
	setCodeFunction, addPublicKeyFunction, removePublicKeyFunction FunctionValue,
) AuthAccountValue

func (AuthAccountValue) AddressValue

func (v AuthAccountValue) AddressValue() AddressValue

func (AuthAccountValue) Copy

func (v AuthAccountValue) Copy() Value

func (AuthAccountValue) Destroy

func (AuthAccountValue) DynamicType

func (AuthAccountValue) DynamicType(_ *Interpreter) DynamicType

func (AuthAccountValue) GetMember

func (v AuthAccountValue) GetMember(inter *Interpreter, _ LocationRange, name string) Value

func (AuthAccountValue) GetOwner

func (AuthAccountValue) GetOwner() *common.Address

func (AuthAccountValue) IsModified added in v0.3.0

func (AuthAccountValue) IsModified() bool

func (AuthAccountValue) IsValue

func (AuthAccountValue) IsValue()

func (AuthAccountValue) SetMember

func (AuthAccountValue) SetMember(_ *Interpreter, _ LocationRange, _ string, _ Value)

func (AuthAccountValue) SetModified added in v0.3.0

func (AuthAccountValue) SetModified(_ bool)

func (AuthAccountValue) SetOwner

func (AuthAccountValue) SetOwner(_ *common.Address)

func (AuthAccountValue) String

func (v AuthAccountValue) String() string

type BigNumberValue

type BigNumberValue interface {
	NumberValue
	ToBigInt() *big.Int
}

type BoolDynamicType

type BoolDynamicType struct{}

func (BoolDynamicType) IsDynamicType

func (BoolDynamicType) IsDynamicType()

type BoolValue

type BoolValue bool

func (BoolValue) Copy

func (v BoolValue) Copy() Value

func (BoolValue) DynamicType

func (BoolValue) DynamicType(_ *Interpreter) DynamicType

func (BoolValue) Equal

func (v BoolValue) Equal(other Value) BoolValue

func (BoolValue) GetOwner

func (BoolValue) GetOwner() *common.Address

func (BoolValue) IsModified added in v0.3.0

func (BoolValue) IsModified() bool

func (BoolValue) IsValue

func (BoolValue) IsValue()

func (BoolValue) KeyString

func (v BoolValue) KeyString() string

func (BoolValue) Negate

func (v BoolValue) Negate() BoolValue

func (BoolValue) SetModified added in v0.3.0

func (BoolValue) SetModified(_ bool)

func (BoolValue) SetOwner

func (BoolValue) SetOwner(_ *common.Address)

func (BoolValue) String

func (v BoolValue) String() string

type BoundFunctionValue

type BoundFunctionValue struct {
	Function FunctionValue
	Self     *CompositeValue
}

func (BoundFunctionValue) Copy

func (f BoundFunctionValue) Copy() Value

func (BoundFunctionValue) DynamicType

func (BoundFunctionValue) DynamicType(_ *Interpreter) DynamicType

func (BoundFunctionValue) GetOwner

func (BoundFunctionValue) GetOwner() *common.Address

func (BoundFunctionValue) Invoke

func (f BoundFunctionValue) Invoke(invocation Invocation) Trampoline

func (BoundFunctionValue) IsModified added in v0.3.0

func (BoundFunctionValue) IsModified() bool

func (BoundFunctionValue) IsValue

func (BoundFunctionValue) IsValue()

func (BoundFunctionValue) SetModified added in v0.3.0

func (BoundFunctionValue) SetModified(_ bool)

func (BoundFunctionValue) SetOwner

func (BoundFunctionValue) SetOwner(_ *common.Address)

func (BoundFunctionValue) String added in v0.2.0

func (f BoundFunctionValue) String() string

type CapabilityDynamicType

type CapabilityDynamicType struct{}

func (CapabilityDynamicType) IsDynamicType

func (CapabilityDynamicType) IsDynamicType()

type CapabilityValue

type CapabilityValue struct {
	Address AddressValue
	Path    PathValue
}

func (CapabilityValue) Copy

func (v CapabilityValue) Copy() Value

func (CapabilityValue) Destroy

func (CapabilityValue) DynamicType

func (CapabilityValue) DynamicType(_ *Interpreter) DynamicType

func (CapabilityValue) GetMember

func (v CapabilityValue) GetMember(inter *Interpreter, _ LocationRange, name string) Value

func (CapabilityValue) GetOwner

func (CapabilityValue) GetOwner() *common.Address

func (CapabilityValue) IsModified added in v0.3.0

func (CapabilityValue) IsModified() bool

func (CapabilityValue) IsValue

func (CapabilityValue) IsValue()

func (CapabilityValue) SetMember

func (CapabilityValue) SetMember(_ *Interpreter, _ LocationRange, _ string, _ Value)

func (CapabilityValue) SetModified added in v0.3.0

func (CapabilityValue) SetModified(_ bool)

func (CapabilityValue) SetOwner

func (CapabilityValue) SetOwner(_ *common.Address)

func (CapabilityValue) String

func (v CapabilityValue) String() string

type CompositeDynamicType

type CompositeDynamicType struct {
	StaticType sema.Type
}

func (CompositeDynamicType) IsDynamicType

func (CompositeDynamicType) IsDynamicType()

type CompositeStaticType

type CompositeStaticType struct {
	Location ast.Location
	TypeID   sema.TypeID
}

func (CompositeStaticType) String

func (t CompositeStaticType) String() string

type CompositeValue

type CompositeValue struct {
	Location       ast.Location
	TypeID         sema.TypeID
	Kind           common.CompositeKind
	Fields         map[string]Value
	InjectedFields map[string]Value
	NestedValues   map[string]Value
	Functions      map[string]FunctionValue
	Destructor     FunctionValue
	Owner          *common.Address
	// contains filtered or unexported fields
}

func NewCompositeValue added in v0.2.1

func NewCompositeValue(
	location ast.Location,
	typeID sema.TypeID,
	kind common.CompositeKind,
	fields map[string]Value,
	owner *common.Address,
) *CompositeValue

func (*CompositeValue) Copy

func (v *CompositeValue) Copy() Value

func (*CompositeValue) Destroy

func (v *CompositeValue) Destroy(interpreter *Interpreter, locationRange LocationRange) trampoline.Trampoline

func (*CompositeValue) DynamicType

func (v *CompositeValue) DynamicType(interpreter *Interpreter) DynamicType

func (*CompositeValue) GetField

func (v *CompositeValue) GetField(name string) Value

func (*CompositeValue) GetMember

func (v *CompositeValue) GetMember(interpreter *Interpreter, locationRange LocationRange, name string) Value

func (*CompositeValue) GetOwner

func (v *CompositeValue) GetOwner() *common.Address

func (*CompositeValue) InitializeFunctions added in v0.2.1

func (v *CompositeValue) InitializeFunctions(interpreter *Interpreter)

func (*CompositeValue) IsModified added in v0.3.0

func (v *CompositeValue) IsModified() bool

func (*CompositeValue) IsValue

func (*CompositeValue) IsValue()

func (*CompositeValue) OwnerValue

func (v *CompositeValue) OwnerValue() OptionalValue

func (*CompositeValue) SetMember

func (v *CompositeValue) SetMember(_ *Interpreter, locationRange LocationRange, name string, value Value)

func (*CompositeValue) SetModified added in v0.3.0

func (v *CompositeValue) SetModified(modified bool)

func (*CompositeValue) SetOwner

func (v *CompositeValue) SetOwner(owner *common.Address)

func (*CompositeValue) String

func (v *CompositeValue) String() string

type ConcatenatableValue

type ConcatenatableValue interface {
	Concat(other ConcatenatableValue) Value
}

type ConditionError

type ConditionError struct {
	ConditionKind ast.ConditionKind
	Message       string
	LocationRange
}

func (*ConditionError) Error

func (e *ConditionError) Error() string

type ConstantSizedStaticType

type ConstantSizedStaticType struct {
	Type StaticType
	Size int64
}

func (ConstantSizedStaticType) String

func (t ConstantSizedStaticType) String() string

type ContractValueHandlerFunc

type ContractValueHandlerFunc func(
	inter *Interpreter,
	compositeType *sema.CompositeType,
	constructor FunctionValue,
) *CompositeValue

ContractValueHandlerFunc is a function that handles contract values.

type CyclicLinkError

type CyclicLinkError struct {
	Address AddressValue
	Paths   []PathValue
	LocationRange
}

func (*CyclicLinkError) Error

func (e *CyclicLinkError) Error() string

type Decoder added in v0.2.0

type Decoder struct {
	// contains filtered or unexported fields
}

A Decoder decodes CBOR-encoded representations of values.

func NewDecoder added in v0.2.0

func NewDecoder(r io.Reader, owner *common.Address) (*Decoder, error)

NewDecoder initializes a Decoder that will decode CBOR-encoded bytes from the given io.Reader.

It sets the given address as the owner (can be `nil`).

func (*Decoder) Decode added in v0.2.0

func (d *Decoder) Decode(path []string) (Value, error)

Decode reads CBOR-encoded bytes from the io.Reader and decodes them to a value.

type DereferenceError

type DereferenceError struct {
	LocationRange
}

func (*DereferenceError) Error

func (e *DereferenceError) Error() string

type DestroyableValue

type DestroyableValue interface {
	Destroy(interpreter *Interpreter, locationRange LocationRange) trampoline.Trampoline
}

type DestroyedCompositeError

type DestroyedCompositeError struct {
	CompositeKind common.CompositeKind
	LocationRange
}

func (*DestroyedCompositeError) Error

func (e *DestroyedCompositeError) Error() string

type DictionaryDynamicType

type DictionaryDynamicType struct {
	EntryTypes []struct{ KeyType, ValueType DynamicType }
}

func (DictionaryDynamicType) IsDynamicType

func (DictionaryDynamicType) IsDynamicType()

type DictionaryEntryValues

type DictionaryEntryValues struct {
	Key   Value
	Value Value
}

type DictionaryStaticType

type DictionaryStaticType struct {
	KeyType   StaticType
	ValueType StaticType
}

func (DictionaryStaticType) String

func (t DictionaryStaticType) String() string

type DictionaryValue

type DictionaryValue struct {
	Keys    *ArrayValue
	Entries map[string]Value
	Owner   *common.Address

	// Deferral of values:
	//
	// Values in the dictionary might be deferred, i.e. are they encoded
	// separately and stored in separate storage keys.
	//
	// DeferredOwner is the account in which the deferred values are stored.
	// The account might differ from the owner: If the dictionary is moved
	// from one account to another, its owner changes, but its deferred values
	// stay stored in the deferred owner's account until the end of the transaction.
	DeferredOwner *common.Address
	// DeferredKeys are the keys which are deferred and have not been loaded from storage yet.
	DeferredKeys map[string]string
	// contains filtered or unexported fields
}

func NewDictionaryValueUnownedNonCopying

func NewDictionaryValueUnownedNonCopying(keysAndValues ...Value) *DictionaryValue

func (*DictionaryValue) Copy

func (v *DictionaryValue) Copy() Value

func (*DictionaryValue) Count

func (v *DictionaryValue) Count() int

func (*DictionaryValue) Destroy

func (v *DictionaryValue) Destroy(interpreter *Interpreter, locationRange LocationRange) trampoline.Trampoline

func (*DictionaryValue) DynamicType

func (v *DictionaryValue) DynamicType(interpreter *Interpreter) DynamicType

func (*DictionaryValue) Get

func (v *DictionaryValue) Get(inter *Interpreter, _ LocationRange, keyValue Value) Value

func (*DictionaryValue) GetMember

func (v *DictionaryValue) GetMember(_ *Interpreter, _ LocationRange, name string) Value

func (*DictionaryValue) GetOwner

func (v *DictionaryValue) GetOwner() *common.Address

func (*DictionaryValue) Insert

func (v *DictionaryValue) Insert(inter *Interpreter, locationRange LocationRange, keyValue, value Value) OptionalValue

func (*DictionaryValue) IsModified added in v0.3.0

func (v *DictionaryValue) IsModified() bool

func (*DictionaryValue) IsValue

func (*DictionaryValue) IsValue()

func (*DictionaryValue) Remove

func (v *DictionaryValue) Remove(inter *Interpreter, locationRange LocationRange, keyValue Value) OptionalValue

TODO: unset owner?

func (*DictionaryValue) Set

func (v *DictionaryValue) Set(inter *Interpreter, locationRange LocationRange, keyValue Value, value Value)

func (*DictionaryValue) SetMember

func (v *DictionaryValue) SetMember(_ *Interpreter, _ LocationRange, _ string, _ Value)

func (*DictionaryValue) SetModified added in v0.2.1

func (v *DictionaryValue) SetModified(modified bool)

func (*DictionaryValue) SetOwner

func (v *DictionaryValue) SetOwner(owner *common.Address)

func (*DictionaryValue) String

func (v *DictionaryValue) String() string

type DivisionByZeroError

type DivisionByZeroError struct{}

func (DivisionByZeroError) Error

func (e DivisionByZeroError) Error() string

type DynamicType

type DynamicType interface {
	IsDynamicType()
}

type Encoder added in v0.2.0

type Encoder struct {
	// contains filtered or unexported fields
}

Encoder converts Values into CBOR-encoded bytes.

func NewEncoder added in v0.2.0

func NewEncoder(w io.Writer, deferred bool) (*Encoder, error)

NewEncoder initializes an Encoder that will write CBOR-encoded bytes to the given io.Writer.

func (*Encoder) Encode added in v0.2.0

func (e *Encoder) Encode(
	v Value,
	path []string,
	deferrals *EncodingDeferrals,
) error

Encode writes the CBOR-encoded representation of the given value to this encoder's io.Writer.

This function returns an error if the given value's type is not supported by this encoder.

type EncodingDeferralMove added in v0.3.0

type EncodingDeferralMove struct {
	DeferredOwner      common.Address
	DeferredStorageKey string
	NewOwner           common.Address
	NewStorageKey      string
}

type EncodingDeferrals added in v0.3.0

type EncodingDeferrals struct {
	Values map[string]Value
	Moves  []EncodingDeferralMove
}

func EncodeValue added in v0.2.0

func EncodeValue(value Value, path []string, deferred bool) (
	encoded []byte,
	deferrals *EncodingDeferrals,
	err error,
)

EncodeValue returns the CBOR-encoded representation of the given value.

The given path is used to identify values in the object graph. For example, path elements are appended for array elements (the index), dictionary values (the key), and composites (the field name).

The deferred flag determines if child values should be deferred, i.e. should not be encoded into the result, but e.g. be eventually written to separate storage keys. If true, the deferrals result will contain the values which have not been encoded, and which values need to be moved from a previous storage key to another storage key.

type EphemeralReferenceDynamicType

type EphemeralReferenceDynamicType struct {
	// contains filtered or unexported fields
}

func (EphemeralReferenceDynamicType) Authorized

func (t EphemeralReferenceDynamicType) Authorized() bool

func (EphemeralReferenceDynamicType) InnerType

func (EphemeralReferenceDynamicType) IsDynamicType

func (EphemeralReferenceDynamicType) IsDynamicType()

type EphemeralReferenceValue

type EphemeralReferenceValue struct {
	Authorized bool
	Value      Value
}

func (*EphemeralReferenceValue) Copy

func (v *EphemeralReferenceValue) Copy() Value

func (*EphemeralReferenceValue) DynamicType

func (v *EphemeralReferenceValue) DynamicType(interpreter *Interpreter) DynamicType

func (*EphemeralReferenceValue) Equal

func (v *EphemeralReferenceValue) Equal(other Value) BoolValue

func (*EphemeralReferenceValue) Get

func (v *EphemeralReferenceValue) Get(interpreter *Interpreter, locationRange LocationRange, key Value) Value

func (*EphemeralReferenceValue) GetMember

func (v *EphemeralReferenceValue) GetMember(interpreter *Interpreter, locationRange LocationRange, name string) Value

func (*EphemeralReferenceValue) GetOwner

func (v *EphemeralReferenceValue) GetOwner() *common.Address

func (*EphemeralReferenceValue) IsModified added in v0.3.0

func (*EphemeralReferenceValue) IsModified() bool

func (*EphemeralReferenceValue) IsValue

func (*EphemeralReferenceValue) IsValue()

func (*EphemeralReferenceValue) Set

func (v *EphemeralReferenceValue) Set(interpreter *Interpreter, locationRange LocationRange, key Value, value Value)

func (*EphemeralReferenceValue) SetMember

func (v *EphemeralReferenceValue) SetMember(interpreter *Interpreter, locationRange LocationRange, name string, value Value)

func (*EphemeralReferenceValue) SetModified added in v0.3.0

func (*EphemeralReferenceValue) SetModified(_ bool)

func (*EphemeralReferenceValue) SetOwner

func (v *EphemeralReferenceValue) SetOwner(_ *common.Address)

type EquatableValue

type EquatableValue interface {
	Value
	Equal(other Value) BoolValue
}

type ExpressionStatementResult

type ExpressionStatementResult struct {
	Value
}

type ExternalError added in v0.3.0

type ExternalError struct {
	Recovered interface{}
}

ExternalError is an error that occurred externally. It contains the recovered value.

func (ExternalError) Error added in v0.3.0

func (e ExternalError) Error() string

type Fix64Value

type Fix64Value int64

func NewFix64ValueWithInteger added in v0.2.0

func NewFix64ValueWithInteger(integer int64) Fix64Value

func (Fix64Value) Copy

func (v Fix64Value) Copy() Value

func (Fix64Value) Div

func (v Fix64Value) Div(other NumberValue) NumberValue

func (Fix64Value) DynamicType

func (Fix64Value) DynamicType(_ *Interpreter) DynamicType

func (Fix64Value) Equal

func (v Fix64Value) Equal(other Value) BoolValue

func (Fix64Value) GetMember added in v0.3.0

func (v Fix64Value) GetMember(_ *Interpreter, _ LocationRange, name string) Value

func (Fix64Value) GetOwner

func (Fix64Value) GetOwner() *common.Address

func (Fix64Value) Greater

func (v Fix64Value) Greater(other NumberValue) BoolValue

func (Fix64Value) GreaterEqual

func (v Fix64Value) GreaterEqual(other NumberValue) BoolValue

func (Fix64Value) IsModified added in v0.3.0

func (Fix64Value) IsModified() bool

func (Fix64Value) IsValue

func (Fix64Value) IsValue()

func (Fix64Value) KeyString

func (v Fix64Value) KeyString() string

func (Fix64Value) Less

func (v Fix64Value) Less(other NumberValue) BoolValue

func (Fix64Value) LessEqual

func (v Fix64Value) LessEqual(other NumberValue) BoolValue

func (Fix64Value) Minus

func (v Fix64Value) Minus(other NumberValue) NumberValue

func (Fix64Value) Mod

func (v Fix64Value) Mod(other NumberValue) NumberValue

func (Fix64Value) Mul

func (v Fix64Value) Mul(other NumberValue) NumberValue

func (Fix64Value) Negate

func (v Fix64Value) Negate() NumberValue

func (Fix64Value) Plus

func (v Fix64Value) Plus(other NumberValue) NumberValue

func (Fix64Value) Reciprocal added in v0.2.1

func (v Fix64Value) Reciprocal() Fix64Value

func (Fix64Value) SetMember added in v0.3.0

func (Fix64Value) SetMember(_ *Interpreter, _ LocationRange, _ string, _ Value)

func (Fix64Value) SetModified added in v0.3.0

func (Fix64Value) SetModified(_ bool)

func (Fix64Value) SetOwner

func (Fix64Value) SetOwner(_ *common.Address)

func (Fix64Value) String

func (v Fix64Value) String() string

func (Fix64Value) ToInt

func (v Fix64Value) ToInt() int

type ForceAssignmentToNonNilResourceError

type ForceAssignmentToNonNilResourceError struct {
	LocationRange
}

func (*ForceAssignmentToNonNilResourceError) Error

type ForceNilError

type ForceNilError struct {
	LocationRange
}

func (*ForceNilError) Error

func (e *ForceNilError) Error() string

type FunctionDynamicType

type FunctionDynamicType struct{}

func (FunctionDynamicType) IsDynamicType

func (FunctionDynamicType) IsDynamicType()

type FunctionValue

type FunctionValue interface {
	Value

	Invoke(Invocation) Trampoline
	// contains filtered or unexported methods
}

type FunctionWrapper

type FunctionWrapper = func(inner FunctionValue) FunctionValue

type HasKeyString

type HasKeyString interface {
	KeyString() string
}

type HostFunction

type HostFunction func(invocation Invocation) Trampoline

type HostFunctionValue

type HostFunctionValue struct {
	Function HostFunction
	Members  map[string]Value
}

func NewHostFunctionValue

func NewHostFunctionValue(
	function HostFunction,
) HostFunctionValue

func (HostFunctionValue) Copy

func (f HostFunctionValue) Copy() Value

func (HostFunctionValue) DynamicType

func (HostFunctionValue) DynamicType(_ *Interpreter) DynamicType

func (HostFunctionValue) GetMember

func (f HostFunctionValue) GetMember(_ *Interpreter, _ LocationRange, name string) Value

func (HostFunctionValue) GetOwner

func (HostFunctionValue) GetOwner() *common.Address

func (HostFunctionValue) Invoke

func (f HostFunctionValue) Invoke(invocation Invocation) Trampoline

func (HostFunctionValue) IsModified added in v0.3.0

func (HostFunctionValue) IsModified() bool

func (HostFunctionValue) IsValue

func (HostFunctionValue) IsValue()

func (HostFunctionValue) SetMember

func (f HostFunctionValue) SetMember(_ *Interpreter, _ LocationRange, _ string, _ Value)

func (HostFunctionValue) SetModified added in v0.3.0

func (HostFunctionValue) SetModified(_ bool)

func (HostFunctionValue) SetOwner

func (HostFunctionValue) SetOwner(_ *common.Address)

func (HostFunctionValue) String added in v0.2.0

func (f HostFunctionValue) String() string

type ImportProgramHandlerFunc

type ImportProgramHandlerFunc func(
	inter *Interpreter,
	location ast.Location,
) *ast.Program

ImportProgramHandlerFunc is a function that handles imports of programs.

type InjectedCompositeFieldsHandlerFunc

type InjectedCompositeFieldsHandlerFunc func(
	inter *Interpreter,
	location ast.Location,
	typeID sema.TypeID,
	compositeKind common.CompositeKind,
) map[string]Value

InjectedCompositeFieldsHandlerFunc is a function that handles storage reads.

type Int128Value

type Int128Value struct {
	BigInt *big.Int
}

func NewInt128ValueFromBigInt

func NewInt128ValueFromBigInt(value *big.Int) Int128Value

func NewInt128ValueFromInt64

func NewInt128ValueFromInt64(value int64) Int128Value

func (Int128Value) BitwiseAnd added in v0.2.0

func (v Int128Value) BitwiseAnd(other IntegerValue) IntegerValue

func (Int128Value) BitwiseLeftShift added in v0.2.0

func (v Int128Value) BitwiseLeftShift(other IntegerValue) IntegerValue

func (Int128Value) BitwiseOr added in v0.2.0

func (v Int128Value) BitwiseOr(other IntegerValue) IntegerValue

func (Int128Value) BitwiseRightShift added in v0.2.0

func (v Int128Value) BitwiseRightShift(other IntegerValue) IntegerValue

func (Int128Value) BitwiseXor added in v0.2.0

func (v Int128Value) BitwiseXor(other IntegerValue) IntegerValue

func (Int128Value) Copy

func (v Int128Value) Copy() Value

func (Int128Value) Div

func (v Int128Value) Div(other NumberValue) NumberValue

func (Int128Value) DynamicType

func (Int128Value) DynamicType(_ *Interpreter) DynamicType

func (Int128Value) Equal

func (v Int128Value) Equal(other Value) BoolValue

func (Int128Value) GetMember added in v0.3.0

func (v Int128Value) GetMember(_ *Interpreter, _ LocationRange, name string) Value

func (Int128Value) GetOwner

func (Int128Value) GetOwner() *common.Address

func (Int128Value) Greater

func (v Int128Value) Greater(other NumberValue) BoolValue

func (Int128Value) GreaterEqual

func (v Int128Value) GreaterEqual(other NumberValue) BoolValue

func (Int128Value) IsModified added in v0.3.0

func (Int128Value) IsModified() bool

func (Int128Value) IsValue

func (v Int128Value) IsValue()

func (Int128Value) KeyString

func (v Int128Value) KeyString() string

func (Int128Value) Less

func (v Int128Value) Less(other NumberValue) BoolValue

func (Int128Value) LessEqual

func (v Int128Value) LessEqual(other NumberValue) BoolValue

func (Int128Value) Minus

func (v Int128Value) Minus(other NumberValue) NumberValue

func (Int128Value) Mod

func (v Int128Value) Mod(other NumberValue) NumberValue

func (Int128Value) Mul

func (v Int128Value) Mul(other NumberValue) NumberValue

func (Int128Value) Negate

func (v Int128Value) Negate() NumberValue

func (Int128Value) Plus

func (v Int128Value) Plus(other NumberValue) NumberValue

func (Int128Value) SetMember added in v0.3.0

func (Int128Value) SetMember(_ *Interpreter, _ LocationRange, _ string, _ Value)

func (Int128Value) SetModified added in v0.3.0

func (Int128Value) SetModified(_ bool)

func (Int128Value) SetOwner

func (Int128Value) SetOwner(_ *common.Address)

func (Int128Value) String

func (v Int128Value) String() string

func (Int128Value) ToBigInt

func (v Int128Value) ToBigInt() *big.Int

func (Int128Value) ToInt

func (v Int128Value) ToInt() int

type Int16Value

type Int16Value int16

func (Int16Value) BitwiseAnd added in v0.2.0

func (v Int16Value) BitwiseAnd(other IntegerValue) IntegerValue

func (Int16Value) BitwiseLeftShift added in v0.2.0

func (v Int16Value) BitwiseLeftShift(other IntegerValue) IntegerValue

func (Int16Value) BitwiseOr added in v0.2.0

func (v Int16Value) BitwiseOr(other IntegerValue) IntegerValue

func (Int16Value) BitwiseRightShift added in v0.2.0

func (v Int16Value) BitwiseRightShift(other IntegerValue) IntegerValue

func (Int16Value) BitwiseXor added in v0.2.0

func (v Int16Value) BitwiseXor(other IntegerValue) IntegerValue

func (Int16Value) Copy

func (v Int16Value) Copy() Value

func (Int16Value) Div

func (v Int16Value) Div(other NumberValue) NumberValue

func (Int16Value) DynamicType

func (Int16Value) DynamicType(_ *Interpreter) DynamicType

func (Int16Value) Equal

func (v Int16Value) Equal(other Value) BoolValue

func (Int16Value) GetMember added in v0.3.0

func (v Int16Value) GetMember(_ *Interpreter, _ LocationRange, name string) Value

func (Int16Value) GetOwner

func (Int16Value) GetOwner() *common.Address

func (Int16Value) Greater

func (v Int16Value) Greater(other NumberValue) BoolValue

func (Int16Value) GreaterEqual

func (v Int16Value) GreaterEqual(other NumberValue) BoolValue

func (Int16Value) IsModified added in v0.3.0

func (Int16Value) IsModified() bool

func (Int16Value) IsValue

func (Int16Value) IsValue()

func (Int16Value) KeyString

func (v Int16Value) KeyString() string

func (Int16Value) Less

func (v Int16Value) Less(other NumberValue) BoolValue

func (Int16Value) LessEqual

func (v Int16Value) LessEqual(other NumberValue) BoolValue

func (Int16Value) Minus

func (v Int16Value) Minus(other NumberValue) NumberValue

func (Int16Value) Mod

func (v Int16Value) Mod(other NumberValue) NumberValue

func (Int16Value) Mul

func (v Int16Value) Mul(other NumberValue) NumberValue

func (Int16Value) Negate

func (v Int16Value) Negate() NumberValue

func (Int16Value) Plus

func (v Int16Value) Plus(other NumberValue) NumberValue

func (Int16Value) SetMember added in v0.3.0

func (Int16Value) SetMember(_ *Interpreter, _ LocationRange, _ string, _ Value)

func (Int16Value) SetModified added in v0.3.0

func (Int16Value) SetModified(_ bool)

func (Int16Value) SetOwner

func (Int16Value) SetOwner(_ *common.Address)

func (Int16Value) String

func (v Int16Value) String() string

func (Int16Value) ToInt

func (v Int16Value) ToInt() int

type Int256Value

type Int256Value struct {
	BigInt *big.Int
}

func NewInt256ValueFromBigInt

func NewInt256ValueFromBigInt(value *big.Int) Int256Value

func NewInt256ValueFromInt64

func NewInt256ValueFromInt64(value int64) Int256Value

func (Int256Value) BitwiseAnd added in v0.2.0

func (v Int256Value) BitwiseAnd(other IntegerValue) IntegerValue

func (Int256Value) BitwiseLeftShift added in v0.2.0

func (v Int256Value) BitwiseLeftShift(other IntegerValue) IntegerValue

func (Int256Value) BitwiseOr added in v0.2.0

func (v Int256Value) BitwiseOr(other IntegerValue) IntegerValue

func (Int256Value) BitwiseRightShift added in v0.2.0

func (v Int256Value) BitwiseRightShift(other IntegerValue) IntegerValue

func (Int256Value) BitwiseXor added in v0.2.0

func (v Int256Value) BitwiseXor(other IntegerValue) IntegerValue

func (Int256Value) Copy

func (v Int256Value) Copy() Value

func (Int256Value) Div

func (v Int256Value) Div(other NumberValue) NumberValue

func (Int256Value) DynamicType

func (Int256Value) DynamicType(_ *Interpreter) DynamicType

func (Int256Value) Equal

func (v Int256Value) Equal(other Value) BoolValue

func (Int256Value) GetMember added in v0.3.0

func (v Int256Value) GetMember(_ *Interpreter, _ LocationRange, name string) Value

func (Int256Value) GetOwner

func (Int256Value) GetOwner() *common.Address

func (Int256Value) Greater

func (v Int256Value) Greater(other NumberValue) BoolValue

func (Int256Value) GreaterEqual

func (v Int256Value) GreaterEqual(other NumberValue) BoolValue

func (Int256Value) IsModified added in v0.3.0

func (Int256Value) IsModified() bool

func (Int256Value) IsValue

func (v Int256Value) IsValue()

func (Int256Value) KeyString

func (v Int256Value) KeyString() string

func (Int256Value) Less

func (v Int256Value) Less(other NumberValue) BoolValue

func (Int256Value) LessEqual

func (v Int256Value) LessEqual(other NumberValue) BoolValue

func (Int256Value) Minus

func (v Int256Value) Minus(other NumberValue) NumberValue

func (Int256Value) Mod

func (v Int256Value) Mod(other NumberValue) NumberValue

func (Int256Value) Mul

func (v Int256Value) Mul(other NumberValue) NumberValue

func (Int256Value) Negate

func (v Int256Value) Negate() NumberValue

func (Int256Value) Plus

func (v Int256Value) Plus(other NumberValue) NumberValue

func (Int256Value) SetMember added in v0.3.0

func (Int256Value) SetMember(_ *Interpreter, _ LocationRange, _ string, _ Value)

func (Int256Value) SetModified added in v0.3.0

func (Int256Value) SetModified(_ bool)

func (Int256Value) SetOwner

func (Int256Value) SetOwner(_ *common.Address)

func (Int256Value) String

func (v Int256Value) String() string

func (Int256Value) ToBigInt

func (v Int256Value) ToBigInt() *big.Int

func (Int256Value) ToInt

func (v Int256Value) ToInt() int

type Int32Value

type Int32Value int32

func (Int32Value) BitwiseAnd added in v0.2.0

func (v Int32Value) BitwiseAnd(other IntegerValue) IntegerValue

func (Int32Value) BitwiseLeftShift added in v0.2.0

func (v Int32Value) BitwiseLeftShift(other IntegerValue) IntegerValue

func (Int32Value) BitwiseOr added in v0.2.0

func (v Int32Value) BitwiseOr(other IntegerValue) IntegerValue

func (Int32Value) BitwiseRightShift added in v0.2.0

func (v Int32Value) BitwiseRightShift(other IntegerValue) IntegerValue

func (Int32Value) BitwiseXor added in v0.2.0

func (v Int32Value) BitwiseXor(other IntegerValue) IntegerValue

func (Int32Value) Copy

func (v Int32Value) Copy() Value

func (Int32Value) Div

func (v Int32Value) Div(other NumberValue) NumberValue

func (Int32Value) DynamicType

func (Int32Value) DynamicType(_ *Interpreter) DynamicType

func (Int32Value) Equal

func (v Int32Value) Equal(other Value) BoolValue

func (Int32Value) GetMember added in v0.3.0

func (v Int32Value) GetMember(_ *Interpreter, _ LocationRange, name string) Value

func (Int32Value) GetOwner

func (Int32Value) GetOwner() *common.Address

func (Int32Value) Greater

func (v Int32Value) Greater(other NumberValue) BoolValue

func (Int32Value) GreaterEqual

func (v Int32Value) GreaterEqual(other NumberValue) BoolValue

func (Int32Value) IsModified added in v0.3.0

func (Int32Value) IsModified() bool

func (Int32Value) IsValue

func (Int32Value) IsValue()

func (Int32Value) KeyString

func (v Int32Value) KeyString() string

func (Int32Value) Less

func (v Int32Value) Less(other NumberValue) BoolValue

func (Int32Value) LessEqual

func (v Int32Value) LessEqual(other NumberValue) BoolValue

func (Int32Value) Minus

func (v Int32Value) Minus(other NumberValue) NumberValue

func (Int32Value) Mod

func (v Int32Value) Mod(other NumberValue) NumberValue

func (Int32Value) Mul

func (v Int32Value) Mul(other NumberValue) NumberValue

func (Int32Value) Negate

func (v Int32Value) Negate() NumberValue

func (Int32Value) Plus

func (v Int32Value) Plus(other NumberValue) NumberValue

func (Int32Value) SetMember added in v0.3.0

func (Int32Value) SetMember(_ *Interpreter, _ LocationRange, _ string, _ Value)

func (Int32Value) SetModified added in v0.3.0

func (Int32Value) SetModified(_ bool)

func (Int32Value) SetOwner

func (Int32Value) SetOwner(_ *common.Address)

func (Int32Value) String

func (v Int32Value) String() string

func (Int32Value) ToInt

func (v Int32Value) ToInt() int

type Int64Value

type Int64Value int64

func (Int64Value) BitwiseAnd added in v0.2.0

func (v Int64Value) BitwiseAnd(other IntegerValue) IntegerValue

func (Int64Value) BitwiseLeftShift added in v0.2.0

func (v Int64Value) BitwiseLeftShift(other IntegerValue) IntegerValue

func (Int64Value) BitwiseOr added in v0.2.0

func (v Int64Value) BitwiseOr(other IntegerValue) IntegerValue

func (Int64Value) BitwiseRightShift added in v0.2.0

func (v Int64Value) BitwiseRightShift(other IntegerValue) IntegerValue

func (Int64Value) BitwiseXor added in v0.2.0

func (v Int64Value) BitwiseXor(other IntegerValue) IntegerValue

func (Int64Value) Copy

func (v Int64Value) Copy() Value

func (Int64Value) Div

func (v Int64Value) Div(other NumberValue) NumberValue

func (Int64Value) DynamicType

func (Int64Value) DynamicType(_ *Interpreter) DynamicType

func (Int64Value) Equal

func (v Int64Value) Equal(other Value) BoolValue

func (Int64Value) GetMember added in v0.3.0

func (v Int64Value) GetMember(_ *Interpreter, _ LocationRange, name string) Value

func (Int64Value) GetOwner

func (Int64Value) GetOwner() *common.Address

func (Int64Value) Greater

func (v Int64Value) Greater(other NumberValue) BoolValue

func (Int64Value) GreaterEqual

func (v Int64Value) GreaterEqual(other NumberValue) BoolValue

func (Int64Value) IsModified added in v0.3.0

func (Int64Value) IsModified() bool

func (Int64Value) IsValue

func (Int64Value) IsValue()

func (Int64Value) KeyString

func (v Int64Value) KeyString() string

func (Int64Value) Less

func (v Int64Value) Less(other NumberValue) BoolValue

func (Int64Value) LessEqual

func (v Int64Value) LessEqual(other NumberValue) BoolValue

func (Int64Value) Minus

func (v Int64Value) Minus(other NumberValue) NumberValue

func (Int64Value) Mod

func (v Int64Value) Mod(other NumberValue) NumberValue

func (Int64Value) Mul

func (v Int64Value) Mul(other NumberValue) NumberValue

func (Int64Value) Negate

func (v Int64Value) Negate() NumberValue

func (Int64Value) Plus

func (v Int64Value) Plus(other NumberValue) NumberValue

func (Int64Value) SetMember added in v0.3.0

func (Int64Value) SetMember(_ *Interpreter, _ LocationRange, _ string, _ Value)

func (Int64Value) SetModified added in v0.3.0

func (Int64Value) SetModified(_ bool)

func (Int64Value) SetOwner

func (Int64Value) SetOwner(_ *common.Address)

func (Int64Value) String

func (v Int64Value) String() string

func (Int64Value) ToInt

func (v Int64Value) ToInt() int

type Int8Value

type Int8Value int8

func (Int8Value) BitwiseAnd added in v0.2.0

func (v Int8Value) BitwiseAnd(other IntegerValue) IntegerValue

func (Int8Value) BitwiseLeftShift added in v0.2.0

func (v Int8Value) BitwiseLeftShift(other IntegerValue) IntegerValue

func (Int8Value) BitwiseOr added in v0.2.0

func (v Int8Value) BitwiseOr(other IntegerValue) IntegerValue

func (Int8Value) BitwiseRightShift added in v0.2.0

func (v Int8Value) BitwiseRightShift(other IntegerValue) IntegerValue

func (Int8Value) BitwiseXor added in v0.2.0

func (v Int8Value) BitwiseXor(other IntegerValue) IntegerValue

func (Int8Value) Copy

func (v Int8Value) Copy() Value

func (Int8Value) Div

func (v Int8Value) Div(other NumberValue) NumberValue

func (Int8Value) DynamicType

func (Int8Value) DynamicType(_ *Interpreter) DynamicType

func (Int8Value) Equal

func (v Int8Value) Equal(other Value) BoolValue

func (Int8Value) GetMember added in v0.3.0

func (v Int8Value) GetMember(_ *Interpreter, _ LocationRange, name string) Value

func (Int8Value) GetOwner

func (Int8Value) GetOwner() *common.Address

func (Int8Value) Greater

func (v Int8Value) Greater(other NumberValue) BoolValue

func (Int8Value) GreaterEqual

func (v Int8Value) GreaterEqual(other NumberValue) BoolValue

func (Int8Value) IsModified added in v0.3.0

func (Int8Value) IsModified() bool

func (Int8Value) IsValue

func (Int8Value) IsValue()

func (Int8Value) KeyString

func (v Int8Value) KeyString() string

func (Int8Value) Less

func (v Int8Value) Less(other NumberValue) BoolValue

func (Int8Value) LessEqual

func (v Int8Value) LessEqual(other NumberValue) BoolValue

func (Int8Value) Minus

func (v Int8Value) Minus(other NumberValue) NumberValue

func (Int8Value) Mod

func (v Int8Value) Mod(other NumberValue) NumberValue

func (Int8Value) Mul

func (v Int8Value) Mul(other NumberValue) NumberValue

func (Int8Value) Negate

func (v Int8Value) Negate() NumberValue

func (Int8Value) Plus

func (v Int8Value) Plus(other NumberValue) NumberValue

func (Int8Value) SetMember added in v0.3.0

func (Int8Value) SetMember(_ *Interpreter, _ LocationRange, _ string, _ Value)

func (Int8Value) SetModified added in v0.3.0

func (Int8Value) SetModified(_ bool)

func (Int8Value) SetOwner

func (Int8Value) SetOwner(_ *common.Address)

func (Int8Value) String

func (v Int8Value) String() string

func (Int8Value) ToInt

func (v Int8Value) ToInt() int

type IntValue

type IntValue struct {
	BigInt *big.Int
}

func NewIntValueFromBigInt

func NewIntValueFromBigInt(value *big.Int) IntValue

func NewIntValueFromInt64

func NewIntValueFromInt64(value int64) IntValue

func (IntValue) BitwiseAnd added in v0.2.0

func (v IntValue) BitwiseAnd(other IntegerValue) IntegerValue

func (IntValue) BitwiseLeftShift added in v0.2.0

func (v IntValue) BitwiseLeftShift(other IntegerValue) IntegerValue

func (IntValue) BitwiseOr added in v0.2.0

func (v IntValue) BitwiseOr(other IntegerValue) IntegerValue

func (IntValue) BitwiseRightShift added in v0.2.0

func (v IntValue) BitwiseRightShift(other IntegerValue) IntegerValue

func (IntValue) BitwiseXor added in v0.2.0

func (v IntValue) BitwiseXor(other IntegerValue) IntegerValue

func (IntValue) Copy

func (v IntValue) Copy() Value

func (IntValue) Div

func (v IntValue) Div(other NumberValue) NumberValue

func (IntValue) DynamicType

func (IntValue) DynamicType(_ *Interpreter) DynamicType

func (IntValue) Equal

func (v IntValue) Equal(other Value) BoolValue

func (IntValue) GetMember added in v0.3.0

func (v IntValue) GetMember(_ *Interpreter, _ LocationRange, name string) Value

func (IntValue) GetOwner

func (IntValue) GetOwner() *common.Address

func (IntValue) Greater

func (v IntValue) Greater(other NumberValue) BoolValue

func (IntValue) GreaterEqual

func (v IntValue) GreaterEqual(other NumberValue) BoolValue

func (IntValue) IsModified added in v0.3.0

func (IntValue) IsModified() bool

func (IntValue) IsValue

func (v IntValue) IsValue()

func (IntValue) KeyString

func (v IntValue) KeyString() string

func (IntValue) Less

func (v IntValue) Less(other NumberValue) BoolValue

func (IntValue) LessEqual

func (v IntValue) LessEqual(other NumberValue) BoolValue

func (IntValue) Minus

func (v IntValue) Minus(other NumberValue) NumberValue

func (IntValue) Mod

func (v IntValue) Mod(other NumberValue) NumberValue

func (IntValue) Mul

func (v IntValue) Mul(other NumberValue) NumberValue

func (IntValue) Negate

func (v IntValue) Negate() NumberValue

func (IntValue) Plus

func (v IntValue) Plus(other NumberValue) NumberValue

func (IntValue) SetMember added in v0.3.0

func (IntValue) SetMember(_ *Interpreter, _ LocationRange, _ string, _ Value)

func (IntValue) SetModified added in v0.3.0

func (IntValue) SetModified(_ bool)

func (IntValue) SetOwner

func (IntValue) SetOwner(_ *common.Address)

func (IntValue) String

func (v IntValue) String() string

func (IntValue) ToBigInt

func (v IntValue) ToBigInt() *big.Int

func (IntValue) ToInt

func (v IntValue) ToInt() int

type IntegerValue added in v0.2.0

type IntegerValue interface {
	NumberValue
	BitwiseOr(other IntegerValue) IntegerValue
	BitwiseXor(other IntegerValue) IntegerValue
	BitwiseAnd(other IntegerValue) IntegerValue
	BitwiseLeftShift(other IntegerValue) IntegerValue
	BitwiseRightShift(other IntegerValue) IntegerValue
}

type InterfaceStaticType

type InterfaceStaticType struct {
	Location ast.Location
	TypeID   sema.TypeID
}

func (InterfaceStaticType) String

func (t InterfaceStaticType) String() string

type InterpretedFunctionValue

type InterpretedFunctionValue struct {
	Interpreter      *Interpreter
	ParameterList    *ast.ParameterList
	Type             *sema.FunctionType
	Activation       hamt.Map
	BeforeStatements []ast.Statement
	PreConditions    ast.Conditions
	Statements       []ast.Statement
	PostConditions   ast.Conditions
}

func (InterpretedFunctionValue) Copy

func (InterpretedFunctionValue) DynamicType

func (InterpretedFunctionValue) GetOwner

func (InterpretedFunctionValue) Invoke

func (f InterpretedFunctionValue) Invoke(invocation Invocation) Trampoline

func (InterpretedFunctionValue) IsModified added in v0.3.0

func (InterpretedFunctionValue) IsModified() bool

func (InterpretedFunctionValue) IsValue

func (InterpretedFunctionValue) IsValue()

func (InterpretedFunctionValue) SetModified added in v0.3.0

func (InterpretedFunctionValue) SetModified(_ bool)

func (InterpretedFunctionValue) SetOwner

func (InterpretedFunctionValue) String added in v0.2.0

func (f InterpretedFunctionValue) String() string

type Interpreter

type Interpreter struct {
	Checker          *sema.Checker
	PredefinedValues map[string]Value

	Globals map[string]*Variable

	Transactions []*HostFunctionValue
	// contains filtered or unexported fields
}

func NewInterpreter

func NewInterpreter(checker *sema.Checker, options ...Option) (*Interpreter, error)

func (*Interpreter) ImportValue

func (interpreter *Interpreter) ImportValue(name string, value Value) error

NOTE: consider using NewInterpreter if the value should be predefined in all programs

func (*Interpreter) Interpret

func (interpreter *Interpreter) Interpret() (err error)

func (*Interpreter) Invoke

func (interpreter *Interpreter) Invoke(functionName string, arguments ...Value) (value Value, err error)

func (*Interpreter) InvokeFunctionValue

func (interpreter *Interpreter) InvokeFunctionValue(
	function FunctionValue,
	arguments []Value,
	argumentTypes []sema.Type,
	parameterTypes []sema.Type,
	invocationRange ast.Range,
) (value Value, err error)

func (*Interpreter) InvokeTransaction

func (interpreter *Interpreter) InvokeTransaction(index int, arguments ...Value) (err error)

func (*Interpreter) SetAllCheckers

func (interpreter *Interpreter) SetAllCheckers(allCheckers map[ast.LocationID]*sema.Checker)

SetAllCheckers sets the given map of checkers as the map of all checkers.

func (*Interpreter) SetAllInterpreters

func (interpreter *Interpreter) SetAllInterpreters(allInterpreters map[ast.LocationID]*Interpreter)

SetAllInterpreters sets the given map of interpreters as the map of all interpreters.

func (*Interpreter) SetContractValueHandler

func (interpreter *Interpreter) SetContractValueHandler(function ContractValueHandlerFunc)

SetContractValueHandler sets the function that is used to handle imports of values

func (*Interpreter) SetImportProgramHandler

func (interpreter *Interpreter) SetImportProgramHandler(function ImportProgramHandlerFunc)

SetImportProgramHandler sets the function that is used to handle imports of programs.

func (*Interpreter) SetInjectedCompositeFieldsHandler

func (interpreter *Interpreter) SetInjectedCompositeFieldsHandler(function InjectedCompositeFieldsHandlerFunc)

SetInjectedCompositeFieldsHandler sets the function that is used to initialize new composite values' fields

func (*Interpreter) SetOnEventEmittedHandler

func (interpreter *Interpreter) SetOnEventEmittedHandler(function OnEventEmittedFunc)

SetOnEventEmittedHandler sets the function that is triggered when an event is emitted by the program.

func (*Interpreter) SetOnFunctionInvocationHandler added in v0.2.0

func (interpreter *Interpreter) SetOnFunctionInvocationHandler(function OnFunctionInvocationFunc)

SetOnFunctionInvocationHandler sets the function that is triggered when a loop iteration is about to be executed.

func (*Interpreter) SetOnLoopIterationHandler added in v0.2.0

func (interpreter *Interpreter) SetOnLoopIterationHandler(function OnLoopIterationFunc)

SetOnLoopIterationHandler sets the function that is triggered when a loop iteration is about to be executed.

func (*Interpreter) SetOnStatementHandler

func (interpreter *Interpreter) SetOnStatementHandler(function OnStatementFunc)

SetOnStatementHandler sets the function that is triggered when a statement is about to be executed.

func (*Interpreter) SetStorageExistenceHandler

func (interpreter *Interpreter) SetStorageExistenceHandler(function StorageExistenceHandlerFunc)

SetStorageExistenceHandler sets the function that is used when a storage key is checked for existence.

func (*Interpreter) SetStorageKeyHandler

func (interpreter *Interpreter) SetStorageKeyHandler(function StorageKeyHandlerFunc)

SetStorageKeyHandler sets the function that is used when a storage is indexed.

func (*Interpreter) SetStorageReadHandler

func (interpreter *Interpreter) SetStorageReadHandler(function StorageReadHandlerFunc)

SetStorageReadHandler sets the function that is used when a stored value is read.

func (*Interpreter) SetStorageWriteHandler

func (interpreter *Interpreter) SetStorageWriteHandler(function StorageWriteHandlerFunc)

SetStorageWriteHandler sets the function that is used when a stored value is written.

func (*Interpreter) SetUUIDHandler

func (interpreter *Interpreter) SetUUIDHandler(function UUIDHandlerFunc)

SetUUIDHandler sets the function that is used to handle the generation of UUIDs.

func (*Interpreter) VisitArrayExpression

func (interpreter *Interpreter) VisitArrayExpression(expression *ast.ArrayExpression) ast.Repr

func (*Interpreter) VisitAssignmentStatement

func (interpreter *Interpreter) VisitAssignmentStatement(assignment *ast.AssignmentStatement) ast.Repr

func (*Interpreter) VisitBinaryExpression

func (interpreter *Interpreter) VisitBinaryExpression(expression *ast.BinaryExpression) ast.Repr

func (*Interpreter) VisitBlock

func (interpreter *Interpreter) VisitBlock(block *ast.Block) ast.Repr

func (*Interpreter) VisitBoolExpression

func (interpreter *Interpreter) VisitBoolExpression(expression *ast.BoolExpression) ast.Repr

func (*Interpreter) VisitBreakStatement

func (interpreter *Interpreter) VisitBreakStatement(_ *ast.BreakStatement) ast.Repr

func (*Interpreter) VisitCastingExpression

func (interpreter *Interpreter) VisitCastingExpression(expression *ast.CastingExpression) ast.Repr

func (*Interpreter) VisitCompositeDeclaration

func (interpreter *Interpreter) VisitCompositeDeclaration(declaration *ast.CompositeDeclaration) ast.Repr

NOTE: only called for top-level composite declarations

func (*Interpreter) VisitCondition

func (interpreter *Interpreter) VisitCondition(condition *ast.Condition) ast.Repr

func (*Interpreter) VisitConditionalExpression

func (interpreter *Interpreter) VisitConditionalExpression(expression *ast.ConditionalExpression) ast.Repr

func (*Interpreter) VisitContinueStatement

func (interpreter *Interpreter) VisitContinueStatement(_ *ast.ContinueStatement) ast.Repr

func (*Interpreter) VisitCreateExpression

func (interpreter *Interpreter) VisitCreateExpression(expression *ast.CreateExpression) ast.Repr

func (*Interpreter) VisitDestroyExpression

func (interpreter *Interpreter) VisitDestroyExpression(expression *ast.DestroyExpression) ast.Repr

func (*Interpreter) VisitDictionaryExpression

func (interpreter *Interpreter) VisitDictionaryExpression(expression *ast.DictionaryExpression) ast.Repr

func (*Interpreter) VisitEmitStatement

func (interpreter *Interpreter) VisitEmitStatement(statement *ast.EmitStatement) ast.Repr

func (*Interpreter) VisitExpressionStatement

func (interpreter *Interpreter) VisitExpressionStatement(statement *ast.ExpressionStatement) ast.Repr

func (*Interpreter) VisitFieldDeclaration

func (interpreter *Interpreter) VisitFieldDeclaration(_ *ast.FieldDeclaration) ast.Repr

func (*Interpreter) VisitFixedPointExpression

func (interpreter *Interpreter) VisitFixedPointExpression(expression *ast.FixedPointExpression) ast.Repr

func (*Interpreter) VisitForStatement

func (interpreter *Interpreter) VisitForStatement(statement *ast.ForStatement) ast.Repr

func (*Interpreter) VisitForceExpression

func (interpreter *Interpreter) VisitForceExpression(expression *ast.ForceExpression) ast.Repr

func (*Interpreter) VisitFunctionBlock

func (interpreter *Interpreter) VisitFunctionBlock(_ *ast.FunctionBlock) ast.Repr

func (*Interpreter) VisitFunctionDeclaration

func (interpreter *Interpreter) VisitFunctionDeclaration(declaration *ast.FunctionDeclaration) ast.Repr

func (*Interpreter) VisitFunctionExpression

func (interpreter *Interpreter) VisitFunctionExpression(expression *ast.FunctionExpression) ast.Repr

func (*Interpreter) VisitIdentifierExpression

func (interpreter *Interpreter) VisitIdentifierExpression(expression *ast.IdentifierExpression) ast.Repr

func (*Interpreter) VisitIfStatement

func (interpreter *Interpreter) VisitIfStatement(statement *ast.IfStatement) ast.Repr

func (*Interpreter) VisitImportDeclaration

func (interpreter *Interpreter) VisitImportDeclaration(declaration *ast.ImportDeclaration) ast.Repr

func (*Interpreter) VisitIndexExpression

func (interpreter *Interpreter) VisitIndexExpression(expression *ast.IndexExpression) ast.Repr

func (*Interpreter) VisitIntegerExpression

func (interpreter *Interpreter) VisitIntegerExpression(expression *ast.IntegerExpression) ast.Repr

func (*Interpreter) VisitInterfaceDeclaration

func (interpreter *Interpreter) VisitInterfaceDeclaration(declaration *ast.InterfaceDeclaration) ast.Repr

NOTE: only called for top-level interface declarations

func (*Interpreter) VisitInvocationExpression

func (interpreter *Interpreter) VisitInvocationExpression(invocationExpression *ast.InvocationExpression) ast.Repr

func (*Interpreter) VisitMemberExpression

func (interpreter *Interpreter) VisitMemberExpression(expression *ast.MemberExpression) ast.Repr

func (*Interpreter) VisitNilExpression

func (interpreter *Interpreter) VisitNilExpression(_ *ast.NilExpression) ast.Repr

func (*Interpreter) VisitPathExpression

func (interpreter *Interpreter) VisitPathExpression(expression *ast.PathExpression) ast.Repr

func (*Interpreter) VisitProgram

func (interpreter *Interpreter) VisitProgram(program *ast.Program) ast.Repr

func (*Interpreter) VisitReferenceExpression

func (interpreter *Interpreter) VisitReferenceExpression(referenceExpression *ast.ReferenceExpression) ast.Repr

func (*Interpreter) VisitReturnStatement

func (interpreter *Interpreter) VisitReturnStatement(statement *ast.ReturnStatement) ast.Repr

func (*Interpreter) VisitStringExpression

func (interpreter *Interpreter) VisitStringExpression(expression *ast.StringExpression) ast.Repr

func (*Interpreter) VisitSwapStatement

func (interpreter *Interpreter) VisitSwapStatement(swap *ast.SwapStatement) ast.Repr

func (*Interpreter) VisitTransactionDeclaration

func (interpreter *Interpreter) VisitTransactionDeclaration(declaration *ast.TransactionDeclaration) ast.Repr

func (*Interpreter) VisitUnaryExpression

func (interpreter *Interpreter) VisitUnaryExpression(expression *ast.UnaryExpression) ast.Repr

func (*Interpreter) VisitVariableDeclaration

func (interpreter *Interpreter) VisitVariableDeclaration(declaration *ast.VariableDeclaration) ast.Repr

VisitVariableDeclaration first visits the declaration's value, then declares the variable with the name bound to the value

func (*Interpreter) VisitWhileStatement

func (interpreter *Interpreter) VisitWhileStatement(statement *ast.WhileStatement) ast.Repr

type InvalidParameterTypeInInvocationError

type InvalidParameterTypeInInvocationError struct {
	InvalidParameterType sema.Type
}

func (*InvalidParameterTypeInInvocationError) Error

type InvalidPathDomainError

type InvalidPathDomainError struct {
	ActualDomain    common.PathDomain
	ExpectedDomains []common.PathDomain
	LocationRange
}

func (*InvalidPathDomainError) Error

func (e *InvalidPathDomainError) Error() string

func (*InvalidPathDomainError) SecondaryError

func (e *InvalidPathDomainError) SecondaryError() string

type Invocation

type Invocation struct {
	Self               *CompositeValue
	Arguments          []Value
	ArgumentTypes      []sema.Type
	TypeParameterTypes map[*sema.TypeParameter]sema.Type
	LocationRange      LocationRange
	Interpreter        *Interpreter
}

type LinkValue

type LinkValue struct {
	TargetPath PathValue
	Type       StaticType
}

func (LinkValue) Copy

func (v LinkValue) Copy() Value

func (LinkValue) Destroy

func (LinkValue) DynamicType

func (LinkValue) DynamicType(_ *Interpreter) DynamicType

func (LinkValue) GetOwner

func (LinkValue) GetOwner() *common.Address

func (LinkValue) IsModified added in v0.3.0

func (LinkValue) IsModified() bool

func (LinkValue) IsValue

func (LinkValue) IsValue()

func (LinkValue) SetModified added in v0.3.0

func (LinkValue) SetModified(_ bool)

func (LinkValue) SetOwner

func (LinkValue) SetOwner(_ *common.Address)

func (LinkValue) String

func (v LinkValue) String() string

type LocationPosition

type LocationPosition struct {
	Location ast.Location
	Position ast.Position
}

LocationPosition defines a position in the source of the import tree. The Location defines the script within the import tree, the Position defines the row/colum within the source of that script.

type LocationRange

type LocationRange struct {
	Location ast.Location
	ast.Range
}

LocationRange defines a range in the source of the import tree. The Position defines the script within the import tree, the Range defines the start/end position within the source of that script.

func (LocationRange) ImportLocation

func (r LocationRange) ImportLocation() ast.Location

type MemberAccessibleValue

type MemberAccessibleValue interface {
	GetMember(interpreter *Interpreter, locationRange LocationRange, name string) Value
	SetMember(interpreter *Interpreter, locationRange LocationRange, name string, value Value)
}

type NilDynamicType

type NilDynamicType struct{}

func (NilDynamicType) IsDynamicType

func (NilDynamicType) IsDynamicType()

type NilValue

type NilValue struct{}

func (NilValue) Copy

func (v NilValue) Copy() Value

func (NilValue) Destroy

func (NilValue) DynamicType

func (NilValue) DynamicType(_ *Interpreter) DynamicType

func (NilValue) GetOwner

func (NilValue) GetOwner() *common.Address

func (NilValue) IsModified added in v0.3.0

func (NilValue) IsModified() bool

func (NilValue) IsValue

func (NilValue) IsValue()

func (NilValue) SetModified added in v0.3.0

func (NilValue) SetModified(_ bool)

func (NilValue) SetOwner

func (NilValue) SetOwner(_ *common.Address)

func (NilValue) String

func (NilValue) String() string

type NotDeclaredError

type NotDeclaredError struct {
	ExpectedKind common.DeclarationKind
	Name         string
}

func (*NotDeclaredError) Error

func (e *NotDeclaredError) Error() string

func (*NotDeclaredError) SecondaryError

func (e *NotDeclaredError) SecondaryError() string

type NotInvokableError

type NotInvokableError struct {
	Value Value
}

func (*NotInvokableError) Error

func (e *NotInvokableError) Error() string

type NumberDynamicType

type NumberDynamicType struct {
	StaticType sema.Type
}

func (NumberDynamicType) IsDynamicType

func (NumberDynamicType) IsDynamicType()

type NumberValue

type NumberValue interface {
	EquatableValue
	ToInt() int
	Negate() NumberValue
	Plus(other NumberValue) NumberValue
	Minus(other NumberValue) NumberValue
	Mod(other NumberValue) NumberValue
	Mul(other NumberValue) NumberValue
	Div(other NumberValue) NumberValue
	Less(other NumberValue) BoolValue
	LessEqual(other NumberValue) BoolValue
	Greater(other NumberValue) BoolValue
	GreaterEqual(other NumberValue) BoolValue
}

type OnEventEmittedFunc

type OnEventEmittedFunc func(
	inter *Interpreter,
	event *CompositeValue,
	eventType *sema.CompositeType,
)

OnEventEmittedFunc is a function that is triggered when an event is emitted by the program.

type OnFunctionInvocationFunc added in v0.2.0

type OnFunctionInvocationFunc func(
	inter *Interpreter,
	line int,
)

OnFunctionInvocationFunc is a function that is triggered when a function is about to be invoked.

type OnLoopIterationFunc added in v0.2.0

type OnLoopIterationFunc func(
	inter *Interpreter,
	line int,
)

OnLoopIterationFunc is a function that is triggered when a loop iteration is about to be executed.

type OnStatementFunc

type OnStatementFunc func(
	statement *Statement,
)

OnStatementFunc is a function that is triggered when a statement is about to be executed.

type Option

type Option func(*Interpreter) error

func WithAllCheckers

func WithAllCheckers(allCheckers map[ast.LocationID]*sema.Checker) Option

WithAllCheckers returns an interpreter option which sets the given map of checkers as the map of all checkers.

func WithAllInterpreters

func WithAllInterpreters(allInterpreters map[ast.LocationID]*Interpreter) Option

WithAllInterpreters returns an interpreter option which sets the given map of interpreters as the map of all interpreters.

func WithContractValueHandler

func WithContractValueHandler(handler ContractValueHandlerFunc) Option

WithContractValueHandler returns an interpreter option which sets the given function as the function that is used to handle imports of values.

func WithImportProgramHandler

func WithImportProgramHandler(handler ImportProgramHandlerFunc) Option

WithImportProgramHandler returns an interpreter option which sets the given function as the function that is used to handle the imports of programs.

func WithInjectedCompositeFieldsHandler

func WithInjectedCompositeFieldsHandler(handler InjectedCompositeFieldsHandlerFunc) Option

WithInjectedCompositeFieldsHandler returns an interpreter option which sets the given function as the function that is used to initialize new composite values' fields

func WithOnEventEmittedHandler

func WithOnEventEmittedHandler(handler OnEventEmittedFunc) Option

WithOnEventEmittedHandler returns an interpreter option which sets the given function as the event handler.

func WithOnFunctionInvocationHandler added in v0.2.0

func WithOnFunctionInvocationHandler(handler OnFunctionInvocationFunc) Option

WithOnLoopIterationHandler returns an interpreter option which sets the given function as the loop iteration handler.

func WithOnLoopIterationHandler added in v0.2.0

func WithOnLoopIterationHandler(handler OnLoopIterationFunc) Option

WithOnLoopIterationHandler returns an interpreter option which sets the given function as the loop iteration handler.

func WithOnStatementHandler

func WithOnStatementHandler(handler OnStatementFunc) Option

WithOnStatementHandler returns an interpreter option which sets the given function as the statement handler.

func WithPredefinedValues

func WithPredefinedValues(predefinedValues map[string]Value) Option

WithPredefinedValues returns an interpreter option which declares the given the predefined values.

func WithStorageExistenceHandler

func WithStorageExistenceHandler(handler StorageExistenceHandlerFunc) Option

WithStorageExistenceHandler returns an interpreter option which sets the given function as the function that is used when a storage key is checked for existence.

func WithStorageKeyHandler

func WithStorageKeyHandler(handler StorageKeyHandlerFunc) Option

WithStorageKeyHandler returns an interpreter option which sets the given function as the function that is used when a stored value is written.

func WithStorageReadHandler

func WithStorageReadHandler(handler StorageReadHandlerFunc) Option

WithStorageReadHandler returns an interpreter option which sets the given function as the function that is used when a stored value is read.

func WithStorageWriteHandler

func WithStorageWriteHandler(handler StorageWriteHandlerFunc) Option

WithStorageWriteHandler returns an interpreter option which sets the given function as the function that is used when a stored value is written.

func WithUUIDHandler

func WithUUIDHandler(handler UUIDHandlerFunc) Option

WithUUIDHandler returns an interpreter option which sets the given function as the function that is used to generate UUIDs.

type OptionalStaticType

type OptionalStaticType struct {
	Type StaticType
}

func (OptionalStaticType) String

func (t OptionalStaticType) String() string

type OptionalValue

type OptionalValue interface {
	Value
	// contains filtered or unexported methods
}

type OverflowError

type OverflowError struct{}

func (OverflowError) Error

func (e OverflowError) Error() string

type OverwriteError

type OverwriteError struct {
	Address AddressValue
	Path    PathValue
	LocationRange
}

func (*OverwriteError) Error

func (e *OverwriteError) Error() string

type PathDynamicType

type PathDynamicType struct{}

func (PathDynamicType) IsDynamicType

func (PathDynamicType) IsDynamicType()

type PathValue

type PathValue struct {
	Domain     common.PathDomain
	Identifier string
}

func (PathValue) Copy

func (v PathValue) Copy() Value

func (PathValue) Destroy

func (PathValue) DynamicType

func (PathValue) DynamicType(_ *Interpreter) DynamicType

func (PathValue) GetOwner

func (PathValue) GetOwner() *common.Address

func (PathValue) IsModified added in v0.3.0

func (PathValue) IsModified() bool

func (PathValue) IsValue

func (PathValue) IsValue()

func (PathValue) SetModified added in v0.3.0

func (PathValue) SetModified(_ bool)

func (PathValue) SetOwner

func (PathValue) SetOwner(_ *common.Address)

func (PathValue) String

func (v PathValue) String() string

type PrimitiveStaticType added in v0.2.0

type PrimitiveStaticType uint
const (
	PrimitiveStaticTypeUnknown PrimitiveStaticType = iota
	PrimitiveStaticTypeVoid
	PrimitiveStaticTypeAny
	PrimitiveStaticTypeNever
	PrimitiveStaticTypeAnyStruct
	PrimitiveStaticTypeAnyResource
	PrimitiveStaticTypeBool
	PrimitiveStaticTypeAddress
	PrimitiveStaticTypeString
	PrimitiveStaticTypeCharacter

	// Number
	PrimitiveStaticTypeNumber
	PrimitiveStaticTypeSignedNumber

	// Integer
	PrimitiveStaticTypeInteger
	PrimitiveStaticTypeSignedInteger

	// FixedPoint
	PrimitiveStaticTypeFixedPoint
	PrimitiveStaticTypeSignedFixedPoint

	// Int*
	PrimitiveStaticTypeInt
	PrimitiveStaticTypeInt8
	PrimitiveStaticTypeInt16
	PrimitiveStaticTypeInt32
	PrimitiveStaticTypeInt64
	PrimitiveStaticTypeInt128
	PrimitiveStaticTypeInt256

	// UInt*
	PrimitiveStaticTypeUInt
	PrimitiveStaticTypeUInt8
	PrimitiveStaticTypeUInt16
	PrimitiveStaticTypeUInt32
	PrimitiveStaticTypeUInt64
	PrimitiveStaticTypeUInt128
	PrimitiveStaticTypeUInt256

	PrimitiveStaticTypeWord8
	PrimitiveStaticTypeWord16
	PrimitiveStaticTypeWord32
	PrimitiveStaticTypeWord64

	PrimitiveStaticTypeFix64

	PrimitiveStaticTypeUFix64

	PrimitiveStaticTypePath
	PrimitiveStaticTypeCapability
)

func ConvertSemaToPrimitiveStaticType added in v0.2.0

func ConvertSemaToPrimitiveStaticType(t sema.Type) PrimitiveStaticType

ConvertSemaToPrimitiveStaticType converts a `sema.Type` to a `PrimitiveStaticType`.

Returns `PrimitiveStaticTypeUnknown` if the given type is not a primitive type.

func (PrimitiveStaticType) SemaType added in v0.2.0

func (i PrimitiveStaticType) SemaType() sema.Type

func (PrimitiveStaticType) String added in v0.2.0

func (i PrimitiveStaticType) String() string

type PublicAccountDynamicType

type PublicAccountDynamicType struct{}

func (PublicAccountDynamicType) IsDynamicType

func (PublicAccountDynamicType) IsDynamicType()

type PublicAccountValue

type PublicAccountValue struct {
	Address    AddressValue
	Identifier string
}

func NewPublicAccountValue

func NewPublicAccountValue(address AddressValue) PublicAccountValue

func (PublicAccountValue) AddressValue

func (v PublicAccountValue) AddressValue() AddressValue

func (PublicAccountValue) Copy

func (v PublicAccountValue) Copy() Value

func (PublicAccountValue) Destroy

func (PublicAccountValue) DynamicType

func (PublicAccountValue) DynamicType(_ *Interpreter) DynamicType

func (PublicAccountValue) GetMember

func (v PublicAccountValue) GetMember(inter *Interpreter, _ LocationRange, name string) Value

func (PublicAccountValue) GetOwner

func (PublicAccountValue) GetOwner() *common.Address

func (PublicAccountValue) IsModified added in v0.3.0

func (PublicAccountValue) IsModified() bool

func (PublicAccountValue) IsValue

func (PublicAccountValue) IsValue()

func (PublicAccountValue) SetMember

func (PublicAccountValue) SetMember(_ *Interpreter, _ LocationRange, _ string, _ Value)

func (PublicAccountValue) SetModified added in v0.3.0

func (PublicAccountValue) SetModified(_ bool)

func (PublicAccountValue) SetOwner

func (PublicAccountValue) SetOwner(_ *common.Address)

func (PublicAccountValue) String

func (v PublicAccountValue) String() string

type PublishedDynamicType

type PublishedDynamicType struct{}

func (PublishedDynamicType) IsDynamicType

func (PublishedDynamicType) IsDynamicType()

type RedeclarationError

type RedeclarationError struct {
	Name string
}

func (*RedeclarationError) Error

func (e *RedeclarationError) Error() string

type ReferenceDynamicType

type ReferenceDynamicType interface {
	DynamicType

	Authorized() bool
	InnerType() DynamicType
	// contains filtered or unexported methods
}

type ReferenceStaticType

type ReferenceStaticType struct {
	Authorized bool
	Type       StaticType
}

func (ReferenceStaticType) String

func (t ReferenceStaticType) String() string

type RestrictedStaticType

type RestrictedStaticType struct {
	Type         StaticType
	Restrictions []InterfaceStaticType
}

func (RestrictedStaticType) String

func (t RestrictedStaticType) String() string

type SomeDynamicType

type SomeDynamicType struct {
	InnerType DynamicType
}

func (SomeDynamicType) IsDynamicType

func (SomeDynamicType) IsDynamicType()

type SomeValue

type SomeValue struct {
	Value Value
	Owner *common.Address
}

func NewSomeValueOwningNonCopying

func NewSomeValueOwningNonCopying(value Value) *SomeValue

func (*SomeValue) Copy

func (v *SomeValue) Copy() Value

func (*SomeValue) Destroy

func (v *SomeValue) Destroy(interpreter *Interpreter, locationRange LocationRange) trampoline.Trampoline

func (*SomeValue) DynamicType

func (v *SomeValue) DynamicType(interpreter *Interpreter) DynamicType

func (*SomeValue) GetOwner

func (v *SomeValue) GetOwner() *common.Address

func (*SomeValue) IsModified added in v0.3.0

func (v *SomeValue) IsModified() bool

func (*SomeValue) IsValue

func (*SomeValue) IsValue()

func (*SomeValue) SetModified added in v0.3.0

func (v *SomeValue) SetModified(modified bool)

func (*SomeValue) SetOwner

func (v *SomeValue) SetOwner(owner *common.Address)

func (*SomeValue) String

func (v *SomeValue) String() string

type Statement

type Statement struct {
	Interpreter *Interpreter
	Trampoline  Trampoline
	Line        int
}

type StatementTrampoline

type StatementTrampoline struct {
	F           func() trampoline.Trampoline
	Interpreter *Interpreter
	Line        int
}

func (StatementTrampoline) Continue

func (StatementTrampoline) FlatMap

func (m StatementTrampoline) FlatMap(f func(interface{}) trampoline.Trampoline) trampoline.Trampoline

func (StatementTrampoline) Map

func (m StatementTrampoline) Map(f func(interface{}) interface{}) trampoline.Trampoline

func (StatementTrampoline) Resume

func (m StatementTrampoline) Resume() interface{}

func (StatementTrampoline) Then

func (m StatementTrampoline) Then(f func(interface{})) trampoline.Trampoline

type StaticType

type StaticType interface {
	fmt.Stringer
	// contains filtered or unexported methods
}

StaticType is a shallow representation of a static type (`sema.Type`) which doesn't contain the full information, but only refers to composite and interface types by ID.

This allows static types to be efficiently serialized and deserialized, for example in the world state.

func ConvertSemaToStaticType

func ConvertSemaToStaticType(typ sema.Type) StaticType

type StorageExistenceHandlerFunc

type StorageExistenceHandlerFunc func(
	inter *Interpreter,
	storageAddress common.Address,
	key string,
) bool

StorageExistenceHandlerFunc is a function that handles storage existence checks.

type StorageKeyHandlerFunc

type StorageKeyHandlerFunc func(
	inter *Interpreter,
	storageAddress common.Address,
	indexingType sema.Type,
) string

StorageKeyHandlerFunc is a function that handles storage indexing types.

type StorageReadHandlerFunc

type StorageReadHandlerFunc func(
	inter *Interpreter,
	storageAddress common.Address,
	key string,
	deferred bool,
) OptionalValue

StorageReadHandlerFunc is a function that handles storage reads.

type StorageReferenceDynamicType

type StorageReferenceDynamicType struct {
	// contains filtered or unexported fields
}

func (StorageReferenceDynamicType) Authorized

func (t StorageReferenceDynamicType) Authorized() bool

func (StorageReferenceDynamicType) InnerType

func (StorageReferenceDynamicType) IsDynamicType

func (StorageReferenceDynamicType) IsDynamicType()

type StorageReferenceValue

type StorageReferenceValue struct {
	Authorized           bool
	TargetStorageAddress common.Address
	TargetKey            string
}

func (*StorageReferenceValue) Copy

func (v *StorageReferenceValue) Copy() Value

func (*StorageReferenceValue) DynamicType

func (v *StorageReferenceValue) DynamicType(interpreter *Interpreter) DynamicType

func (*StorageReferenceValue) Equal

func (v *StorageReferenceValue) Equal(other Value) BoolValue

func (*StorageReferenceValue) Get

func (v *StorageReferenceValue) Get(interpreter *Interpreter, locationRange LocationRange, key Value) Value

func (*StorageReferenceValue) GetMember

func (v *StorageReferenceValue) GetMember(interpreter *Interpreter, locationRange LocationRange, name string) Value

func (*StorageReferenceValue) GetOwner

func (v *StorageReferenceValue) GetOwner() *common.Address

func (*StorageReferenceValue) IsModified added in v0.3.0

func (*StorageReferenceValue) IsModified() bool

func (*StorageReferenceValue) IsValue

func (*StorageReferenceValue) IsValue()

func (*StorageReferenceValue) Set

func (v *StorageReferenceValue) Set(interpreter *Interpreter, locationRange LocationRange, key Value, value Value)

func (*StorageReferenceValue) SetMember

func (v *StorageReferenceValue) SetMember(interpreter *Interpreter, locationRange LocationRange, name string, value Value)

func (*StorageReferenceValue) SetModified added in v0.3.0

func (*StorageReferenceValue) SetModified(_ bool)

func (*StorageReferenceValue) SetOwner

func (v *StorageReferenceValue) SetOwner(_ *common.Address)

type StorageWriteHandlerFunc

type StorageWriteHandlerFunc func(
	inter *Interpreter,
	storageAddress common.Address,
	key string,
	value OptionalValue,
)

StorageWriteHandlerFunc is a function that handles storage writes.

type StringDynamicType

type StringDynamicType struct{}

func (StringDynamicType) IsDynamicType

func (StringDynamicType) IsDynamicType()

type StringValue

type StringValue struct {
	Str string
	// contains filtered or unexported fields
}

func NewStringValue

func NewStringValue(str string) *StringValue

func (*StringValue) Concat

func (v *StringValue) Concat(other ConcatenatableValue) Value

func (*StringValue) Copy

func (v *StringValue) Copy() Value

func (*StringValue) DynamicType

func (*StringValue) DynamicType(_ *Interpreter) DynamicType

func (*StringValue) Equal

func (v *StringValue) Equal(other Value) BoolValue

func (*StringValue) Get

func (v *StringValue) Get(_ *Interpreter, _ LocationRange, key Value) Value

func (*StringValue) GetMember

func (v *StringValue) GetMember(_ *Interpreter, _ LocationRange, name string) Value

func (*StringValue) GetOwner

func (*StringValue) GetOwner() *common.Address

func (*StringValue) IsModified added in v0.3.0

func (v *StringValue) IsModified() bool

func (*StringValue) IsValue

func (*StringValue) IsValue()

func (*StringValue) KeyString

func (v *StringValue) KeyString() string

func (*StringValue) NormalForm

func (v *StringValue) NormalForm() string

func (*StringValue) Set

func (v *StringValue) Set(_ *Interpreter, _ LocationRange, key Value, value Value)

func (*StringValue) SetIndex added in v0.2.1

func (v *StringValue) SetIndex(index int, char *StringValue)

func (*StringValue) SetMember

func (*StringValue) SetMember(_ *Interpreter, _ LocationRange, _ string, _ Value)

func (*StringValue) SetModified added in v0.2.1

func (v *StringValue) SetModified(modified bool)

func (*StringValue) SetOwner

func (*StringValue) SetOwner(_ *common.Address)

func (*StringValue) Slice

func (v *StringValue) Slice(from IntValue, to IntValue) Value

func (*StringValue) String

func (v *StringValue) String() string

type TransactionNotDeclaredError

type TransactionNotDeclaredError struct {
	Index int
}

func (*TransactionNotDeclaredError) Error

type TypeMismatchError

type TypeMismatchError struct {
	ExpectedType sema.Type
	LocationRange
}

func (*TypeMismatchError) Error

func (e *TypeMismatchError) Error() string

type UFix64Value

type UFix64Value uint64

func NewUFix64ValueWithInteger added in v0.2.0

func NewUFix64ValueWithInteger(integer uint64) UFix64Value

func (UFix64Value) Copy

func (v UFix64Value) Copy() Value

func (UFix64Value) Div

func (v UFix64Value) Div(other NumberValue) NumberValue

func (UFix64Value) DynamicType

func (UFix64Value) DynamicType(_ *Interpreter) DynamicType

func (UFix64Value) Equal

func (v UFix64Value) Equal(other Value) BoolValue

func (UFix64Value) GetMember added in v0.3.0

func (v UFix64Value) GetMember(_ *Interpreter, _ LocationRange, name string) Value

func (UFix64Value) GetOwner

func (UFix64Value) GetOwner() *common.Address

func (UFix64Value) Greater

func (v UFix64Value) Greater(other NumberValue) BoolValue

func (UFix64Value) GreaterEqual

func (v UFix64Value) GreaterEqual(other NumberValue) BoolValue

func (UFix64Value) IsModified added in v0.3.0

func (UFix64Value) IsModified() bool

func (UFix64Value) IsValue

func (UFix64Value) IsValue()

func (UFix64Value) KeyString

func (v UFix64Value) KeyString() string

func (UFix64Value) Less

func (v UFix64Value) Less(other NumberValue) BoolValue

func (UFix64Value) LessEqual

func (v UFix64Value) LessEqual(other NumberValue) BoolValue

func (UFix64Value) Minus

func (v UFix64Value) Minus(other NumberValue) NumberValue

func (UFix64Value) Mod

func (v UFix64Value) Mod(other NumberValue) NumberValue

func (UFix64Value) Mul

func (v UFix64Value) Mul(other NumberValue) NumberValue

func (UFix64Value) Negate

func (v UFix64Value) Negate() NumberValue

func (UFix64Value) Plus

func (v UFix64Value) Plus(other NumberValue) NumberValue

func (UFix64Value) Reciprocal added in v0.2.1

func (v UFix64Value) Reciprocal() UFix64Value

func (UFix64Value) SetMember added in v0.3.0

func (UFix64Value) SetMember(_ *Interpreter, _ LocationRange, _ string, _ Value)

func (UFix64Value) SetModified added in v0.3.0

func (UFix64Value) SetModified(_ bool)

func (UFix64Value) SetOwner

func (UFix64Value) SetOwner(_ *common.Address)

func (UFix64Value) String

func (v UFix64Value) String() string

func (UFix64Value) ToInt

func (v UFix64Value) ToInt() int

type UInt128Value

type UInt128Value struct {
	BigInt *big.Int
}

func NewUInt128ValueFromBigInt

func NewUInt128ValueFromBigInt(value *big.Int) UInt128Value

func NewUInt128ValueFromUint64 added in v0.2.0

func NewUInt128ValueFromUint64(value uint64) UInt128Value

func (UInt128Value) BitwiseAnd added in v0.2.0

func (v UInt128Value) BitwiseAnd(other IntegerValue) IntegerValue

func (UInt128Value) BitwiseLeftShift added in v0.2.0

func (v UInt128Value) BitwiseLeftShift(other IntegerValue) IntegerValue

func (UInt128Value) BitwiseOr added in v0.2.0

func (v UInt128Value) BitwiseOr(other IntegerValue) IntegerValue

func (UInt128Value) BitwiseRightShift added in v0.2.0

func (v UInt128Value) BitwiseRightShift(other IntegerValue) IntegerValue

func (UInt128Value) BitwiseXor added in v0.2.0

func (v UInt128Value) BitwiseXor(other IntegerValue) IntegerValue

func (UInt128Value) Copy

func (v UInt128Value) Copy() Value

func (UInt128Value) Div

func (v UInt128Value) Div(other NumberValue) NumberValue

func (UInt128Value) DynamicType

func (UInt128Value) DynamicType(_ *Interpreter) DynamicType

func (UInt128Value) Equal

func (v UInt128Value) Equal(other Value) BoolValue

func (UInt128Value) GetMember added in v0.3.0

func (v UInt128Value) GetMember(_ *Interpreter, _ LocationRange, name string) Value

func (UInt128Value) GetOwner

func (UInt128Value) GetOwner() *common.Address

func (UInt128Value) Greater

func (v UInt128Value) Greater(other NumberValue) BoolValue

func (UInt128Value) GreaterEqual

func (v UInt128Value) GreaterEqual(other NumberValue) BoolValue

func (UInt128Value) IsModified added in v0.3.0

func (UInt128Value) IsModified() bool

func (UInt128Value) IsValue

func (v UInt128Value) IsValue()

func (UInt128Value) KeyString

func (v UInt128Value) KeyString() string

func (UInt128Value) Less

func (v UInt128Value) Less(other NumberValue) BoolValue

func (UInt128Value) LessEqual

func (v UInt128Value) LessEqual(other NumberValue) BoolValue

func (UInt128Value) Minus

func (v UInt128Value) Minus(other NumberValue) NumberValue

func (UInt128Value) Mod

func (v UInt128Value) Mod(other NumberValue) NumberValue

func (UInt128Value) Mul

func (v UInt128Value) Mul(other NumberValue) NumberValue

func (UInt128Value) Negate

func (v UInt128Value) Negate() NumberValue

func (UInt128Value) Plus

func (v UInt128Value) Plus(other NumberValue) NumberValue

func (UInt128Value) SetMember added in v0.3.0

func (UInt128Value) SetMember(_ *Interpreter, _ LocationRange, _ string, _ Value)

func (UInt128Value) SetModified added in v0.3.0

func (UInt128Value) SetModified(_ bool)

func (UInt128Value) SetOwner

func (UInt128Value) SetOwner(_ *common.Address)

func (UInt128Value) String

func (v UInt128Value) String() string

func (UInt128Value) ToBigInt

func (v UInt128Value) ToBigInt() *big.Int

func (UInt128Value) ToInt

func (v UInt128Value) ToInt() int

type UInt16Value

type UInt16Value uint16

func (UInt16Value) BitwiseAnd added in v0.2.0

func (v UInt16Value) BitwiseAnd(other IntegerValue) IntegerValue

func (UInt16Value) BitwiseLeftShift added in v0.2.0

func (v UInt16Value) BitwiseLeftShift(other IntegerValue) IntegerValue

func (UInt16Value) BitwiseOr added in v0.2.0

func (v UInt16Value) BitwiseOr(other IntegerValue) IntegerValue

func (UInt16Value) BitwiseRightShift added in v0.2.0

func (v UInt16Value) BitwiseRightShift(other IntegerValue) IntegerValue

func (UInt16Value) BitwiseXor added in v0.2.0

func (v UInt16Value) BitwiseXor(other IntegerValue) IntegerValue

func (UInt16Value) Copy

func (v UInt16Value) Copy() Value

func (UInt16Value) Div

func (v UInt16Value) Div(other NumberValue) NumberValue

func (UInt16Value) DynamicType

func (UInt16Value) DynamicType(_ *Interpreter) DynamicType

func (UInt16Value) Equal

func (v UInt16Value) Equal(other Value) BoolValue

func (UInt16Value) GetMember added in v0.3.0

func (v UInt16Value) GetMember(_ *Interpreter, _ LocationRange, name string) Value

func (UInt16Value) GetOwner

func (UInt16Value) GetOwner() *common.Address

func (UInt16Value) Greater

func (v UInt16Value) Greater(other NumberValue) BoolValue

func (UInt16Value) GreaterEqual

func (v UInt16Value) GreaterEqual(other NumberValue) BoolValue

func (UInt16Value) IsModified added in v0.3.0

func (UInt16Value) IsModified() bool

func (UInt16Value) IsValue

func (UInt16Value) IsValue()

func (UInt16Value) KeyString

func (v UInt16Value) KeyString() string

func (UInt16Value) Less

func (v UInt16Value) Less(other NumberValue) BoolValue

func (UInt16Value) LessEqual

func (v UInt16Value) LessEqual(other NumberValue) BoolValue

func (UInt16Value) Minus

func (v UInt16Value) Minus(other NumberValue) NumberValue

func (UInt16Value) Mod

func (v UInt16Value) Mod(other NumberValue) NumberValue

func (UInt16Value) Mul

func (v UInt16Value) Mul(other NumberValue) NumberValue

func (UInt16Value) Negate

func (v UInt16Value) Negate() NumberValue

func (UInt16Value) Plus

func (v UInt16Value) Plus(other NumberValue) NumberValue

func (UInt16Value) SetMember added in v0.3.0

func (UInt16Value) SetMember(_ *Interpreter, _ LocationRange, _ string, _ Value)

func (UInt16Value) SetModified added in v0.3.0

func (UInt16Value) SetModified(_ bool)

func (UInt16Value) SetOwner

func (UInt16Value) SetOwner(_ *common.Address)

func (UInt16Value) String

func (v UInt16Value) String() string

func (UInt16Value) ToInt

func (v UInt16Value) ToInt() int

type UInt256Value

type UInt256Value struct {
	BigInt *big.Int
}

func NewUInt256ValueFromBigInt

func NewUInt256ValueFromBigInt(value *big.Int) UInt256Value

func NewUInt256ValueFromUint64 added in v0.2.0

func NewUInt256ValueFromUint64(value uint64) UInt256Value

func (UInt256Value) BitwiseAnd added in v0.2.0

func (v UInt256Value) BitwiseAnd(other IntegerValue) IntegerValue

func (UInt256Value) BitwiseLeftShift added in v0.2.0

func (v UInt256Value) BitwiseLeftShift(other IntegerValue) IntegerValue

func (UInt256Value) BitwiseOr added in v0.2.0

func (v UInt256Value) BitwiseOr(other IntegerValue) IntegerValue

func (UInt256Value) BitwiseRightShift added in v0.2.0

func (v UInt256Value) BitwiseRightShift(other IntegerValue) IntegerValue

func (UInt256Value) BitwiseXor added in v0.2.0

func (v UInt256Value) BitwiseXor(other IntegerValue) IntegerValue

func (UInt256Value) Copy

func (v UInt256Value) Copy() Value

func (UInt256Value) Div

func (v UInt256Value) Div(other NumberValue) NumberValue

func (UInt256Value) DynamicType

func (UInt256Value) DynamicType(_ *Interpreter) DynamicType

func (UInt256Value) Equal

func (v UInt256Value) Equal(other Value) BoolValue

func (UInt256Value) GetMember added in v0.3.0

func (v UInt256Value) GetMember(_ *Interpreter, _ LocationRange, name string) Value

func (UInt256Value) GetOwner

func (UInt256Value) GetOwner() *common.Address

func (UInt256Value) Greater

func (v UInt256Value) Greater(other NumberValue) BoolValue

func (UInt256Value) GreaterEqual

func (v UInt256Value) GreaterEqual(other NumberValue) BoolValue

func (UInt256Value) IsModified added in v0.3.0

func (UInt256Value) IsModified() bool

func (UInt256Value) IsValue

func (v UInt256Value) IsValue()

func (UInt256Value) KeyString

func (v UInt256Value) KeyString() string

func (UInt256Value) Less

func (v UInt256Value) Less(other NumberValue) BoolValue

func (UInt256Value) LessEqual

func (v UInt256Value) LessEqual(other NumberValue) BoolValue

func (UInt256Value) Minus

func (v UInt256Value) Minus(other NumberValue) NumberValue

func (UInt256Value) Mod

func (v UInt256Value) Mod(other NumberValue) NumberValue

func (UInt256Value) Mul

func (v UInt256Value) Mul(other NumberValue) NumberValue

func (UInt256Value) Negate

func (v UInt256Value) Negate() NumberValue

func (UInt256Value) Plus

func (v UInt256Value) Plus(other NumberValue) NumberValue

func (UInt256Value) SetMember added in v0.3.0

func (UInt256Value) SetMember(_ *Interpreter, _ LocationRange, _ string, _ Value)

func (UInt256Value) SetModified added in v0.3.0

func (UInt256Value) SetModified(_ bool)

func (UInt256Value) SetOwner

func (UInt256Value) SetOwner(_ *common.Address)

func (UInt256Value) String

func (v UInt256Value) String() string

func (UInt256Value) ToBigInt

func (v UInt256Value) ToBigInt() *big.Int

func (UInt256Value) ToInt

func (v UInt256Value) ToInt() int

type UInt32Value

type UInt32Value uint32

func (UInt32Value) BitwiseAnd added in v0.2.0

func (v UInt32Value) BitwiseAnd(other IntegerValue) IntegerValue

func (UInt32Value) BitwiseLeftShift added in v0.2.0

func (v UInt32Value) BitwiseLeftShift(other IntegerValue) IntegerValue

func (UInt32Value) BitwiseOr added in v0.2.0

func (v UInt32Value) BitwiseOr(other IntegerValue) IntegerValue

func (UInt32Value) BitwiseRightShift added in v0.2.0

func (v UInt32Value) BitwiseRightShift(other IntegerValue) IntegerValue

func (UInt32Value) BitwiseXor added in v0.2.0

func (v UInt32Value) BitwiseXor(other IntegerValue) IntegerValue

func (UInt32Value) Copy

func (v UInt32Value) Copy() Value

func (UInt32Value) Div

func (v UInt32Value) Div(other NumberValue) NumberValue

func (UInt32Value) DynamicType

func (UInt32Value) DynamicType(_ *Interpreter) DynamicType

func (UInt32Value) Equal

func (v UInt32Value) Equal(other Value) BoolValue

func (UInt32Value) GetMember added in v0.3.0

func (v UInt32Value) GetMember(_ *Interpreter, _ LocationRange, name string) Value

func (UInt32Value) GetOwner

func (UInt32Value) GetOwner() *common.Address

func (UInt32Value) Greater

func (v UInt32Value) Greater(other NumberValue) BoolValue

func (UInt32Value) GreaterEqual

func (v UInt32Value) GreaterEqual(other NumberValue) BoolValue

func (UInt32Value) IsModified added in v0.3.0

func (UInt32Value) IsModified() bool

func (UInt32Value) IsValue

func (UInt32Value) IsValue()

func (UInt32Value) KeyString

func (v UInt32Value) KeyString() string

func (UInt32Value) Less

func (v UInt32Value) Less(other NumberValue) BoolValue

func (UInt32Value) LessEqual

func (v UInt32Value) LessEqual(other NumberValue) BoolValue

func (UInt32Value) Minus

func (v UInt32Value) Minus(other NumberValue) NumberValue

func (UInt32Value) Mod

func (v UInt32Value) Mod(other NumberValue) NumberValue

func (UInt32Value) Mul

func (v UInt32Value) Mul(other NumberValue) NumberValue

func (UInt32Value) Negate

func (v UInt32Value) Negate() NumberValue

func (UInt32Value) Plus

func (v UInt32Value) Plus(other NumberValue) NumberValue

func (UInt32Value) SetMember added in v0.3.0

func (UInt32Value) SetMember(_ *Interpreter, _ LocationRange, _ string, _ Value)

func (UInt32Value) SetModified added in v0.3.0

func (UInt32Value) SetModified(_ bool)

func (UInt32Value) SetOwner

func (UInt32Value) SetOwner(_ *common.Address)

func (UInt32Value) String

func (v UInt32Value) String() string

func (UInt32Value) ToInt

func (v UInt32Value) ToInt() int

type UInt64Value

type UInt64Value uint64

func (UInt64Value) BitwiseAnd added in v0.2.0

func (v UInt64Value) BitwiseAnd(other IntegerValue) IntegerValue

func (UInt64Value) BitwiseLeftShift added in v0.2.0

func (v UInt64Value) BitwiseLeftShift(other IntegerValue) IntegerValue

func (UInt64Value) BitwiseOr added in v0.2.0

func (v UInt64Value) BitwiseOr(other IntegerValue) IntegerValue

func (UInt64Value) BitwiseRightShift added in v0.2.0

func (v UInt64Value) BitwiseRightShift(other IntegerValue) IntegerValue

func (UInt64Value) BitwiseXor added in v0.2.0

func (v UInt64Value) BitwiseXor(other IntegerValue) IntegerValue

func (UInt64Value) Copy

func (v UInt64Value) Copy() Value

func (UInt64Value) Div

func (v UInt64Value) Div(other NumberValue) NumberValue

func (UInt64Value) DynamicType

func (UInt64Value) DynamicType(_ *Interpreter) DynamicType

func (UInt64Value) Equal

func (v UInt64Value) Equal(other Value) BoolValue

func (UInt64Value) GetMember added in v0.3.0

func (v UInt64Value) GetMember(_ *Interpreter, _ LocationRange, name string) Value

func (UInt64Value) GetOwner

func (UInt64Value) GetOwner() *common.Address

func (UInt64Value) Greater

func (v UInt64Value) Greater(other NumberValue) BoolValue

func (UInt64Value) GreaterEqual

func (v UInt64Value) GreaterEqual(other NumberValue) BoolValue

func (UInt64Value) IsModified added in v0.3.0

func (UInt64Value) IsModified() bool

func (UInt64Value) IsValue

func (UInt64Value) IsValue()

func (UInt64Value) KeyString

func (v UInt64Value) KeyString() string

func (UInt64Value) Less

func (v UInt64Value) Less(other NumberValue) BoolValue

func (UInt64Value) LessEqual

func (v UInt64Value) LessEqual(other NumberValue) BoolValue

func (UInt64Value) Minus

func (v UInt64Value) Minus(other NumberValue) NumberValue

func (UInt64Value) Mod

func (v UInt64Value) Mod(other NumberValue) NumberValue

func (UInt64Value) Mul

func (v UInt64Value) Mul(other NumberValue) NumberValue

func (UInt64Value) Negate

func (v UInt64Value) Negate() NumberValue

func (UInt64Value) Plus

func (v UInt64Value) Plus(other NumberValue) NumberValue

func (UInt64Value) SetMember added in v0.3.0

func (UInt64Value) SetMember(_ *Interpreter, _ LocationRange, _ string, _ Value)

func (UInt64Value) SetModified added in v0.3.0

func (UInt64Value) SetModified(_ bool)

func (UInt64Value) SetOwner

func (UInt64Value) SetOwner(_ *common.Address)

func (UInt64Value) String

func (v UInt64Value) String() string

func (UInt64Value) ToInt

func (v UInt64Value) ToInt() int

type UInt8Value

type UInt8Value uint8

func (UInt8Value) BitwiseAnd added in v0.2.0

func (v UInt8Value) BitwiseAnd(other IntegerValue) IntegerValue

func (UInt8Value) BitwiseLeftShift added in v0.2.0

func (v UInt8Value) BitwiseLeftShift(other IntegerValue) IntegerValue

func (UInt8Value) BitwiseOr added in v0.2.0

func (v UInt8Value) BitwiseOr(other IntegerValue) IntegerValue

func (UInt8Value) BitwiseRightShift added in v0.2.0

func (v UInt8Value) BitwiseRightShift(other IntegerValue) IntegerValue

func (UInt8Value) BitwiseXor added in v0.2.0

func (v UInt8Value) BitwiseXor(other IntegerValue) IntegerValue

func (UInt8Value) Copy

func (v UInt8Value) Copy() Value

func (UInt8Value) Div

func (v UInt8Value) Div(other NumberValue) NumberValue

func (UInt8Value) DynamicType

func (UInt8Value) DynamicType(_ *Interpreter) DynamicType

func (UInt8Value) Equal

func (v UInt8Value) Equal(other Value) BoolValue

func (UInt8Value) GetMember added in v0.3.0

func (v UInt8Value) GetMember(_ *Interpreter, _ LocationRange, name string) Value

func (UInt8Value) GetOwner

func (UInt8Value) GetOwner() *common.Address

func (UInt8Value) Greater

func (v UInt8Value) Greater(other NumberValue) BoolValue

func (UInt8Value) GreaterEqual

func (v UInt8Value) GreaterEqual(other NumberValue) BoolValue

func (UInt8Value) IsModified added in v0.3.0

func (UInt8Value) IsModified() bool

func (UInt8Value) IsValue

func (UInt8Value) IsValue()

func (UInt8Value) KeyString

func (v UInt8Value) KeyString() string

func (UInt8Value) Less

func (v UInt8Value) Less(other NumberValue) BoolValue

func (UInt8Value) LessEqual

func (v UInt8Value) LessEqual(other NumberValue) BoolValue

func (UInt8Value) Minus

func (v UInt8Value) Minus(other NumberValue) NumberValue

func (UInt8Value) Mod

func (v UInt8Value) Mod(other NumberValue) NumberValue

func (UInt8Value) Mul

func (v UInt8Value) Mul(other NumberValue) NumberValue

func (UInt8Value) Negate

func (v UInt8Value) Negate() NumberValue

func (UInt8Value) Plus

func (v UInt8Value) Plus(other NumberValue) NumberValue

func (UInt8Value) SetMember added in v0.3.0

func (UInt8Value) SetMember(_ *Interpreter, _ LocationRange, _ string, _ Value)

func (UInt8Value) SetModified added in v0.3.0

func (UInt8Value) SetModified(_ bool)

func (UInt8Value) SetOwner

func (UInt8Value) SetOwner(_ *common.Address)

func (UInt8Value) String

func (v UInt8Value) String() string

func (UInt8Value) ToInt

func (v UInt8Value) ToInt() int

type UIntValue

type UIntValue struct {
	BigInt *big.Int
}

func NewUIntValueFromBigInt

func NewUIntValueFromBigInt(value *big.Int) UIntValue

func NewUIntValueFromUint64

func NewUIntValueFromUint64(value uint64) UIntValue

func (UIntValue) BitwiseAnd added in v0.2.0

func (v UIntValue) BitwiseAnd(other IntegerValue) IntegerValue

func (UIntValue) BitwiseLeftShift added in v0.2.0

func (v UIntValue) BitwiseLeftShift(other IntegerValue) IntegerValue

func (UIntValue) BitwiseOr added in v0.2.0

func (v UIntValue) BitwiseOr(other IntegerValue) IntegerValue

func (UIntValue) BitwiseRightShift added in v0.2.0

func (v UIntValue) BitwiseRightShift(other IntegerValue) IntegerValue

func (UIntValue) BitwiseXor added in v0.2.0

func (v UIntValue) BitwiseXor(other IntegerValue) IntegerValue

func (UIntValue) Copy

func (v UIntValue) Copy() Value

func (UIntValue) Div

func (v UIntValue) Div(other NumberValue) NumberValue

func (UIntValue) DynamicType

func (UIntValue) DynamicType(_ *Interpreter) DynamicType

func (UIntValue) Equal

func (v UIntValue) Equal(other Value) BoolValue

func (UIntValue) GetMember added in v0.3.0

func (v UIntValue) GetMember(_ *Interpreter, _ LocationRange, name string) Value

func (UIntValue) GetOwner

func (UIntValue) GetOwner() *common.Address

func (UIntValue) Greater

func (v UIntValue) Greater(other NumberValue) BoolValue

func (UIntValue) GreaterEqual

func (v UIntValue) GreaterEqual(other NumberValue) BoolValue

func (UIntValue) IsModified added in v0.3.0

func (UIntValue) IsModified() bool

func (UIntValue) IsValue

func (v UIntValue) IsValue()

func (UIntValue) KeyString

func (v UIntValue) KeyString() string

func (UIntValue) Less

func (v UIntValue) Less(other NumberValue) BoolValue

func (UIntValue) LessEqual

func (v UIntValue) LessEqual(other NumberValue) BoolValue

func (UIntValue) Minus

func (v UIntValue) Minus(other NumberValue) NumberValue

func (UIntValue) Mod

func (v UIntValue) Mod(other NumberValue) NumberValue

func (UIntValue) Mul

func (v UIntValue) Mul(other NumberValue) NumberValue

func (UIntValue) Negate

func (v UIntValue) Negate() NumberValue

func (UIntValue) Plus

func (v UIntValue) Plus(other NumberValue) NumberValue

func (UIntValue) SetMember added in v0.3.0

func (UIntValue) SetMember(_ *Interpreter, _ LocationRange, _ string, _ Value)

func (UIntValue) SetModified added in v0.3.0

func (UIntValue) SetModified(_ bool)

func (UIntValue) SetOwner

func (UIntValue) SetOwner(_ *common.Address)

func (UIntValue) String

func (v UIntValue) String() string

func (UIntValue) ToBigInt

func (v UIntValue) ToBigInt() *big.Int

func (UIntValue) ToInt

func (v UIntValue) ToInt() int

type UUIDHandlerFunc

type UUIDHandlerFunc func() uint64

UUIDHandlerFunc is a function that handles the generation of UUIDs.

type UnderflowError

type UnderflowError struct{}

func (UnderflowError) Error

func (e UnderflowError) Error() string

type Value

type Value interface {
	IsValue()
	DynamicType(interpreter *Interpreter) DynamicType
	Copy() Value
	GetOwner() *common.Address
	SetOwner(address *common.Address)
	IsModified() bool
	SetModified(modified bool)
}

func ConvertAddress

func ConvertAddress(value Value, _ *Interpreter) Value

func ConvertFix64

func ConvertFix64(value Value, interpreter *Interpreter) Value

func ConvertInt

func ConvertInt(value Value, _ *Interpreter) Value

func ConvertInt128

func ConvertInt128(value Value, _ *Interpreter) Value

func ConvertInt16

func ConvertInt16(value Value, _ *Interpreter) Value

func ConvertInt256

func ConvertInt256(value Value, _ *Interpreter) Value

func ConvertInt32

func ConvertInt32(value Value, _ *Interpreter) Value

func ConvertInt64

func ConvertInt64(value Value, _ *Interpreter) Value

func ConvertInt8

func ConvertInt8(value Value, _ *Interpreter) Value

func ConvertUFix64

func ConvertUFix64(value Value, interpreter *Interpreter) Value

func ConvertUInt

func ConvertUInt(value Value, _ *Interpreter) Value

func ConvertUInt128

func ConvertUInt128(value Value, _ *Interpreter) Value

func ConvertUInt16

func ConvertUInt16(value Value, _ *Interpreter) Value

func ConvertUInt256

func ConvertUInt256(value Value, _ *Interpreter) Value

func ConvertUInt32

func ConvertUInt32(value Value, _ *Interpreter) Value

func ConvertUInt64

func ConvertUInt64(value Value, _ *Interpreter) Value

func ConvertUInt8

func ConvertUInt8(value Value, _ *Interpreter) Value

func ConvertWord16

func ConvertWord16(value Value, interpreter *Interpreter) Value

func ConvertWord32

func ConvertWord32(value Value, interpreter *Interpreter) Value

func ConvertWord64

func ConvertWord64(value Value, interpreter *Interpreter) Value

func ConvertWord8

func ConvertWord8(value Value, interpreter *Interpreter) Value

func DecodeValue added in v0.2.0

func DecodeValue(b []byte, owner *common.Address, path []string) (Value, error)

Decode returns a value decoded from its CBOR-encoded representation, for the given owner (can be `nil`).

The given path is used to identify values in the object graph. For example, path elements are appended for array elements (the index), dictionary values (the key), and composites (the field name).

type ValueConverter

type ValueConverter func(Value, *Interpreter) Value

type ValueIndexableValue

type ValueIndexableValue interface {
	Get(interpreter *Interpreter, locationRange LocationRange, key Value) Value
	Set(interpreter *Interpreter, locationRange LocationRange, key Value, value Value)
}

type Variable

type Variable struct {
	Value Value
}

type VariableSizedStaticType

type VariableSizedStaticType struct {
	Type StaticType
}

func (VariableSizedStaticType) String

func (t VariableSizedStaticType) String() string

type VoidDynamicType

type VoidDynamicType struct{}

func (VoidDynamicType) IsDynamicType

func (VoidDynamicType) IsDynamicType()

type VoidValue

type VoidValue struct{}

func (VoidValue) Copy

func (v VoidValue) Copy() Value

func (VoidValue) DynamicType

func (VoidValue) DynamicType(_ *Interpreter) DynamicType

func (VoidValue) GetOwner

func (VoidValue) GetOwner() *common.Address

func (VoidValue) IsModified added in v0.3.0

func (VoidValue) IsModified() bool

func (VoidValue) IsValue

func (VoidValue) IsValue()

func (VoidValue) SetModified added in v0.3.0

func (VoidValue) SetModified(_ bool)

func (VoidValue) SetOwner

func (VoidValue) SetOwner(_ *common.Address)

func (VoidValue) String

func (VoidValue) String() string

type Word16Value

type Word16Value uint16

func (Word16Value) BitwiseAnd added in v0.2.0

func (v Word16Value) BitwiseAnd(other IntegerValue) IntegerValue

func (Word16Value) BitwiseLeftShift added in v0.2.0

func (v Word16Value) BitwiseLeftShift(other IntegerValue) IntegerValue

func (Word16Value) BitwiseOr added in v0.2.0

func (v Word16Value) BitwiseOr(other IntegerValue) IntegerValue

func (Word16Value) BitwiseRightShift added in v0.2.0

func (v Word16Value) BitwiseRightShift(other IntegerValue) IntegerValue

func (Word16Value) BitwiseXor added in v0.2.0

func (v Word16Value) BitwiseXor(other IntegerValue) IntegerValue

func (Word16Value) Copy

func (v Word16Value) Copy() Value

func (Word16Value) Div

func (v Word16Value) Div(other NumberValue) NumberValue

func (Word16Value) DynamicType

func (Word16Value) DynamicType(_ *Interpreter) DynamicType

func (Word16Value) Equal

func (v Word16Value) Equal(other Value) BoolValue

func (Word16Value) GetMember added in v0.3.0

func (v Word16Value) GetMember(_ *Interpreter, _ LocationRange, name string) Value

func (Word16Value) GetOwner

func (Word16Value) GetOwner() *common.Address

func (Word16Value) Greater

func (v Word16Value) Greater(other NumberValue) BoolValue

func (Word16Value) GreaterEqual

func (v Word16Value) GreaterEqual(other NumberValue) BoolValue

func (Word16Value) IsModified added in v0.3.0

func (Word16Value) IsModified() bool

func (Word16Value) IsValue

func (Word16Value) IsValue()

func (Word16Value) KeyString

func (v Word16Value) KeyString() string

func (Word16Value) Less

func (v Word16Value) Less(other NumberValue) BoolValue

func (Word16Value) LessEqual

func (v Word16Value) LessEqual(other NumberValue) BoolValue

func (Word16Value) Minus

func (v Word16Value) Minus(other NumberValue) NumberValue

func (Word16Value) Mod

func (v Word16Value) Mod(other NumberValue) NumberValue

func (Word16Value) Mul

func (v Word16Value) Mul(other NumberValue) NumberValue

func (Word16Value) Negate

func (v Word16Value) Negate() NumberValue

func (Word16Value) Plus

func (v Word16Value) Plus(other NumberValue) NumberValue

func (Word16Value) SetMember added in v0.3.0

func (Word16Value) SetMember(_ *Interpreter, _ LocationRange, _ string, _ Value)

func (Word16Value) SetModified added in v0.3.0

func (Word16Value) SetModified(_ bool)

func (Word16Value) SetOwner

func (Word16Value) SetOwner(_ *common.Address)

func (Word16Value) String

func (v Word16Value) String() string

func (Word16Value) ToInt

func (v Word16Value) ToInt() int

type Word32Value

type Word32Value uint32

func (Word32Value) BitwiseAnd added in v0.2.0

func (v Word32Value) BitwiseAnd(other IntegerValue) IntegerValue

func (Word32Value) BitwiseLeftShift added in v0.2.0

func (v Word32Value) BitwiseLeftShift(other IntegerValue) IntegerValue

func (Word32Value) BitwiseOr added in v0.2.0

func (v Word32Value) BitwiseOr(other IntegerValue) IntegerValue

func (Word32Value) BitwiseRightShift added in v0.2.0

func (v Word32Value) BitwiseRightShift(other IntegerValue) IntegerValue

func (Word32Value) BitwiseXor added in v0.2.0

func (v Word32Value) BitwiseXor(other IntegerValue) IntegerValue

func (Word32Value) Copy

func (v Word32Value) Copy() Value

func (Word32Value) Div

func (v Word32Value) Div(other NumberValue) NumberValue

func (Word32Value) DynamicType

func (Word32Value) DynamicType(_ *Interpreter) DynamicType

func (Word32Value) Equal

func (v Word32Value) Equal(other Value) BoolValue

func (Word32Value) GetMember added in v0.3.0

func (v Word32Value) GetMember(_ *Interpreter, _ LocationRange, name string) Value

func (Word32Value) GetOwner

func (Word32Value) GetOwner() *common.Address

func (Word32Value) Greater

func (v Word32Value) Greater(other NumberValue) BoolValue

func (Word32Value) GreaterEqual

func (v Word32Value) GreaterEqual(other NumberValue) BoolValue

func (Word32Value) IsModified added in v0.3.0

func (Word32Value) IsModified() bool

func (Word32Value) IsValue

func (Word32Value) IsValue()

func (Word32Value) KeyString

func (v Word32Value) KeyString() string

func (Word32Value) Less

func (v Word32Value) Less(other NumberValue) BoolValue

func (Word32Value) LessEqual

func (v Word32Value) LessEqual(other NumberValue) BoolValue

func (Word32Value) Minus

func (v Word32Value) Minus(other NumberValue) NumberValue

func (Word32Value) Mod

func (v Word32Value) Mod(other NumberValue) NumberValue

func (Word32Value) Mul

func (v Word32Value) Mul(other NumberValue) NumberValue

func (Word32Value) Negate

func (v Word32Value) Negate() NumberValue

func (Word32Value) Plus

func (v Word32Value) Plus(other NumberValue) NumberValue

func (Word32Value) SetMember added in v0.3.0

func (Word32Value) SetMember(_ *Interpreter, _ LocationRange, _ string, _ Value)

func (Word32Value) SetModified added in v0.3.0

func (Word32Value) SetModified(_ bool)

func (Word32Value) SetOwner

func (Word32Value) SetOwner(_ *common.Address)

func (Word32Value) String

func (v Word32Value) String() string

func (Word32Value) ToInt

func (v Word32Value) ToInt() int

type Word64Value

type Word64Value uint64

func (Word64Value) BitwiseAnd added in v0.2.0

func (v Word64Value) BitwiseAnd(other IntegerValue) IntegerValue

func (Word64Value) BitwiseLeftShift added in v0.2.0

func (v Word64Value) BitwiseLeftShift(other IntegerValue) IntegerValue

func (Word64Value) BitwiseOr added in v0.2.0

func (v Word64Value) BitwiseOr(other IntegerValue) IntegerValue

func (Word64Value) BitwiseRightShift added in v0.2.0

func (v Word64Value) BitwiseRightShift(other IntegerValue) IntegerValue

func (Word64Value) BitwiseXor added in v0.2.0

func (v Word64Value) BitwiseXor(other IntegerValue) IntegerValue

func (Word64Value) Copy

func (v Word64Value) Copy() Value

func (Word64Value) Div

func (v Word64Value) Div(other NumberValue) NumberValue

func (Word64Value) DynamicType

func (Word64Value) DynamicType(_ *Interpreter) DynamicType

func (Word64Value) Equal

func (v Word64Value) Equal(other Value) BoolValue

func (Word64Value) GetMember added in v0.3.0

func (v Word64Value) GetMember(_ *Interpreter, _ LocationRange, name string) Value

func (Word64Value) GetOwner

func (Word64Value) GetOwner() *common.Address

func (Word64Value) Greater

func (v Word64Value) Greater(other NumberValue) BoolValue

func (Word64Value) GreaterEqual

func (v Word64Value) GreaterEqual(other NumberValue) BoolValue

func (Word64Value) IsModified added in v0.3.0

func (Word64Value) IsModified() bool

func (Word64Value) IsValue

func (Word64Value) IsValue()

func (Word64Value) KeyString

func (v Word64Value) KeyString() string

func (Word64Value) Less

func (v Word64Value) Less(other NumberValue) BoolValue

func (Word64Value) LessEqual

func (v Word64Value) LessEqual(other NumberValue) BoolValue

func (Word64Value) Minus

func (v Word64Value) Minus(other NumberValue) NumberValue

func (Word64Value) Mod

func (v Word64Value) Mod(other NumberValue) NumberValue

func (Word64Value) Mul

func (v Word64Value) Mul(other NumberValue) NumberValue

func (Word64Value) Negate

func (v Word64Value) Negate() NumberValue

func (Word64Value) Plus

func (v Word64Value) Plus(other NumberValue) NumberValue

func (Word64Value) SetMember added in v0.3.0

func (Word64Value) SetMember(_ *Interpreter, _ LocationRange, _ string, _ Value)

func (Word64Value) SetModified added in v0.3.0

func (Word64Value) SetModified(_ bool)

func (Word64Value) SetOwner

func (Word64Value) SetOwner(_ *common.Address)

func (Word64Value) String

func (v Word64Value) String() string

func (Word64Value) ToInt

func (v Word64Value) ToInt() int

type Word8Value

type Word8Value uint8

func (Word8Value) BitwiseAnd added in v0.2.0

func (v Word8Value) BitwiseAnd(other IntegerValue) IntegerValue

func (Word8Value) BitwiseLeftShift added in v0.2.0

func (v Word8Value) BitwiseLeftShift(other IntegerValue) IntegerValue

func (Word8Value) BitwiseOr added in v0.2.0

func (v Word8Value) BitwiseOr(other IntegerValue) IntegerValue

func (Word8Value) BitwiseRightShift added in v0.2.0

func (v Word8Value) BitwiseRightShift(other IntegerValue) IntegerValue

func (Word8Value) BitwiseXor added in v0.2.0

func (v Word8Value) BitwiseXor(other IntegerValue) IntegerValue

func (Word8Value) Copy

func (v Word8Value) Copy() Value

func (Word8Value) Div

func (v Word8Value) Div(other NumberValue) NumberValue

func (Word8Value) DynamicType

func (Word8Value) DynamicType(_ *Interpreter) DynamicType

func (Word8Value) Equal

func (v Word8Value) Equal(other Value) BoolValue

func (Word8Value) GetMember added in v0.3.0

func (v Word8Value) GetMember(_ *Interpreter, _ LocationRange, name string) Value

func (Word8Value) GetOwner

func (Word8Value) GetOwner() *common.Address

func (Word8Value) Greater

func (v Word8Value) Greater(other NumberValue) BoolValue

func (Word8Value) GreaterEqual

func (v Word8Value) GreaterEqual(other NumberValue) BoolValue

func (Word8Value) IsModified added in v0.3.0

func (Word8Value) IsModified() bool

func (Word8Value) IsValue

func (Word8Value) IsValue()

func (Word8Value) KeyString

func (v Word8Value) KeyString() string

func (Word8Value) Less

func (v Word8Value) Less(other NumberValue) BoolValue

func (Word8Value) LessEqual

func (v Word8Value) LessEqual(other NumberValue) BoolValue

func (Word8Value) Minus

func (v Word8Value) Minus(other NumberValue) NumberValue

func (Word8Value) Mod

func (v Word8Value) Mod(other NumberValue) NumberValue

func (Word8Value) Mul

func (v Word8Value) Mul(other NumberValue) NumberValue

func (Word8Value) Negate

func (v Word8Value) Negate() NumberValue

func (Word8Value) Plus

func (v Word8Value) Plus(other NumberValue) NumberValue

func (Word8Value) SetMember added in v0.3.0

func (Word8Value) SetMember(_ *Interpreter, _ LocationRange, _ string, _ Value)

func (Word8Value) SetModified added in v0.3.0

func (Word8Value) SetModified(_ bool)

func (Word8Value) SetOwner

func (Word8Value) SetOwner(_ *common.Address)

func (Word8Value) String

func (v Word8Value) String() string

func (Word8Value) ToInt

func (v Word8Value) ToInt() int

Jump to

Keyboard shortcuts

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