Documentation ¶
Index ¶
- Constants
- Variables
- func AdditionalAtreeMemoryUsage(originalCount uint64, elementSize uint, array bool) (MemoryUsage, MemoryUsage)
- func BigIntByteLength(v *big.Int) int
- func CompositeKindCount() int
- func DeclarationKindCount() int
- func EnumerateWords(words []string, conjunction string) string
- func LocationsInSameAccount(first, second Location) bool
- func NewArrayMemoryUsages(count uint64, elementSize uint) (MemoryUsage, MemoryUsage, MemoryUsage, MemoryUsage)
- func NewBigInt(gauge MemoryGauge) *big.Int
- func NewBigIntFromAbsoluteValue(gauge MemoryGauge, value *big.Int) *big.Int
- func NewCadenceArrayMemoryUsages(length int) (MemoryUsage, MemoryUsage)
- func NewCadenceContractMemoryUsages(fields int) (MemoryUsage, MemoryUsage)
- func NewCadenceEnumMemoryUsages(fields int) (MemoryUsage, MemoryUsage)
- func NewCadenceEventMemoryUsages(fields int) (MemoryUsage, MemoryUsage)
- func NewCadenceResourceMemoryUsages(fields int) (MemoryUsage, MemoryUsage)
- func NewCadenceStructMemoryUsages(fields int) (MemoryUsage, MemoryUsage)
- func NewCompositeMemoryUsages(count uint64, elementSize uint) (MemoryUsage, MemoryUsage, MemoryUsage, MemoryUsage)
- func NewDictionaryMemoryUsages(count uint64, elementSize uint) (MemoryUsage, MemoryUsage, MemoryUsage, MemoryUsage)
- func NewOrderedMapMemoryUsages(size uint64) (MemoryUsage, MemoryUsage, MemoryUsage)
- func OverEstimateBigIntFromString(s string) int
- func RegisterTypeIDDecoder(prefix string, decoder TypeIDDecoder)
- func UseMemory(gauge MemoryGauge, usage MemoryUsage)
- type Address
- type AddressLocation
- func (l AddressLocation) Description() string
- func (l AddressLocation) ID() LocationID
- func (l AddressLocation) MarshalJSON() ([]byte, error)
- func (l AddressLocation) MeteredID(memoryGauge MemoryGauge) LocationID
- func (l AddressLocation) QualifiedIdentifier(typeID TypeID) string
- func (l AddressLocation) String() string
- func (l AddressLocation) TypeID(memoryGauge MemoryGauge, qualifiedIdentifier string) TypeID
- type CompositeKind
- func (k CompositeKind) Annotation() string
- func (k CompositeKind) ConstructionKeyword() string
- func (k CompositeKind) DeclarationKind(isInterface bool) DeclarationKind
- func (k CompositeKind) DestructionKeyword() any
- func (k CompositeKind) Keyword() string
- func (k CompositeKind) MarshalJSON() ([]byte, error)
- func (k CompositeKind) MoveOperator() string
- func (k CompositeKind) Name() string
- func (i CompositeKind) String() string
- func (k CompositeKind) SupportsInterfaces() bool
- func (k CompositeKind) TransferOperator() string
- type ComputationKind
- type ControlStatement
- type DeclarationKind
- type HasLocation
- type IdentifierLocation
- func (l IdentifierLocation) Description() string
- func (l IdentifierLocation) ID() LocationID
- func (l IdentifierLocation) MarshalJSON() ([]byte, error)
- func (l IdentifierLocation) MeteredID(memoryGauge MemoryGauge) LocationID
- func (l IdentifierLocation) QualifiedIdentifier(typeID TypeID) string
- func (l IdentifierLocation) String() string
- func (l IdentifierLocation) TypeID(memoryGauge MemoryGauge, qualifiedIdentifier string) TypeID
- type Location
- type LocationID
- type MemoryGauge
- type MemoryKind
- type MemoryUsage
- func NewArrayExpressionMemoryUsage(length int) MemoryUsage
- func NewAtreeEncodedSlabMemoryUsage(slabsCount uint) MemoryUsage
- func NewAtreeMapPreAllocatedElementsMemoryUsage(count uint64, elementSize uint) MemoryUsage
- func NewBigIntMemoryUsage(bytes int) MemoryUsage
- func NewBitwiseAndBigIntMemoryUsage(a, b *big.Int) MemoryUsage
- func NewBitwiseLeftShiftBigIntMemoryUsage(a, b *big.Int) MemoryUsage
- func NewBitwiseOrBigIntMemoryUsage(a, b *big.Int) MemoryUsage
- func NewBitwiseRightShiftBigIntMemoryUsage(a, b *big.Int) MemoryUsage
- func NewBitwiseXorBigIntMemoryUsage(a, b *big.Int) MemoryUsage
- func NewBytesMemoryUsage(length int) MemoryUsage
- func NewCadenceBigIntMemoryUsage(bytes int) MemoryUsage
- func NewCadenceCharacterMemoryUsage(length int) MemoryUsage
- func NewCadenceIntMemoryUsage(bytes int) MemoryUsage
- func NewCadenceNumberMemoryUsage(bytes int) MemoryUsage
- func NewCadenceStringMemoryUsage(length int) MemoryUsage
- func NewCharacterMemoryUsage(length int) MemoryUsage
- func NewConstantMemoryUsage(kind MemoryKind) MemoryUsage
- func NewDictionaryExpressionMemoryUsage(length int) MemoryUsage
- func NewDivBigIntMemoryUsage(a, b *big.Int) MemoryUsage
- func NewMembersMemoryUsage(length int) MemoryUsage
- func NewMinusBigIntMemoryUsage(a, b *big.Int) MemoryUsage
- func NewModBigIntMemoryUsage(a, b *big.Int) MemoryUsage
- func NewMulBigIntMemoryUsage(a, b *big.Int) MemoryUsage
- func NewNegateBigIntMemoryUsage(b *big.Int) MemoryUsage
- func NewNumberMemoryUsage(bytes int) MemoryUsage
- func NewPlusBigIntMemoryUsage(a, b *big.Int) MemoryUsage
- func NewRawStringMemoryUsage(length int) MemoryUsage
- func NewSimpleCompositeMemoryUsage(length int) MemoryUsage
- func NewStringMemoryUsage(length int) MemoryUsage
- type OperandSide
- type OperationKind
- type PathDomain
- type REPLLocation
- func (l REPLLocation) Description() string
- func (l REPLLocation) ID() LocationID
- func (l REPLLocation) MarshalJSON() ([]byte, error)
- func (l REPLLocation) MeteredID(memoryGauge MemoryGauge) LocationID
- func (l REPLLocation) QualifiedIdentifier(typeID TypeID) string
- func (l REPLLocation) String() string
- func (l REPLLocation) TypeID(memoryGauge MemoryGauge, qualifiedIdentifier string) TypeID
- type ScriptLocation
- func (l ScriptLocation) Description() string
- func (l ScriptLocation) ID() LocationID
- func (l ScriptLocation) MarshalJSON() ([]byte, error)
- func (l ScriptLocation) MeteredID(memoryGauge MemoryGauge) LocationID
- func (l ScriptLocation) QualifiedIdentifier(typeID TypeID) string
- func (l ScriptLocation) String() string
- func (l ScriptLocation) TypeID(memoryGauge MemoryGauge, qualifiedIdentifier string) TypeID
- type StringLocation
- func (l StringLocation) Description() string
- func (l StringLocation) ID() LocationID
- func (l StringLocation) MarshalJSON() ([]byte, error)
- func (l StringLocation) MeteredID(memoryGauge MemoryGauge) LocationID
- func (l StringLocation) QualifiedIdentifier(typeID TypeID) string
- func (l StringLocation) String() string
- func (l StringLocation) TypeID(memoryGauge MemoryGauge, qualifiedIdentifier string) TypeID
- type TransactionLocation
- func (l TransactionLocation) Description() string
- func (l TransactionLocation) ID() LocationID
- func (l TransactionLocation) MarshalJSON() ([]byte, error)
- func (l TransactionLocation) MeteredID(memoryGauge MemoryGauge) LocationID
- func (l TransactionLocation) QualifiedIdentifier(typeID TypeID) string
- func (l TransactionLocation) String() string
- func (l TransactionLocation) TypeID(memoryGauge MemoryGauge, qualifiedIdentifier string) TypeID
- type TypeID
- type TypeIDDecoder
Constants ¶
const AddressLength = 8
const AddressLocationPrefix = "A"
const ComputationKindRangeStart = 1000
[1000,2000) is reserved for Cadence interpreter and runtime
const IdentifierLocationPrefix = "I"
const REPLLocationPrefix = "REPL"
const ScriptLocationPrefix = "s"
const StringLocationPrefix = "S"
const TransactionLocationPrefix = "t"
Variables ¶
var ( ValueTokenMemoryUsage = NewConstantMemoryUsage(MemoryKindValueToken) SyntaxTokenMemoryUsage = NewConstantMemoryUsage(MemoryKindSyntaxToken) SpaceTokenMemoryUsage = NewConstantMemoryUsage(MemoryKindSpaceToken) ProgramMemoryUsage = NewConstantMemoryUsage(MemoryKindProgram) IdentifierMemoryUsage = NewConstantMemoryUsage(MemoryKindIdentifier) ArgumentMemoryUsage = NewConstantMemoryUsage(MemoryKindArgument) BlockMemoryUsage = NewConstantMemoryUsage(MemoryKindBlock) FunctionBlockMemoryUsage = NewConstantMemoryUsage(MemoryKindFunctionBlock) ParameterMemoryUsage = NewConstantMemoryUsage(MemoryKindParameter) ParameterListMemoryUsage = NewConstantMemoryUsage(MemoryKindParameterList) TransferMemoryUsage = NewConstantMemoryUsage(MemoryKindTransfer) TypeAnnotationMemoryUsage = NewConstantMemoryUsage(MemoryKindTypeAnnotation) DictionaryEntryMemoryUsage = NewConstantMemoryUsage(MemoryKindDictionaryEntry) FunctionDeclarationMemoryUsage = NewConstantMemoryUsage(MemoryKindFunctionDeclaration) CompositeDeclarationMemoryUsage = NewConstantMemoryUsage(MemoryKindCompositeDeclaration) InterfaceDeclarationMemoryUsage = NewConstantMemoryUsage(MemoryKindInterfaceDeclaration) ImportDeclarationMemoryUsage = NewConstantMemoryUsage(MemoryKindImportDeclaration) TransactionDeclarationMemoryUsage = NewConstantMemoryUsage(MemoryKindTransactionDeclaration) FieldDeclarationMemoryUsage = NewConstantMemoryUsage(MemoryKindFieldDeclaration) EnumCaseDeclarationMemoryUsage = NewConstantMemoryUsage(MemoryKindEnumCaseDeclaration) VariableDeclarationMemoryUsage = NewConstantMemoryUsage(MemoryKindVariableDeclaration) SpecialFunctionDeclarationMemoryUsage = NewConstantMemoryUsage(MemoryKindSpecialFunctionDeclaration) PragmaDeclarationMemoryUsage = NewConstantMemoryUsage(MemoryKindPragmaDeclaration) AssignmentStatementMemoryUsage = NewConstantMemoryUsage(MemoryKindAssignmentStatement) BreakStatementMemoryUsage = NewConstantMemoryUsage(MemoryKindBreakStatement) ContinueStatementMemoryUsage = NewConstantMemoryUsage(MemoryKindContinueStatement) EmitStatementMemoryUsage = NewConstantMemoryUsage(MemoryKindEmitStatement) ExpressionStatementMemoryUsage = NewConstantMemoryUsage(MemoryKindExpressionStatement) ForStatementMemoryUsage = NewConstantMemoryUsage(MemoryKindForStatement) IfStatementMemoryUsage = NewConstantMemoryUsage(MemoryKindIfStatement) ReturnStatementMemoryUsage = NewConstantMemoryUsage(MemoryKindReturnStatement) SwapStatementMemoryUsage = NewConstantMemoryUsage(MemoryKindSwapStatement) SwitchStatementMemoryUsage = NewConstantMemoryUsage(MemoryKindSwitchStatement) WhileStatementMemoryUsage = NewConstantMemoryUsage(MemoryKindWhileStatement) BooleanExpressionMemoryUsage = NewConstantMemoryUsage(MemoryKindBooleanExpression) NilExpressionMemoryUsage = NewConstantMemoryUsage(MemoryKindNilExpression) StringExpressionMemoryUsage = NewConstantMemoryUsage(MemoryKindStringExpression) IntegerExpressionMemoryUsage = NewConstantMemoryUsage(MemoryKindIntegerExpression) FixedPointExpressionMemoryUsage = NewConstantMemoryUsage(MemoryKindFixedPointExpression) IdentifierExpressionMemoryUsage = NewConstantMemoryUsage(MemoryKindIdentifierExpression) InvocationExpressionMemoryUsage = NewConstantMemoryUsage(MemoryKindInvocationExpression) MemberExpressionMemoryUsage = NewConstantMemoryUsage(MemoryKindMemberExpression) IndexExpressionMemoryUsage = NewConstantMemoryUsage(MemoryKindIndexExpression) ConditionalExpressionMemoryUsage = NewConstantMemoryUsage(MemoryKindConditionalExpression) UnaryExpressionMemoryUsage = NewConstantMemoryUsage(MemoryKindUnaryExpression) BinaryExpressionMemoryUsage = NewConstantMemoryUsage(MemoryKindBinaryExpression) FunctionExpressionMemoryUsage = NewConstantMemoryUsage(MemoryKindFunctionExpression) CastingExpressionMemoryUsage = NewConstantMemoryUsage(MemoryKindCastingExpression) CreateExpressionMemoryUsage = NewConstantMemoryUsage(MemoryKindCreateExpression) DestroyExpressionMemoryUsage = NewConstantMemoryUsage(MemoryKindDestroyExpression) ReferenceExpressionMemoryUsage = NewConstantMemoryUsage(MemoryKindReferenceExpression) ForceExpressionMemoryUsage = NewConstantMemoryUsage(MemoryKindForceExpression) PathExpressionMemoryUsage = NewConstantMemoryUsage(MemoryKindPathExpression) ConstantSizedTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindConstantSizedType) DictionaryTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindDictionaryType) FunctionTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindFunctionType) InstantiationTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindInstantiationType) NominalTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindNominalType) OptionalTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindOptionalType) ReferenceTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindReferenceType) RestrictedTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindRestrictedType) VariableSizedTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindVariableSizedType) PositionMemoryUsage = NewConstantMemoryUsage(MemoryKindPosition) RangeMemoryUsage = NewConstantMemoryUsage(MemoryKindRange) ElaborationMemoryUsage = NewConstantMemoryUsage(MemoryKindElaboration) ActivationMemoryUsage = NewConstantMemoryUsage(MemoryKindActivation) ActivationEntriesMemoryUsage = NewConstantMemoryUsage(MemoryKindActivationEntries) SimpleCompositeValueBaseMemoryUsage = NewConstantMemoryUsage(MemoryKindSimpleCompositeValueBase) AtreeMapElementOverhead = NewConstantMemoryUsage(MemoryKindAtreeMapElementOverhead) AtreeArrayElementOverhead = NewConstantMemoryUsage(MemoryKindAtreeArrayElementOverhead) CompositeTypeInfoMemoryUsage = NewConstantMemoryUsage(MemoryKindCompositeTypeInfo) CompositeFieldMemoryUsage = NewConstantMemoryUsage(MemoryKindCompositeField) DictionaryValueBaseMemoryUsage = NewConstantMemoryUsage(MemoryKindDictionaryValueBase) ArrayValueBaseMemoryUsage = NewConstantMemoryUsage(MemoryKindArrayValueBase) CompositeValueBaseMemoryUsage = NewConstantMemoryUsage(MemoryKindCompositeValueBase) AddressValueMemoryUsage = NewConstantMemoryUsage(MemoryKindAddressValue) BoolValueMemoryUsage = NewConstantMemoryUsage(MemoryKindBoolValue) NilValueMemoryUsage = NewConstantMemoryUsage(MemoryKindNilValue) VoidValueMemoryUsage = NewConstantMemoryUsage(MemoryKindVoidValue) BoundFunctionValueMemoryUsage = NewConstantMemoryUsage(MemoryKindBoundFunctionValue) HostFunctionValueMemoryUsage = NewConstantMemoryUsage(MemoryKindHostFunctionValue) InterpretedFunctionValueMemoryUsage = NewConstantMemoryUsage(MemoryKindInterpretedFunctionValue) CapabilityValueMemoryUsage = NewConstantMemoryUsage(MemoryKindCapabilityValue) EphemeralReferenceValueMemoryUsage = NewConstantMemoryUsage(MemoryKindEphemeralReferenceValue) StorageReferenceValueMemoryUsage = NewConstantMemoryUsage(MemoryKindStorageReferenceValue) LinkValueMemoryUsage = NewConstantMemoryUsage(MemoryKindLinkValue) PathValueMemoryUsage = NewConstantMemoryUsage(MemoryKindPathValue) OptionalValueMemoryUsage = NewConstantMemoryUsage(MemoryKindOptionalValue) TypeValueMemoryUsage = NewConstantMemoryUsage(MemoryKindTypeValue) PrimitiveStaticTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindPrimitiveStaticType) CompositeStaticTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindCompositeStaticType) InterfaceStaticTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindInterfaceStaticType) VariableSizedStaticTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindVariableSizedStaticType) ConstantSizedStaticTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindConstantSizedStaticType) DictionaryStaticTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindDictionaryStaticType) OptionalStaticTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindOptionalStaticType) RestrictedStaticTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindRestrictedStaticType) ReferenceStaticTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindReferenceStaticType) CapabilityStaticTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindCapabilityStaticType) FunctionStaticTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindFunctionStaticType) VariableSizedSemaTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindVariableSizedSemaType) ConstantSizedSemaTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindConstantSizedSemaType) DictionarySemaTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindDictionarySemaType) OptionalSemaTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindOptionalSemaType) RestrictedSemaTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindRestrictedSemaType) ReferenceSemaTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindReferenceSemaType) CapabilitySemaTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindCapabilitySemaType) OrderedMapMemoryUsage = NewConstantMemoryUsage(MemoryKindOrderedMap) InvocationMemoryUsage = NewConstantMemoryUsage(MemoryKindInvocation) StorageMapMemoryUsage = NewConstantMemoryUsage(MemoryKindStorageMap) StorageKeyMemoryUsage = NewConstantMemoryUsage(MemoryKindStorageKey) CadenceDictionaryValueMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceDictionaryValue) CadenceArrayValueBaseMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceArrayValueBase) CadenceStructValueBaseMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceStructValueBase) CadenceResourceValueBaseMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceResourceValueBase) CadenceEventValueBaseMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceEventValueBase) CadenceContractValueBaseMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceContractValueBase) CadenceEnumValueBaseMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceEnumValueBase) CadenceAddressValueMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceAddressValue) CadenceBoolValueMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceBoolValue) CadenceCapabilityValueMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceCapabilityValue) CadenceKeyValuePairMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceKeyValuePair) CadenceLinkValueMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceLinkValue) CadenceOptionalValueMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceOptionalValue) CadencePathValueMemoryUsage = NewConstantMemoryUsage(MemoryKindCadencePathValue) CadenceVoidValueMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceVoidValue) CadenceTypeValueMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceTypeValue) CadenceSimpleTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceSimpleType) CadenceCapabilityTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceCapabilityType) CadenceConstantSizedArrayTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceConstantSizedArrayType) CadenceVariableSizedArrayTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceVariableSizedArrayType) CadenceContractInterfaceTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceContractInterfaceType) CadenceContractTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceContractType) CadenceDictionaryTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceDictionaryType) CadenceEnumTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceEnumType) CadenceEventTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceEventType) CadenceFunctionTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceFunctionType) CadenceOptionalTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceOptionalType) CadenceReferenceTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceReferenceType) CadenceResourceInterfaceTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceResourceInterfaceType) CadenceResourceTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceResourceType) CadenceRestrictedTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceRestrictedType) CadenceStructInterfaceTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceStructInterfaceType) CadenceStructTypeMemoryUsage = NewConstantMemoryUsage(MemoryKindCadenceStructType) VoidStringMemoryUsage = NewRawStringMemoryUsage(len("()")) TrueStringMemoryUsage = NewRawStringMemoryUsage(len("true")) FalseStringMemoryUsage = NewRawStringMemoryUsage(len("false")) TypeValueStringMemoryUsage = NewRawStringMemoryUsage(len("Type<>()")) NilValueStringMemoryUsage = NewRawStringMemoryUsage(len("nil")) StorageReferenceValueStringMemoryUsage = NewRawStringMemoryUsage(len("StorageReference()")) SeenReferenceStringMemoryUsage = NewRawStringMemoryUsage(3) // len(ellipsis) AddressValueStringMemoryUsage = NewRawStringMemoryUsage(AddressLength*2 + 2) // len(bytes-to-hex + prefix) HostFunctionValueStringMemoryUsage = NewRawStringMemoryUsage(len("Function(...)")) AuthAccountValueStringMemoryUsage = NewRawStringMemoryUsage(len("AuthAccount()")) PublicAccountValueStringMemoryUsage = NewRawStringMemoryUsage(len("PublicAccount()")) AuthAccountContractsStringMemoryUsage = NewRawStringMemoryUsage(len("AuthAccount.Contracts()")) PublicAccountContractsStringMemoryUsage = NewRawStringMemoryUsage(len("PublicAccount.Contracts()")) AuthAccountKeysStringMemoryUsage = NewRawStringMemoryUsage(len("AuthAccount.Keys()")) PublicAccountKeysStringMemoryUsage = NewRawStringMemoryUsage(len("PublicAccount.Keys()")) CapabilityValueStringMemoryUsage = NewRawStringMemoryUsage(len("Capability<>(address: , path: )")) LinkValueStringMemoryUsage = NewRawStringMemoryUsage(len("Link<>()")) VariableSizedStaticTypeStringMemoryUsage = NewRawStringMemoryUsage(2) // [] DictionaryStaticTypeStringMemoryUsage = NewRawStringMemoryUsage(4) // {: } OptionalStaticTypeStringMemoryUsage = NewRawStringMemoryUsage(1) // ? AuthReferenceStaticTypeStringMemoryUsage = NewRawStringMemoryUsage(5) // auth& ReferenceStaticTypeStringMemoryUsage = NewRawStringMemoryUsage(1) // & CapabilityStaticTypeStringMemoryUsage = NewRawStringMemoryUsage(12) // Capability<> )
var AllCompositeKinds = []CompositeKind{ CompositeKindStructure, CompositeKindResource, CompositeKindContract, CompositeKindEvent, CompositeKindEnum, }
var AllPathDomains = []PathDomain{ PathDomainStorage, PathDomainPrivate, PathDomainPublic, }
var AllPathDomainsByIdentifier = map[string]PathDomain{}
var CompositeKindsWithFieldsAndFunctions = []CompositeKind{ CompositeKindStructure, CompositeKindResource, CompositeKindContract, }
Functions ¶
func AdditionalAtreeMemoryUsage ¶ added in v0.24.0
func AdditionalAtreeMemoryUsage(originalCount uint64, elementSize uint, array bool) (MemoryUsage, MemoryUsage)
func BigIntByteLength ¶ added in v0.24.0
func CompositeKindCount ¶ added in v0.8.0
func CompositeKindCount() int
func DeclarationKindCount ¶ added in v0.8.0
func DeclarationKindCount() int
func EnumerateWords ¶
func LocationsInSameAccount ¶ added in v0.13.10
LocationsInSameAccount returns true if both locations are nil, if both locations are address locations when both locations have the same address, or otherwise if their IDs are the same.
func NewArrayMemoryUsages ¶ added in v0.24.0
func NewArrayMemoryUsages(count uint64, elementSize uint) (MemoryUsage, MemoryUsage, MemoryUsage, MemoryUsage)
func NewBigInt ¶ added in v0.24.0
func NewBigInt(gauge MemoryGauge) *big.Int
func NewBigIntFromAbsoluteValue ¶ added in v0.24.0
func NewBigIntFromAbsoluteValue(gauge MemoryGauge, value *big.Int) *big.Int
func NewCadenceArrayMemoryUsages ¶ added in v0.24.0
func NewCadenceArrayMemoryUsages(length int) (MemoryUsage, MemoryUsage)
func NewCadenceContractMemoryUsages ¶ added in v0.24.0
func NewCadenceContractMemoryUsages(fields int) (MemoryUsage, MemoryUsage)
func NewCadenceEnumMemoryUsages ¶ added in v0.24.0
func NewCadenceEnumMemoryUsages(fields int) (MemoryUsage, MemoryUsage)
func NewCadenceEventMemoryUsages ¶ added in v0.24.0
func NewCadenceEventMemoryUsages(fields int) (MemoryUsage, MemoryUsage)
func NewCadenceResourceMemoryUsages ¶ added in v0.24.0
func NewCadenceResourceMemoryUsages(fields int) (MemoryUsage, MemoryUsage)
func NewCadenceStructMemoryUsages ¶ added in v0.24.0
func NewCadenceStructMemoryUsages(fields int) (MemoryUsage, MemoryUsage)
func NewCompositeMemoryUsages ¶ added in v0.24.0
func NewCompositeMemoryUsages(count uint64, elementSize uint) (MemoryUsage, MemoryUsage, MemoryUsage, MemoryUsage)
func NewDictionaryMemoryUsages ¶ added in v0.24.0
func NewDictionaryMemoryUsages(count uint64, elementSize uint) (MemoryUsage, MemoryUsage, MemoryUsage, MemoryUsage)
func NewOrderedMapMemoryUsages ¶ added in v0.24.0
func NewOrderedMapMemoryUsages(size uint64) (MemoryUsage, MemoryUsage, MemoryUsage)
func OverEstimateBigIntFromString ¶ added in v0.24.0
OverEstimateBigIntFromString is an approximate inverse of `interpreter.OverEstimateBigIntStringLength`. Returns the estimated size in bytes.
func RegisterTypeIDDecoder ¶ added in v0.12.0
func RegisterTypeIDDecoder(prefix string, decoder TypeIDDecoder)
func UseMemory ¶ added in v0.24.0
func UseMemory(gauge MemoryGauge, usage MemoryUsage)
Types ¶
type Address ¶
type Address [AddressLength]byte
func BytesToAddress ¶
BytesToAddress returns Address with value b.
If the address is too large, then the function returns an error.
func HexToAddress ¶ added in v0.17.0
HexToAddress converts a hex string to an Address.
func MustBytesToAddress ¶ added in v0.21.0
MustBytesToAddress returns Address with value b.
If the address is too large, then the function panics.
func (Address) Bytes ¶ added in v0.2.0
Bytes returns address without leading zeros. The fast path is inlined and handles the most common scenario of address having no leading zeros. Otherwise, bytes() is called to trim leading zeros.
func (Address) HexWithPrefix ¶ added in v0.24.0
func (*Address) SetBytes ¶
SetBytes sets the address to the value of b.
If b is larger than len(a) it will panic.
func (Address) ShortHexWithPrefix ¶ added in v0.9.0
type AddressLocation ¶ added in v0.12.0
AddressLocation is the location of a contract/contract interface at an address
func NewAddressLocation ¶ added in v0.24.0
func NewAddressLocation(gauge MemoryGauge, addr Address, name string) AddressLocation
func (AddressLocation) Description ¶ added in v0.25.0
func (l AddressLocation) Description() string
func (AddressLocation) ID ¶ added in v0.12.0
func (l AddressLocation) ID() LocationID
func (AddressLocation) MarshalJSON ¶ added in v0.12.0
func (l AddressLocation) MarshalJSON() ([]byte, error)
func (AddressLocation) MeteredID ¶ added in v0.24.0
func (l AddressLocation) MeteredID(memoryGauge MemoryGauge) LocationID
func (AddressLocation) QualifiedIdentifier ¶ added in v0.12.0
func (l AddressLocation) QualifiedIdentifier(typeID TypeID) string
func (AddressLocation) String ¶ added in v0.12.0
func (l AddressLocation) String() string
func (AddressLocation) TypeID ¶ added in v0.12.0
func (l AddressLocation) TypeID(memoryGauge MemoryGauge, qualifiedIdentifier string) TypeID
type CompositeKind ¶
type CompositeKind uint
const ( CompositeKindUnknown CompositeKind = iota CompositeKindStructure CompositeKindResource CompositeKindContract CompositeKindEvent CompositeKindEnum )
func (CompositeKind) Annotation ¶
func (k CompositeKind) Annotation() string
func (CompositeKind) ConstructionKeyword ¶
func (k CompositeKind) ConstructionKeyword() string
func (CompositeKind) DeclarationKind ¶
func (k CompositeKind) DeclarationKind(isInterface bool) DeclarationKind
func (CompositeKind) DestructionKeyword ¶
func (k CompositeKind) DestructionKeyword() any
func (CompositeKind) Keyword ¶
func (k CompositeKind) Keyword() string
func (CompositeKind) MarshalJSON ¶ added in v0.8.0
func (k CompositeKind) MarshalJSON() ([]byte, error)
func (CompositeKind) MoveOperator ¶
func (k CompositeKind) MoveOperator() string
func (CompositeKind) Name ¶
func (k CompositeKind) Name() string
func (CompositeKind) String ¶
func (i CompositeKind) String() string
func (CompositeKind) SupportsInterfaces ¶
func (k CompositeKind) SupportsInterfaces() bool
func (CompositeKind) TransferOperator ¶
func (k CompositeKind) TransferOperator() string
type ComputationKind ¶ added in v0.23.2
type ComputationKind uint
ComputationKind captures kind of computation that would be used for metring computation
const ( ComputationKindUnknown ComputationKind = 0 // interpreter - base ComputationKindStatement ComputationKind = ComputationKindRangeStart + iota ComputationKindLoop ComputationKindFunctionInvocation // interpreter value operations ComputationKindCreateCompositeValue ComputationKindTransferCompositeValue ComputationKindDestroyCompositeValue ComputationKindCreateArrayValue ComputationKindTransferArrayValue ComputationKindDestroyArrayValue ComputationKindCreateDictionaryValue ComputationKindTransferDictionaryValue ComputationKindDestroyDictionaryValue // stdlibs computation kinds // ComputationKindSTDLIBPanic ComputationKindSTDLIBAssert ComputationKindSTDLIBUnsafeRandom // RLP ComputationKindSTDLIBRLPDecodeString ComputationKindSTDLIBRLPDecodeList )
func (ComputationKind) String ¶ added in v0.23.2
func (i ComputationKind) String() string
type ControlStatement ¶
type ControlStatement uint
const ( ControlStatementUnknown ControlStatement = iota ControlStatementBreak ControlStatementContinue )
func (ControlStatement) String ¶
func (i ControlStatement) String() string
func (ControlStatement) Symbol ¶
func (s ControlStatement) Symbol() string
type DeclarationKind ¶
type DeclarationKind uint
const ( DeclarationKindUnknown DeclarationKind = iota DeclarationKindValue DeclarationKindFunction DeclarationKindVariable DeclarationKindConstant DeclarationKindType DeclarationKindParameter DeclarationKindArgumentLabel DeclarationKindStructure DeclarationKindResource DeclarationKindContract DeclarationKindEvent DeclarationKindField DeclarationKindInitializer DeclarationKindDestructor DeclarationKindStructureInterface DeclarationKindResourceInterface DeclarationKindContractInterface DeclarationKindImport DeclarationKindSelf DeclarationKindTransaction DeclarationKindPrepare DeclarationKindExecute DeclarationKindTypeParameter DeclarationKindPragma DeclarationKindEnum DeclarationKindEnumCase )
func (DeclarationKind) IsTypeDeclaration ¶
func (k DeclarationKind) IsTypeDeclaration() bool
func (DeclarationKind) Keywords ¶
func (k DeclarationKind) Keywords() string
func (DeclarationKind) MarshalJSON ¶ added in v0.8.0
func (k DeclarationKind) MarshalJSON() ([]byte, error)
func (DeclarationKind) Name ¶
func (k DeclarationKind) Name() string
func (DeclarationKind) String ¶
func (i DeclarationKind) String() string
type HasLocation ¶ added in v0.25.0
type HasLocation interface {
ImportLocation() Location
}
type IdentifierLocation ¶ added in v0.12.0
type IdentifierLocation string
IdentifierLocation
func NewIdentifierLocation ¶ added in v0.24.0
func NewIdentifierLocation(gauge MemoryGauge, id string) IdentifierLocation
func (IdentifierLocation) Description ¶ added in v0.25.0
func (l IdentifierLocation) Description() string
func (IdentifierLocation) ID ¶ added in v0.12.0
func (l IdentifierLocation) ID() LocationID
func (IdentifierLocation) MarshalJSON ¶ added in v0.12.0
func (l IdentifierLocation) MarshalJSON() ([]byte, error)
func (IdentifierLocation) MeteredID ¶ added in v0.24.0
func (l IdentifierLocation) MeteredID(memoryGauge MemoryGauge) LocationID
func (IdentifierLocation) QualifiedIdentifier ¶ added in v0.12.0
func (l IdentifierLocation) QualifiedIdentifier(typeID TypeID) string
func (IdentifierLocation) String ¶ added in v0.12.0
func (l IdentifierLocation) String() string
func (IdentifierLocation) TypeID ¶ added in v0.12.0
func (l IdentifierLocation) TypeID(memoryGauge MemoryGauge, qualifiedIdentifier string) TypeID
type Location ¶ added in v0.12.0
type Location interface { fmt.Stringer // ID returns the canonical ID for this import location. ID() LocationID // MeteredID returns the canonical ID for this import location, and the generated ID is memory metered. MeteredID(memoryGauge MemoryGauge) LocationID // TypeID returns a type ID for the given qualified identifier TypeID(memoryGauge MemoryGauge, qualifiedIdentifier string) TypeID // QualifiedIdentifier returns the qualified identifier for the given type ID QualifiedIdentifier(typeID TypeID) string // Description returns a human-readable description. For example, it can be used in error messages Description() string }
Location describes the origin of a Cadence script. This could be a file, a transaction, or a smart contract.
func DecodeTypeID ¶ added in v0.12.0
func DecodeTypeID(gauge MemoryGauge, typeID string) (location Location, qualifiedIdentifier string, err error)
type LocationID ¶ added in v0.12.0
type LocationID string
LocationID
func NewLocationID ¶ added in v0.12.0
func NewLocationID(parts ...string) LocationID
func NewMeteredLocationID ¶ added in v0.24.0
func NewMeteredLocationID(memoryGauge MemoryGauge, parts ...string) LocationID
type MemoryGauge ¶ added in v0.24.0
type MemoryGauge interface {
MeterMemory(usage MemoryUsage) error
}
type MemoryKind ¶ added in v0.24.0
type MemoryKind uint
MemoryKind
const ( MemoryKindUnknown MemoryKind = iota MemoryKindBoolValue MemoryKindAddressValue MemoryKindStringValue MemoryKindCharacterValue MemoryKindNumberValue MemoryKindArrayValueBase MemoryKindDictionaryValueBase MemoryKindCompositeValueBase MemoryKindSimpleCompositeValueBase MemoryKindOptionalValue MemoryKindNilValue MemoryKindVoidValue MemoryKindTypeValue MemoryKindPathValue MemoryKindCapabilityValue MemoryKindLinkValue MemoryKindStorageReferenceValue MemoryKindEphemeralReferenceValue MemoryKindInterpretedFunctionValue MemoryKindHostFunctionValue MemoryKindBoundFunctionValue MemoryKindBigInt MemoryKindSimpleCompositeValue // Atree Nodes MemoryKindAtreeArrayDataSlab MemoryKindAtreeArrayMetaDataSlab MemoryKindAtreeArrayElementOverhead MemoryKindAtreeMapDataSlab MemoryKindAtreeMapMetaDataSlab MemoryKindAtreeMapElementOverhead MemoryKindAtreeMapPreAllocatedElement MemoryKindAtreeEncodedSlab // Static Types MemoryKindPrimitiveStaticType MemoryKindCompositeStaticType MemoryKindInterfaceStaticType MemoryKindVariableSizedStaticType MemoryKindConstantSizedStaticType MemoryKindDictionaryStaticType MemoryKindOptionalStaticType MemoryKindRestrictedStaticType MemoryKindReferenceStaticType MemoryKindCapabilityStaticType MemoryKindFunctionStaticType // Cadence Values MemoryKindCadenceVoidValue MemoryKindCadenceOptionalValue MemoryKindCadenceBoolValue MemoryKindCadenceStringValue MemoryKindCadenceCharacterValue MemoryKindCadenceAddressValue MemoryKindCadenceIntValue MemoryKindCadenceNumberValue MemoryKindCadenceArrayValueBase MemoryKindCadenceArrayValueLength MemoryKindCadenceDictionaryValue MemoryKindCadenceKeyValuePair MemoryKindCadenceStructValueBase MemoryKindCadenceStructValueSize MemoryKindCadenceResourceValueBase MemoryKindCadenceResourceValueSize MemoryKindCadenceEventValueBase MemoryKindCadenceEventValueSize MemoryKindCadenceContractValueBase MemoryKindCadenceContractValueSize MemoryKindCadenceEnumValueBase MemoryKindCadenceEnumValueSize MemoryKindCadenceLinkValue MemoryKindCadencePathValue MemoryKindCadenceTypeValue MemoryKindCadenceCapabilityValue // Cadence Types MemoryKindCadenceSimpleType MemoryKindCadenceOptionalType MemoryKindCadenceVariableSizedArrayType MemoryKindCadenceConstantSizedArrayType MemoryKindCadenceDictionaryType MemoryKindCadenceField MemoryKindCadenceParameter MemoryKindCadenceStructType MemoryKindCadenceResourceType MemoryKindCadenceEventType MemoryKindCadenceContractType MemoryKindCadenceStructInterfaceType MemoryKindCadenceResourceInterfaceType MemoryKindCadenceContractInterfaceType MemoryKindCadenceFunctionType MemoryKindCadenceReferenceType MemoryKindCadenceRestrictedType MemoryKindCadenceCapabilityType MemoryKindCadenceEnumType MemoryKindRawString MemoryKindAddressLocation MemoryKindBytes MemoryKindVariable MemoryKindCompositeTypeInfo MemoryKindCompositeField MemoryKindInvocation MemoryKindStorageMap MemoryKindStorageKey MemoryKindValueToken MemoryKindSyntaxToken MemoryKindSpaceToken MemoryKindProgram MemoryKindIdentifier MemoryKindArgument MemoryKindBlock MemoryKindFunctionBlock MemoryKindParameter MemoryKindParameterList MemoryKindTransfer MemoryKindMembers MemoryKindTypeAnnotation MemoryKindDictionaryEntry MemoryKindFunctionDeclaration MemoryKindCompositeDeclaration MemoryKindInterfaceDeclaration MemoryKindEnumCaseDeclaration MemoryKindFieldDeclaration MemoryKindTransactionDeclaration MemoryKindImportDeclaration MemoryKindVariableDeclaration MemoryKindSpecialFunctionDeclaration MemoryKindPragmaDeclaration MemoryKindAssignmentStatement MemoryKindBreakStatement MemoryKindContinueStatement MemoryKindEmitStatement MemoryKindExpressionStatement MemoryKindForStatement MemoryKindIfStatement MemoryKindReturnStatement MemoryKindSwapStatement MemoryKindSwitchStatement MemoryKindWhileStatement MemoryKindBooleanExpression MemoryKindNilExpression MemoryKindStringExpression MemoryKindIntegerExpression MemoryKindFixedPointExpression MemoryKindArrayExpression MemoryKindDictionaryExpression MemoryKindIdentifierExpression MemoryKindInvocationExpression MemoryKindMemberExpression MemoryKindIndexExpression MemoryKindConditionalExpression MemoryKindUnaryExpression MemoryKindBinaryExpression MemoryKindFunctionExpression MemoryKindCastingExpression MemoryKindCreateExpression MemoryKindDestroyExpression MemoryKindReferenceExpression MemoryKindForceExpression MemoryKindPathExpression MemoryKindConstantSizedType MemoryKindDictionaryType MemoryKindFunctionType MemoryKindInstantiationType MemoryKindNominalType MemoryKindOptionalType MemoryKindReferenceType MemoryKindRestrictedType MemoryKindVariableSizedType MemoryKindPosition MemoryKindRange MemoryKindElaboration MemoryKindActivation MemoryKindActivationEntries // sema types MemoryKindVariableSizedSemaType MemoryKindConstantSizedSemaType MemoryKindDictionarySemaType MemoryKindOptionalSemaType MemoryKindRestrictedSemaType MemoryKindReferenceSemaType MemoryKindCapabilitySemaType // ordered-map MemoryKindOrderedMap MemoryKindOrderedMapEntryList MemoryKindOrderedMapEntry // Placeholder kind to allow consistent indexing // this should always be the last kind MemoryKindLast )
func (MemoryKind) String ¶ added in v0.24.0
func (i MemoryKind) String() string
type MemoryUsage ¶ added in v0.24.0
type MemoryUsage struct { Kind MemoryKind Amount uint64 }
func NewArrayExpressionMemoryUsage ¶ added in v0.24.0
func NewArrayExpressionMemoryUsage(length int) MemoryUsage
func NewAtreeEncodedSlabMemoryUsage ¶ added in v0.24.0
func NewAtreeEncodedSlabMemoryUsage(slabsCount uint) MemoryUsage
func NewAtreeMapPreAllocatedElementsMemoryUsage ¶ added in v0.24.0
func NewAtreeMapPreAllocatedElementsMemoryUsage(count uint64, elementSize uint) MemoryUsage
func NewBigIntMemoryUsage ¶ added in v0.24.0
func NewBigIntMemoryUsage(bytes int) MemoryUsage
func NewBitwiseAndBigIntMemoryUsage ¶ added in v0.24.0
func NewBitwiseAndBigIntMemoryUsage(a, b *big.Int) MemoryUsage
func NewBitwiseLeftShiftBigIntMemoryUsage ¶ added in v0.24.0
func NewBitwiseLeftShiftBigIntMemoryUsage(a, b *big.Int) MemoryUsage
func NewBitwiseOrBigIntMemoryUsage ¶ added in v0.24.0
func NewBitwiseOrBigIntMemoryUsage(a, b *big.Int) MemoryUsage
func NewBitwiseRightShiftBigIntMemoryUsage ¶ added in v0.24.0
func NewBitwiseRightShiftBigIntMemoryUsage(a, b *big.Int) MemoryUsage
func NewBitwiseXorBigIntMemoryUsage ¶ added in v0.24.0
func NewBitwiseXorBigIntMemoryUsage(a, b *big.Int) MemoryUsage
func NewBytesMemoryUsage ¶ added in v0.24.0
func NewBytesMemoryUsage(length int) MemoryUsage
func NewCadenceBigIntMemoryUsage ¶ added in v0.24.0
func NewCadenceBigIntMemoryUsage(bytes int) MemoryUsage
func NewCadenceCharacterMemoryUsage ¶ added in v0.24.0
func NewCadenceCharacterMemoryUsage(length int) MemoryUsage
func NewCadenceIntMemoryUsage ¶ added in v0.24.0
func NewCadenceIntMemoryUsage(bytes int) MemoryUsage
func NewCadenceNumberMemoryUsage ¶ added in v0.24.0
func NewCadenceNumberMemoryUsage(bytes int) MemoryUsage
func NewCadenceStringMemoryUsage ¶ added in v0.24.0
func NewCadenceStringMemoryUsage(length int) MemoryUsage
func NewCharacterMemoryUsage ¶ added in v0.24.0
func NewCharacterMemoryUsage(length int) MemoryUsage
func NewConstantMemoryUsage ¶ added in v0.24.0
func NewConstantMemoryUsage(kind MemoryKind) MemoryUsage
func NewDictionaryExpressionMemoryUsage ¶ added in v0.24.0
func NewDictionaryExpressionMemoryUsage(length int) MemoryUsage
func NewDivBigIntMemoryUsage ¶ added in v0.24.0
func NewDivBigIntMemoryUsage(a, b *big.Int) MemoryUsage
func NewMembersMemoryUsage ¶ added in v0.24.0
func NewMembersMemoryUsage(length int) MemoryUsage
func NewMinusBigIntMemoryUsage ¶ added in v0.24.0
func NewMinusBigIntMemoryUsage(a, b *big.Int) MemoryUsage
func NewModBigIntMemoryUsage ¶ added in v0.24.0
func NewModBigIntMemoryUsage(a, b *big.Int) MemoryUsage
func NewMulBigIntMemoryUsage ¶ added in v0.24.0
func NewMulBigIntMemoryUsage(a, b *big.Int) MemoryUsage
func NewNegateBigIntMemoryUsage ¶ added in v0.24.0
func NewNegateBigIntMemoryUsage(b *big.Int) MemoryUsage
func NewNumberMemoryUsage ¶ added in v0.24.0
func NewNumberMemoryUsage(bytes int) MemoryUsage
func NewPlusBigIntMemoryUsage ¶ added in v0.24.0
func NewPlusBigIntMemoryUsage(a, b *big.Int) MemoryUsage
func NewRawStringMemoryUsage ¶ added in v0.24.0
func NewRawStringMemoryUsage(length int) MemoryUsage
func NewSimpleCompositeMemoryUsage ¶ added in v0.24.0
func NewSimpleCompositeMemoryUsage(length int) MemoryUsage
func NewStringMemoryUsage ¶ added in v0.24.0
func NewStringMemoryUsage(length int) MemoryUsage
type OperandSide ¶
type OperandSide uint
const ( OperandSideUnknown OperandSide = iota OperandSideLeft OperandSideRight )
func (OperandSide) Name ¶
func (s OperandSide) Name() string
func (OperandSide) String ¶
func (i OperandSide) String() string
type OperationKind ¶
type OperationKind uint
const ( OperationKindUnknown OperationKind = iota OperationKindUnary OperationKindBinary OperationKindTernary )
func (OperationKind) Name ¶
func (k OperationKind) Name() string
func (OperationKind) String ¶
func (i OperationKind) String() string
type PathDomain ¶
type PathDomain uint8
const ( PathDomainUnknown PathDomain = iota PathDomainStorage PathDomainPrivate PathDomainPublic )
func PathDomainFromIdentifier ¶
func PathDomainFromIdentifier(domain string) PathDomain
func (PathDomain) Identifier ¶
func (i PathDomain) Identifier() string
func (PathDomain) String ¶
func (i PathDomain) String() string
type REPLLocation ¶ added in v0.12.0
type REPLLocation struct{}
REPLLocation
func (REPLLocation) Description ¶ added in v0.25.0
func (l REPLLocation) Description() string
func (REPLLocation) ID ¶ added in v0.12.0
func (l REPLLocation) ID() LocationID
func (REPLLocation) MarshalJSON ¶ added in v0.12.0
func (l REPLLocation) MarshalJSON() ([]byte, error)
func (REPLLocation) MeteredID ¶ added in v0.24.0
func (l REPLLocation) MeteredID(memoryGauge MemoryGauge) LocationID
func (REPLLocation) QualifiedIdentifier ¶ added in v0.12.0
func (l REPLLocation) QualifiedIdentifier(typeID TypeID) string
func (REPLLocation) String ¶ added in v0.12.0
func (l REPLLocation) String() string
func (REPLLocation) TypeID ¶ added in v0.12.0
func (l REPLLocation) TypeID(memoryGauge MemoryGauge, qualifiedIdentifier string) TypeID
type ScriptLocation ¶ added in v0.12.0
type ScriptLocation [32]byte
ScriptLocation
func NewScriptLocation ¶ added in v0.24.0
func NewScriptLocation(gauge MemoryGauge, identifier []byte) (location ScriptLocation)
func (ScriptLocation) Description ¶ added in v0.25.0
func (l ScriptLocation) Description() string
func (ScriptLocation) ID ¶ added in v0.12.0
func (l ScriptLocation) ID() LocationID
func (ScriptLocation) MarshalJSON ¶ added in v0.12.0
func (l ScriptLocation) MarshalJSON() ([]byte, error)
func (ScriptLocation) MeteredID ¶ added in v0.24.0
func (l ScriptLocation) MeteredID(memoryGauge MemoryGauge) LocationID
func (ScriptLocation) QualifiedIdentifier ¶ added in v0.12.0
func (l ScriptLocation) QualifiedIdentifier(typeID TypeID) string
func (ScriptLocation) String ¶ added in v0.12.0
func (l ScriptLocation) String() string
func (ScriptLocation) TypeID ¶ added in v0.12.0
func (l ScriptLocation) TypeID(memoryGauge MemoryGauge, qualifiedIdentifier string) TypeID
type StringLocation ¶ added in v0.12.0
type StringLocation string
StringLocation
func NewStringLocation ¶ added in v0.24.0
func NewStringLocation(gauge MemoryGauge, id string) StringLocation
func (StringLocation) Description ¶ added in v0.25.0
func (l StringLocation) Description() string
func (StringLocation) ID ¶ added in v0.12.0
func (l StringLocation) ID() LocationID
func (StringLocation) MarshalJSON ¶ added in v0.12.0
func (l StringLocation) MarshalJSON() ([]byte, error)
func (StringLocation) MeteredID ¶ added in v0.24.0
func (l StringLocation) MeteredID(memoryGauge MemoryGauge) LocationID
func (StringLocation) QualifiedIdentifier ¶ added in v0.12.0
func (l StringLocation) QualifiedIdentifier(typeID TypeID) string
func (StringLocation) String ¶ added in v0.12.0
func (l StringLocation) String() string
func (StringLocation) TypeID ¶ added in v0.12.0
func (l StringLocation) TypeID(memoryGauge MemoryGauge, qualifiedIdentifier string) TypeID
type TransactionLocation ¶ added in v0.12.0
type TransactionLocation [32]byte
TransactionLocation
func NewTransactionLocation ¶ added in v0.24.0
func NewTransactionLocation(gauge MemoryGauge, identifier []byte) (location TransactionLocation)
func (TransactionLocation) Description ¶ added in v0.25.0
func (l TransactionLocation) Description() string
func (TransactionLocation) ID ¶ added in v0.12.0
func (l TransactionLocation) ID() LocationID
func (TransactionLocation) MarshalJSON ¶ added in v0.12.0
func (l TransactionLocation) MarshalJSON() ([]byte, error)
func (TransactionLocation) MeteredID ¶ added in v0.24.0
func (l TransactionLocation) MeteredID(memoryGauge MemoryGauge) LocationID
func (TransactionLocation) QualifiedIdentifier ¶ added in v0.12.0
func (l TransactionLocation) QualifiedIdentifier(typeID TypeID) string
func (TransactionLocation) String ¶ added in v0.12.0
func (l TransactionLocation) String() string
func (TransactionLocation) TypeID ¶ added in v0.12.0
func (l TransactionLocation) TypeID(memoryGauge MemoryGauge, qualifiedIdentifier string) TypeID
type TypeID ¶ added in v0.12.0
type TypeID string
TypeID
func NewMeteredTypeID ¶ added in v0.24.0
func NewMeteredTypeID(memoryGauge MemoryGauge, parts ...string) TypeID
func NewTypeIDFromQualifiedName ¶ added in v0.24.0
func NewTypeIDFromQualifiedName(memoryGauge MemoryGauge, location Location, qualifiedIdentifier string) TypeID
type TypeIDDecoder ¶ added in v0.12.0
type TypeIDDecoder func(gauge MemoryGauge, typeID string) (location Location, qualifiedIdentifier string, err error)
Source Files ¶
- address.go
- addresslocation.go
- bigInt.go
- compositekind.go
- compositekind_string.go
- computationkind.go
- computationkind_string.go
- controlstatement.go
- controlstatement_string.go
- declarationkind.go
- declarationkind_string.go
- enumerate.go
- identifierlocation.go
- location.go
- memorykind.go
- memorykind_string.go
- metering.go
- operandside.go
- operandside_string.go
- operationkind.go
- operationkind_string.go
- pathdomain.go
- pathdomain_string.go
- repllocation.go
- scriptlocation.go
- stringlocation.go
- transactionlocation.go
Directories ¶
Path | Synopsis |
---|---|
Package list implements a doubly linked list.
|
Package list implements a doubly linked list. |