Documentation
¶
Index ¶
- Constants
- Variables
- func CastToArray(value Value) ([]any, error)
- func CastToInt(value Value) (int, error)
- func CastToString(value Value) (string, error)
- func CastToUInt8(value Value) (uint8, error)
- func CastToUInt16(value Value) (uint16, error)
- func DecodeFields(hasFields HasFields, s interface{}) error
- func Fuzz(data []byte) int
- func GetFieldsMappedByName(v HasFields) map[string]Value
- func ParseUFix64(s string) (uint64, error)
- func ValueWithCachedTypeID[T Value](value T) T
- type AccountKeyType
- type AccountLink
- type Address
- type AddressType
- type AnyResourceAttachmentType
- type AnyResourceType
- type AnyStructAttachmentType
- type AnyStructType
- type AnyType
- type Array
- type ArrayType
- type Attachment
- func (v Attachment) GetFieldValues() []Value
- func (v Attachment) GetFields() []Field
- func (v Attachment) MeteredType(_ common.MemoryGauge) Type
- func (v Attachment) String() string
- func (v Attachment) ToGoValue() any
- func (v Attachment) Type() Type
- func (v Attachment) WithType(typ *AttachmentType) Attachment
- type AttachmentType
- func (t *AttachmentType) Base() Type
- func (t *AttachmentType) CompositeFields() []Field
- func (t *AttachmentType) CompositeInitializers() [][]Parameter
- func (t *AttachmentType) CompositeTypeLocation() common.Location
- func (t *AttachmentType) CompositeTypeQualifiedIdentifier() string
- func (t *AttachmentType) Equal(other Type) bool
- func (t *AttachmentType) ID() string
- func (t *AttachmentType) SetCompositeFields(fields []Field)
- type AuthAccountContractsType
- type AuthAccountKeysType
- type AuthAccountType
- type BlockType
- type Bool
- type BoolType
- type Bytes
- type BytesType
- type Capability
- type CapabilityPathType
- type CapabilityType
- type Character
- type CharacterType
- type CompositeType
- type ConstantSizedArrayType
- type Contract
- type ContractInterfaceType
- func (t *ContractInterfaceType) Equal(other Type) bool
- func (t *ContractInterfaceType) ID() string
- func (t *ContractInterfaceType) InterfaceFields() []Field
- func (t *ContractInterfaceType) InterfaceInitializers() [][]Parameter
- func (t *ContractInterfaceType) InterfaceTypeLocation() common.Location
- func (t *ContractInterfaceType) InterfaceTypeQualifiedIdentifier() string
- func (t *ContractInterfaceType) SetInterfaceFields(fields []Field)
- type ContractType
- func (t *ContractType) CompositeFields() []Field
- func (t *ContractType) CompositeInitializers() [][]Parameter
- func (t *ContractType) CompositeTypeLocation() common.Location
- func (t *ContractType) CompositeTypeQualifiedIdentifier() string
- func (t *ContractType) Equal(other Type) bool
- func (t *ContractType) ID() string
- func (t *ContractType) SetCompositeFields(fields []Field)
- type DeployedContractType
- type Dictionary
- type DictionaryType
- type Enum
- type EnumType
- func (t *EnumType) CompositeFields() []Field
- func (t *EnumType) CompositeInitializers() [][]Parameter
- func (t *EnumType) CompositeTypeLocation() common.Location
- func (t *EnumType) CompositeTypeQualifiedIdentifier() string
- func (t *EnumType) Equal(other Type) bool
- func (t *EnumType) ID() string
- func (t *EnumType) SetCompositeFields(fields []Field)
- type Event
- type EventType
- func (t *EventType) CompositeFields() []Field
- func (t *EventType) CompositeInitializers() [][]Parameter
- func (t *EventType) CompositeTypeLocation() common.Location
- func (t *EventType) CompositeTypeQualifiedIdentifier() string
- func (t *EventType) Equal(other Type) bool
- func (t *EventType) ID() string
- func (t *EventType) SetCompositeFields(fields []Field)
- type Field
- type Fix64
- func NewFix64(s string) (Fix64, error)
- func NewFix64FromParts(negative bool, integer int, fraction uint) (Fix64, error)
- func NewMeteredFix64(gauge common.MemoryGauge, constructor func() (string, error)) (Fix64, error)
- func NewMeteredFix64FromRawFixedPointNumber(gauge common.MemoryGauge, n int64) (Fix64, error)
- type Fix64Type
- type FixedPointType
- type Function
- type FunctionType
- type HasFields
- type IDCapability
- type Int
- type Int8
- type Int8Type
- type Int16
- type Int16Type
- type Int32
- type Int32Type
- type Int64
- type Int64Type
- type Int128
- type Int128Type
- type Int256
- type Int256Type
- type IntType
- type IntegerType
- type InterfaceType
- type KeyValuePair
- type MetaType
- type NeverType
- type NumberType
- type NumberValue
- type Optional
- type OptionalType
- type Parameter
- type Path
- type PathCapability
- type PathLink
- type PathType
- type PrivatePathType
- type PublicAccountContractsType
- type PublicAccountKeysType
- type PublicAccountType
- type PublicPathType
- type ReferenceType
- type Resource
- type ResourceInterfaceType
- func (t *ResourceInterfaceType) Equal(other Type) bool
- func (t *ResourceInterfaceType) ID() string
- func (t *ResourceInterfaceType) InterfaceFields() []Field
- func (t *ResourceInterfaceType) InterfaceInitializers() [][]Parameter
- func (t *ResourceInterfaceType) InterfaceTypeLocation() common.Location
- func (t *ResourceInterfaceType) InterfaceTypeQualifiedIdentifier() string
- func (t *ResourceInterfaceType) SetInterfaceFields(fields []Field)
- type ResourceType
- func (t *ResourceType) CompositeFields() []Field
- func (t *ResourceType) CompositeInitializers() [][]Parameter
- func (t *ResourceType) CompositeTypeLocation() common.Location
- func (t *ResourceType) CompositeTypeQualifiedIdentifier() string
- func (t *ResourceType) Equal(other Type) bool
- func (t *ResourceType) ID() string
- func (t *ResourceType) SetCompositeFields(fields []Field)
- type RestrictedType
- type RestrictionSet
- type SignedFixedPointType
- type SignedIntegerType
- type SignedNumberType
- type StoragePathType
- type String
- type StringType
- type Struct
- type StructInterfaceType
- func (t *StructInterfaceType) Equal(other Type) bool
- func (t *StructInterfaceType) ID() string
- func (t *StructInterfaceType) InterfaceFields() []Field
- func (t *StructInterfaceType) InterfaceInitializers() [][]Parameter
- func (t *StructInterfaceType) InterfaceTypeLocation() common.Location
- func (t *StructInterfaceType) InterfaceTypeQualifiedIdentifier() string
- func (t *StructInterfaceType) SetInterfaceFields(fields []Field)
- type StructType
- func (t *StructType) CompositeFields() []Field
- func (t *StructType) CompositeInitializers() [][]Parameter
- func (t *StructType) CompositeTypeLocation() common.Location
- func (t *StructType) CompositeTypeQualifiedIdentifier() string
- func (t *StructType) Equal(other Type) bool
- func (t *StructType) ID() string
- func (t *StructType) SetCompositeFields(fields []Field)
- type Type
- type TypeID
- type TypeParameter
- type TypeValue
- type UFix64
- func NewMeteredUFix64(gauge common.MemoryGauge, constructor func() (string, error)) (UFix64, error)
- func NewMeteredUFix64FromRawFixedPointNumber(gauge common.MemoryGauge, n uint64) (UFix64, error)
- func NewUFix64(s string) (UFix64, error)
- func NewUFix64FromParts(integer int, fraction uint) (UFix64, error)
- type UFix64Type
- type UInt
- type UInt8
- type UInt8Type
- type UInt16
- type UInt16Type
- type UInt32
- type UInt32Type
- type UInt64
- type UInt64Type
- type UInt128
- type UInt128Type
- type UInt256
- type UInt256Type
- type UIntType
- type Value
- type VariableSizedArrayType
- type Void
- type VoidType
- type Word8
- type Word8Type
- type Word16
- type Word16Type
- type Word32
- type Word32Type
- type Word64
- type Word64Type
- type Word128
- type Word128Type
- type Word256
- type Word256Type
Constants ¶
const AddressLength = 8
const Version = "v0.42.7"
Variables ¶
var Int128MemoryUsage = common.NewCadenceBigIntMemoryUsage(16)
var Int16MemoryUsage = common.NewCadenceNumberMemoryUsage(int(unsafe.Sizeof(Int16(0))))
var Int256MemoryUsage = common.NewCadenceBigIntMemoryUsage(32)
var Int32MemoryUsage = common.NewCadenceNumberMemoryUsage(int(unsafe.Sizeof(Int32(0))))
var Int64MemoryUsage = common.NewCadenceNumberMemoryUsage(int(unsafe.Sizeof(Int64(0))))
var Int8MemoryUsage = common.NewCadenceNumberMemoryUsage(int(unsafe.Sizeof(Int8(0))))
var TheAccountKeyType = AccountKeyType{}
var TheAddressType = AddressType{}
var TheAnyResourceAttachmentType = AnyResourceAttachmentType{}
var TheAnyResourceType = AnyResourceType{}
var TheAnyStructAttachmentType = AnyStructAttachmentType{}
var TheAnyStructType = AnyStructType{}
var TheAnyType = AnyType{}
var TheAuthAccountContractsType = AuthAccountContractsType{}
var TheAuthAccountKeysType = AuthAccountKeysType{}
var TheAuthAccountType = AuthAccountType{}
var TheBlockType = BlockType{}
var TheBoolType = BoolType{}
var TheBytesType = BytesType{}
var TheCapabilityPathType = CapabilityPathType{}
var TheCharacterType = CharacterType{}
var TheDeployedContractType = DeployedContractType{}
var TheFix64Type = Fix64Type{}
var TheFixedPointType = FixedPointType{}
var TheInt128Type = Int128Type{}
var TheInt16Type = Int16Type{}
var TheInt256Type = Int256Type{}
var TheInt32Type = Int32Type{}
var TheInt64Type = Int64Type{}
var TheInt8Type = Int8Type{}
var TheIntType = IntType{}
var TheIntegerType = IntegerType{}
var TheMetaType = MetaType{}
var TheNeverType = NeverType{}
var TheNumberType = NumberType{}
var ThePathType = PathType{}
var ThePrivatePathType = PrivatePathType{}
var ThePublicAccountContractsType = PublicAccountContractsType{}
var ThePublicAccountKeysType = PublicAccountKeysType{}
var ThePublicAccountType = PublicAccountType{}
var ThePublicPathType = PublicPathType{}
var TheSignedFixedPointType = SignedFixedPointType{}
var TheSignedIntegerType = SignedIntegerType{}
var TheSignedNumberType = SignedNumberType{}
var TheStoragePathType = StoragePathType{}
var TheStringType = StringType{}
var TheUFix64Type = UFix64Type{}
var TheUInt128Type = UInt128Type{}
var TheUInt16Type = UInt16Type{}
var TheUInt256Type = UInt256Type{}
var TheUInt32Type = UInt32Type{}
var TheUInt64Type = UInt64Type{}
var TheUInt8Type = UInt8Type{}
var TheUIntType = UIntType{}
var TheVoidType = VoidType{}
var TheWord128Type = Word128Type{}
var TheWord16Type = Word16Type{}
var TheWord256Type = Word256Type{}
var TheWord32Type = Word32Type{}
var TheWord64Type = Word64Type{}
var TheWord8Type = Word8Type{}
var UInt128MemoryUsage = common.NewCadenceBigIntMemoryUsage(16)
var UInt16MemoryUsage = common.NewCadenceNumberMemoryUsage(int(unsafe.Sizeof(UInt16(0))))
var UInt256MemoryUsage = common.NewCadenceBigIntMemoryUsage(32)
var UInt32MemoryUsage = common.NewCadenceNumberMemoryUsage(int(unsafe.Sizeof(UInt32(0))))
var UInt64MemoryUsage = common.NewCadenceNumberMemoryUsage(int(unsafe.Sizeof(UInt64(0))))
var UInt8MemoryUsage = common.NewCadenceNumberMemoryUsage(int(unsafe.Sizeof(UInt8(0))))
var Word128MemoryUsage = common.NewCadenceBigIntMemoryUsage(16)
var Word256MemoryUsage = common.NewCadenceBigIntMemoryUsage(32)
Functions ¶
func CastToArray ¶
func CastToString ¶
func CastToUInt8 ¶
func CastToUInt16 ¶
func DecodeFields ¶
DecodeFields decodes a HasFields into a struct
func GetFieldsMappedByName ¶
func ParseUFix64 ¶
func ValueWithCachedTypeID ¶
func ValueWithCachedTypeID[T Value](value T) T
ValueWithCachedTypeID recursively caches type ID of value v's type. This is needed because each type ID is lazily cached on its first use in ID() to avoid performance penalty.
Types ¶
type AccountKeyType ¶
type AccountKeyType struct{}
AccountKeyType
func NewAccountKeyType ¶
func NewAccountKeyType() AccountKeyType
func (AccountKeyType) Equal ¶
func (t AccountKeyType) Equal(other Type) bool
func (AccountKeyType) ID ¶
func (AccountKeyType) ID() string
type AccountLink ¶
type AccountLink struct{}
func NewAccountLink ¶
func NewAccountLink() AccountLink
func NewMeteredAccountLink ¶
func NewMeteredAccountLink(gauge common.MemoryGauge) AccountLink
func (AccountLink) MeteredType ¶
func (v AccountLink) MeteredType(_ common.MemoryGauge) Type
func (AccountLink) String ¶
func (v AccountLink) String() string
func (AccountLink) ToGoValue ¶
func (v AccountLink) ToGoValue() any
func (AccountLink) Type ¶
func (v AccountLink) Type() Type
type Address ¶
type Address [AddressLength]byte
func BytesToAddress ¶
func BytesToMeteredAddress ¶
func BytesToMeteredAddress(memoryGauge common.MemoryGauge, b []byte) Address
func NewAddress ¶
func NewAddress(b [AddressLength]byte) Address
func NewMeteredAddress ¶
func NewMeteredAddress(memoryGauge common.MemoryGauge, b [AddressLength]byte) Address
func (Address) MeteredType ¶
func (Address) MeteredType(common.MemoryGauge) Type
type AddressType ¶
type AddressType struct{}
func NewAddressType ¶
func NewAddressType() AddressType
func (AddressType) Equal ¶
func (t AddressType) Equal(other Type) bool
func (AddressType) ID ¶
func (AddressType) ID() string
type AnyResourceAttachmentType ¶
type AnyResourceAttachmentType struct{}
func NewAnyResourceAttachmentType ¶
func NewAnyResourceAttachmentType() AnyResourceAttachmentType
func (AnyResourceAttachmentType) Equal ¶
func (t AnyResourceAttachmentType) Equal(other Type) bool
func (AnyResourceAttachmentType) ID ¶
func (AnyResourceAttachmentType) ID() string
type AnyResourceType ¶
type AnyResourceType struct{}
func NewAnyResourceType ¶
func NewAnyResourceType() AnyResourceType
func (AnyResourceType) Equal ¶
func (t AnyResourceType) Equal(other Type) bool
func (AnyResourceType) ID ¶
func (AnyResourceType) ID() string
type AnyStructAttachmentType ¶
type AnyStructAttachmentType struct{}
func NewAnyStructAttachmentType ¶
func NewAnyStructAttachmentType() AnyStructAttachmentType
func (AnyStructAttachmentType) Equal ¶
func (t AnyStructAttachmentType) Equal(other Type) bool
func (AnyStructAttachmentType) ID ¶
func (AnyStructAttachmentType) ID() string
type AnyStructType ¶
type AnyStructType struct{}
func NewAnyStructType ¶
func NewAnyStructType() AnyStructType
func (AnyStructType) Equal ¶
func (t AnyStructType) Equal(other Type) bool
func (AnyStructType) ID ¶
func (AnyStructType) ID() string
type Array ¶
func NewMeteredArray ¶
func (Array) MeteredType ¶
func (v Array) MeteredType(common.MemoryGauge) Type
type Attachment ¶
type Attachment struct {
AttachmentType *AttachmentType
Fields []Value
}
func NewAttachment ¶
func NewAttachment(fields []Value) Attachment
func NewMeteredAttachment ¶
func NewMeteredAttachment( gauge common.MemoryGauge, numberOfFields int, constructor func() ([]Value, error), ) (Attachment, error)
func (Attachment) GetFieldValues ¶
func (v Attachment) GetFieldValues() []Value
func (Attachment) GetFields ¶
func (v Attachment) GetFields() []Field
func (Attachment) MeteredType ¶
func (v Attachment) MeteredType(_ common.MemoryGauge) Type
func (Attachment) String ¶
func (v Attachment) String() string
func (Attachment) ToGoValue ¶
func (v Attachment) ToGoValue() any
func (Attachment) Type ¶
func (v Attachment) Type() Type
func (Attachment) WithType ¶
func (v Attachment) WithType(typ *AttachmentType) Attachment
type AttachmentType ¶
type AttachmentType struct {
Location common.Location
BaseType Type
QualifiedIdentifier string
Fields []Field
Initializers [][]Parameter
// contains filtered or unexported fields
}
AttachmentType
func NewAttachmentType ¶
func NewMeteredAttachmentType ¶
func NewMeteredAttachmentType( gauge common.MemoryGauge, location common.Location, baseType Type, qualifiedIdentifier string, fields []Field, initializers [][]Parameter, ) *AttachmentType
func (*AttachmentType) Base ¶
func (t *AttachmentType) Base() Type
func (*AttachmentType) CompositeFields ¶
func (t *AttachmentType) CompositeFields() []Field
func (*AttachmentType) CompositeInitializers ¶
func (t *AttachmentType) CompositeInitializers() [][]Parameter
func (*AttachmentType) CompositeTypeLocation ¶
func (t *AttachmentType) CompositeTypeLocation() common.Location
func (*AttachmentType) CompositeTypeQualifiedIdentifier ¶
func (t *AttachmentType) CompositeTypeQualifiedIdentifier() string
func (*AttachmentType) Equal ¶
func (t *AttachmentType) Equal(other Type) bool
func (*AttachmentType) ID ¶
func (t *AttachmentType) ID() string
func (*AttachmentType) SetCompositeFields ¶
func (t *AttachmentType) SetCompositeFields(fields []Field)
type AuthAccountContractsType ¶
type AuthAccountContractsType struct{}
AuthAccountContractsType
func NewAuthAccountContractsType ¶
func NewAuthAccountContractsType() AuthAccountContractsType
func (AuthAccountContractsType) Equal ¶
func (t AuthAccountContractsType) Equal(other Type) bool
func (AuthAccountContractsType) ID ¶
func (AuthAccountContractsType) ID() string
type AuthAccountKeysType ¶
type AuthAccountKeysType struct{}
AuthAccountKeysType
func NewAuthAccountKeysType ¶
func NewAuthAccountKeysType() AuthAccountKeysType
func (AuthAccountKeysType) Equal ¶
func (t AuthAccountKeysType) Equal(other Type) bool
func (AuthAccountKeysType) ID ¶
func (AuthAccountKeysType) ID() string
type AuthAccountType ¶
type AuthAccountType struct{}
AuthAccountType
func NewAuthAccountType ¶
func NewAuthAccountType() AuthAccountType
func (AuthAccountType) Equal ¶
func (t AuthAccountType) Equal(other Type) bool
func (AuthAccountType) ID ¶
func (AuthAccountType) ID() string
type Bool ¶
type Bool bool
func NewMeteredBool ¶
func NewMeteredBool(memoryGauge common.MemoryGauge, b bool) Bool
func (Bool) MeteredType ¶
func (v Bool) MeteredType(common.MemoryGauge) Type
type Bytes ¶
type Bytes []byte
func (Bytes) MeteredType ¶
func (v Bytes) MeteredType(common.MemoryGauge) Type
type Capability ¶
type Capability interface {
Value
// contains filtered or unexported methods
}
type CapabilityPathType ¶
type CapabilityPathType struct{}
func NewCapabilityPathType ¶
func NewCapabilityPathType() CapabilityPathType
func (CapabilityPathType) Equal ¶
func (t CapabilityPathType) Equal(other Type) bool
func (CapabilityPathType) ID ¶
func (CapabilityPathType) ID() string
type CapabilityType ¶
type CapabilityType struct {
BorrowType Type
// contains filtered or unexported fields
}
func NewCapabilityType ¶
func NewCapabilityType(borrowType Type) *CapabilityType
func NewMeteredCapabilityType ¶
func NewMeteredCapabilityType( gauge common.MemoryGauge, borrowType Type, ) *CapabilityType
func (*CapabilityType) Equal ¶
func (t *CapabilityType) Equal(other Type) bool
func (*CapabilityType) ID ¶
func (t *CapabilityType) ID() string
type Character ¶
type Character string
Character represents a Cadence character, which is a Unicode extended grapheme cluster. Hence, use a Go string to be able to hold multiple Unicode code points (Go runes). It should consist of exactly one grapheme cluster
func NewCharacter ¶
func NewMeteredCharacter ¶
func NewMeteredCharacter( memoryGauge common.MemoryGauge, memoryUsage common.MemoryUsage, stringConstructor func() string, ) (Character, error)
func (Character) MeteredType ¶
func (v Character) MeteredType(common.MemoryGauge) Type
type CharacterType ¶
type CharacterType struct{}
func NewCharacterType ¶
func NewCharacterType() CharacterType
func (CharacterType) Equal ¶
func (t CharacterType) Equal(other Type) bool
func (CharacterType) ID ¶
func (CharacterType) ID() string
type CompositeType ¶
type ConstantSizedArrayType ¶
type ConstantSizedArrayType struct {
ElementType Type
Size uint
// contains filtered or unexported fields
}
func NewConstantSizedArrayType ¶
func NewConstantSizedArrayType( size uint, elementType Type, ) *ConstantSizedArrayType
func NewMeteredConstantSizedArrayType ¶
func NewMeteredConstantSizedArrayType( gauge common.MemoryGauge, size uint, elementType Type, ) *ConstantSizedArrayType
func (*ConstantSizedArrayType) Element ¶
func (t *ConstantSizedArrayType) Element() Type
func (*ConstantSizedArrayType) Equal ¶
func (t *ConstantSizedArrayType) Equal(other Type) bool
func (*ConstantSizedArrayType) ID ¶
func (t *ConstantSizedArrayType) ID() string
type Contract ¶
type Contract struct {
ContractType *ContractType
Fields []Value
}
func NewContract ¶
func NewMeteredContract ¶
func (Contract) GetFieldValues ¶
func (Contract) MeteredType ¶
func (v Contract) MeteredType(common.MemoryGauge) Type
func (Contract) WithType ¶
func (v Contract) WithType(typ *ContractType) Contract
type ContractInterfaceType ¶
type ContractInterfaceType struct {
Location common.Location
QualifiedIdentifier string
Fields []Field
Initializers [][]Parameter
// contains filtered or unexported fields
}
func NewMeteredContractInterfaceType ¶
func NewMeteredContractInterfaceType( gauge common.MemoryGauge, location common.Location, qualifiedIdentifier string, fields []Field, initializers [][]Parameter, ) *ContractInterfaceType
func (*ContractInterfaceType) Equal ¶
func (t *ContractInterfaceType) Equal(other Type) bool
func (*ContractInterfaceType) ID ¶
func (t *ContractInterfaceType) ID() string
func (*ContractInterfaceType) InterfaceFields ¶
func (t *ContractInterfaceType) InterfaceFields() []Field
func (*ContractInterfaceType) InterfaceInitializers ¶
func (t *ContractInterfaceType) InterfaceInitializers() [][]Parameter
func (*ContractInterfaceType) InterfaceTypeLocation ¶
func (t *ContractInterfaceType) InterfaceTypeLocation() common.Location
func (*ContractInterfaceType) InterfaceTypeQualifiedIdentifier ¶
func (t *ContractInterfaceType) InterfaceTypeQualifiedIdentifier() string
func (*ContractInterfaceType) SetInterfaceFields ¶
func (t *ContractInterfaceType) SetInterfaceFields(fields []Field)
type ContractType ¶
type ContractType struct {
Location common.Location
QualifiedIdentifier string
Fields []Field
Initializers [][]Parameter
// contains filtered or unexported fields
}
func NewContractType ¶
func NewMeteredContractType ¶
func NewMeteredContractType( gauge common.MemoryGauge, location common.Location, qualifiedIdentifier string, fields []Field, initializers [][]Parameter, ) *ContractType
func (*ContractType) CompositeFields ¶
func (t *ContractType) CompositeFields() []Field
func (*ContractType) CompositeInitializers ¶
func (t *ContractType) CompositeInitializers() [][]Parameter
func (*ContractType) CompositeTypeLocation ¶
func (t *ContractType) CompositeTypeLocation() common.Location
func (*ContractType) CompositeTypeQualifiedIdentifier ¶
func (t *ContractType) CompositeTypeQualifiedIdentifier() string
func (*ContractType) Equal ¶
func (t *ContractType) Equal(other Type) bool
func (*ContractType) ID ¶
func (t *ContractType) ID() string
func (*ContractType) SetCompositeFields ¶
func (t *ContractType) SetCompositeFields(fields []Field)
type DeployedContractType ¶
type DeployedContractType struct{}
DeployedContractType
func NewDeployedContractType ¶
func NewDeployedContractType() DeployedContractType
func (DeployedContractType) Equal ¶
func (t DeployedContractType) Equal(other Type) bool
func (DeployedContractType) ID ¶
func (DeployedContractType) ID() string
type Dictionary ¶
type Dictionary struct {
DictionaryType *DictionaryType
Pairs []KeyValuePair
}
func NewDictionary ¶
func NewDictionary(pairs []KeyValuePair) Dictionary
func NewMeteredDictionary ¶
func NewMeteredDictionary( gauge common.MemoryGauge, size int, constructor func() ([]KeyValuePair, error), ) (Dictionary, error)
func (Dictionary) MeteredType ¶
func (v Dictionary) MeteredType(common.MemoryGauge) Type
func (Dictionary) String ¶
func (v Dictionary) String() string
func (Dictionary) ToGoValue ¶
func (v Dictionary) ToGoValue() any
func (Dictionary) Type ¶
func (v Dictionary) Type() Type
func (Dictionary) WithType ¶
func (v Dictionary) WithType(dictionaryType *DictionaryType) Dictionary
type DictionaryType ¶
type DictionaryType struct {
KeyType Type
ElementType Type
// contains filtered or unexported fields
}
func NewDictionaryType ¶
func NewDictionaryType( keyType Type, elementType Type, ) *DictionaryType
func NewMeteredDictionaryType ¶
func NewMeteredDictionaryType( gauge common.MemoryGauge, keyType Type, elementType Type, ) *DictionaryType
func (*DictionaryType) Equal ¶
func (t *DictionaryType) Equal(other Type) bool
func (*DictionaryType) ID ¶
func (t *DictionaryType) ID() string
type Enum ¶
Enum
func NewMeteredEnum ¶
func (Enum) GetFieldValues ¶
func (Enum) MeteredType ¶
func (v Enum) MeteredType(common.MemoryGauge) Type
type EnumType ¶
type EnumType struct {
Location common.Location
QualifiedIdentifier string
RawType Type
Fields []Field
Initializers [][]Parameter
// contains filtered or unexported fields
}
EnumType
func NewEnumType ¶
func NewMeteredEnumType ¶
func (*EnumType) CompositeFields ¶
func (*EnumType) CompositeInitializers ¶
func (*EnumType) CompositeTypeLocation ¶
func (*EnumType) CompositeTypeQualifiedIdentifier ¶
func (*EnumType) SetCompositeFields ¶
type Event ¶
func NewMeteredEvent ¶
func (Event) GetFieldValues ¶
func (Event) MeteredType ¶
func (v Event) MeteredType(common.MemoryGauge) Type
type EventType ¶
type EventType struct {
Location common.Location
QualifiedIdentifier string
Fields []Field
Initializer []Parameter
// contains filtered or unexported fields
}
func NewEventType ¶
func NewMeteredEventType ¶
func (*EventType) CompositeFields ¶
func (*EventType) CompositeInitializers ¶
func (*EventType) CompositeTypeLocation ¶
func (*EventType) CompositeTypeQualifiedIdentifier ¶
func (*EventType) SetCompositeFields ¶
type Fix64 ¶
type Fix64 int64
func NewFix64FromParts ¶
func NewMeteredFix64 ¶
func NewMeteredFix64FromRawFixedPointNumber ¶
func NewMeteredFix64FromRawFixedPointNumber(gauge common.MemoryGauge, n int64) (Fix64, error)
func (Fix64) MeteredType ¶
func (v Fix64) MeteredType(common.MemoryGauge) Type
func (Fix64) ToBigEndianBytes ¶
type FixedPointType ¶
type FixedPointType struct{}
func NewFixedPointType ¶
func NewFixedPointType() FixedPointType
func (FixedPointType) Equal ¶
func (t FixedPointType) Equal(other Type) bool
func (FixedPointType) ID ¶
func (FixedPointType) ID() string
type Function ¶
type Function struct {
FunctionType *FunctionType
}
Function
func NewFunction ¶
func NewFunction(functionType *FunctionType) Function
func NewMeteredFunction ¶
func NewMeteredFunction(gauge common.MemoryGauge, functionType *FunctionType) Function
func (Function) MeteredType ¶
func (v Function) MeteredType(common.MemoryGauge) Type
type FunctionType ¶
type FunctionType struct {
TypeParameters []TypeParameter
Parameters []Parameter
ReturnType Type
// contains filtered or unexported fields
}
func NewFunctionType ¶
func NewFunctionType( typeParameters []TypeParameter, parameters []Parameter, returnType Type, ) *FunctionType
func NewMeteredFunctionType ¶
func NewMeteredFunctionType( gauge common.MemoryGauge, typeParameters []TypeParameter, parameters []Parameter, returnType Type, ) *FunctionType
func (*FunctionType) Equal ¶
func (t *FunctionType) Equal(other Type) bool
func (*FunctionType) ID ¶
func (t *FunctionType) ID() string
type IDCapability ¶
func NewIDCapability ¶
func NewIDCapability( id UInt64, address Address, borrowType Type, ) IDCapability
func NewMeteredIDCapability ¶
func NewMeteredIDCapability( gauge common.MemoryGauge, id UInt64, address Address, borrowType Type, ) IDCapability
func (IDCapability) MeteredType ¶
func (v IDCapability) MeteredType(gauge common.MemoryGauge) Type
func (IDCapability) String ¶
func (v IDCapability) String() string
func (IDCapability) ToGoValue ¶
func (IDCapability) ToGoValue() any
func (IDCapability) Type ¶
func (v IDCapability) Type() Type
type Int ¶
func NewIntFromBig ¶
func NewMeteredIntFromBig ¶
func NewMeteredIntFromBig( memoryGauge common.MemoryGauge, memoryUsage common.MemoryUsage, bigIntConstructor func() *big.Int, ) Int
func (Int) MeteredType ¶
func (v Int) MeteredType(common.MemoryGauge) Type
func (Int) ToBigEndianBytes ¶
type Int8 ¶
type Int8 int8
func NewMeteredInt8 ¶
func NewMeteredInt8(memoryGauge common.MemoryGauge, v int8) Int8
func (Int8) MeteredType ¶
func (v Int8) MeteredType(common.MemoryGauge) Type
func (Int8) ToBigEndianBytes ¶
type Int16 ¶
type Int16 int16
func NewMeteredInt16 ¶
func NewMeteredInt16(memoryGauge common.MemoryGauge, v int16) Int16
func (Int16) MeteredType ¶
func (v Int16) MeteredType(common.MemoryGauge) Type
func (Int16) ToBigEndianBytes ¶
type Int32 ¶
type Int32 int32
func NewMeteredInt32 ¶
func NewMeteredInt32(memoryGauge common.MemoryGauge, v int32) Int32
func (Int32) MeteredType ¶
func (v Int32) MeteredType(common.MemoryGauge) Type
func (Int32) ToBigEndianBytes ¶
type Int64 ¶
type Int64 int64
func NewMeteredInt64 ¶
func NewMeteredInt64(memoryGauge common.MemoryGauge, v int64) Int64
func (Int64) MeteredType ¶
func (v Int64) MeteredType(common.MemoryGauge) Type
func (Int64) ToBigEndianBytes ¶
type Int128 ¶
func NewMeteredInt128FromBig ¶
func (Int128) MeteredType ¶
func (v Int128) MeteredType(common.MemoryGauge) Type
func (Int128) ToBigEndianBytes ¶
type Int128Type ¶
type Int128Type struct{}
func NewInt128Type ¶
func NewInt128Type() Int128Type
func (Int128Type) Equal ¶
func (t Int128Type) Equal(other Type) bool
func (Int128Type) ID ¶
func (Int128Type) ID() string
type Int256 ¶
func NewMeteredInt256FromBig ¶
func (Int256) MeteredType ¶
func (v Int256) MeteredType(common.MemoryGauge) Type
func (Int256) ToBigEndianBytes ¶
type Int256Type ¶
type Int256Type struct{}
func NewInt256Type ¶
func NewInt256Type() Int256Type
func (Int256Type) Equal ¶
func (t Int256Type) Equal(other Type) bool
func (Int256Type) ID ¶
func (Int256Type) ID() string
type IntegerType ¶
type IntegerType struct{}
func NewIntegerType ¶
func NewIntegerType() IntegerType
func (IntegerType) Equal ¶
func (t IntegerType) Equal(other Type) bool
func (IntegerType) ID ¶
func (IntegerType) ID() string
type InterfaceType ¶
type KeyValuePair ¶
func NewMeteredKeyValuePair ¶
func NewMeteredKeyValuePair(gauge common.MemoryGauge, key, value Value) KeyValuePair
type NumberType ¶
type NumberType struct{}
func NewNumberType ¶
func NewNumberType() NumberType
func (NumberType) Equal ¶
func (t NumberType) Equal(other Type) bool
func (NumberType) ID ¶
func (NumberType) ID() string
type NumberValue ¶
type Optional ¶
type Optional struct {
Value Value
}
func NewMeteredOptional ¶
func NewMeteredOptional(memoryGauge common.MemoryGauge, value Value) Optional
func NewOptional ¶
func (Optional) MeteredType ¶
func (o Optional) MeteredType(gauge common.MemoryGauge) Type
type OptionalType ¶
type OptionalType struct {
Type Type
// contains filtered or unexported fields
}
func NewMeteredOptionalType ¶
func NewMeteredOptionalType(gauge common.MemoryGauge, typ Type) *OptionalType
func NewOptionalType ¶
func NewOptionalType(typ Type) *OptionalType
func (*OptionalType) Equal ¶
func (t *OptionalType) Equal(other Type) bool
func (*OptionalType) ID ¶
func (t *OptionalType) ID() string
type Path ¶
type Path struct {
Domain common.PathDomain
Identifier string
}
func NewMeteredPath ¶
func NewMeteredPath(gauge common.MemoryGauge, domain common.PathDomain, identifier string) (Path, error)
func (Path) MeteredType ¶
func (v Path) MeteredType(common.MemoryGauge) Type
type PathCapability ¶
func NewMeteredPathCapability ¶
func NewMeteredPathCapability( gauge common.MemoryGauge, address Address, path Path, borrowType Type, ) PathCapability
func NewPathCapability ¶
func NewPathCapability( address Address, path Path, borrowType Type, ) PathCapability
func (PathCapability) MeteredType ¶
func (v PathCapability) MeteredType(gauge common.MemoryGauge) Type
func (PathCapability) String ¶
func (v PathCapability) String() string
func (PathCapability) ToGoValue ¶
func (PathCapability) ToGoValue() any
func (PathCapability) Type ¶
func (v PathCapability) Type() Type
type PathLink ¶
type PathLink struct {
TargetPath Path
// TODO: a future version might want to export the whole type
BorrowType string
}
func NewMeteredPathLink ¶
func NewMeteredPathLink(gauge common.MemoryGauge, targetPath Path, borrowType string) PathLink
func NewPathLink ¶
func (PathLink) MeteredType ¶
func (v PathLink) MeteredType(_ common.MemoryGauge) Type
type PrivatePathType ¶
type PrivatePathType struct{}
func NewPrivatePathType ¶
func NewPrivatePathType() PrivatePathType
func (PrivatePathType) Equal ¶
func (t PrivatePathType) Equal(other Type) bool
func (PrivatePathType) ID ¶
func (PrivatePathType) ID() string
type PublicAccountContractsType ¶
type PublicAccountContractsType struct{}
PublicAccountContractsType
func NewPublicAccountContractsType ¶
func NewPublicAccountContractsType() PublicAccountContractsType
func (PublicAccountContractsType) Equal ¶
func (t PublicAccountContractsType) Equal(other Type) bool
func (PublicAccountContractsType) ID ¶
func (PublicAccountContractsType) ID() string
type PublicAccountKeysType ¶
type PublicAccountKeysType struct{}
PublicAccountKeysType
func NewPublicAccountKeysType ¶
func NewPublicAccountKeysType() PublicAccountKeysType
func (PublicAccountKeysType) Equal ¶
func (t PublicAccountKeysType) Equal(other Type) bool
func (PublicAccountKeysType) ID ¶
func (PublicAccountKeysType) ID() string
type PublicAccountType ¶
type PublicAccountType struct{}
PublicAccountType
func NewPublicAccountType ¶
func NewPublicAccountType() PublicAccountType
func (PublicAccountType) Equal ¶
func (t PublicAccountType) Equal(other Type) bool
func (PublicAccountType) ID ¶
func (PublicAccountType) ID() string
type PublicPathType ¶
type PublicPathType struct{}
func NewPublicPathType ¶
func NewPublicPathType() PublicPathType
func (PublicPathType) Equal ¶
func (t PublicPathType) Equal(other Type) bool
func (PublicPathType) ID ¶
func (PublicPathType) ID() string
type ReferenceType ¶
func NewMeteredReferenceType ¶
func NewMeteredReferenceType( gauge common.MemoryGauge, authorized bool, typ Type, ) *ReferenceType
func NewReferenceType ¶
func NewReferenceType( authorized bool, typ Type, ) *ReferenceType
func (*ReferenceType) Equal ¶
func (t *ReferenceType) Equal(other Type) bool
func (*ReferenceType) ID ¶
func (t *ReferenceType) ID() string
type Resource ¶
type Resource struct {
ResourceType *ResourceType
Fields []Value
}
func NewMeteredResource ¶
func NewResource ¶
func (Resource) GetFieldValues ¶
func (Resource) MeteredType ¶
func (v Resource) MeteredType(common.MemoryGauge) Type
func (Resource) WithType ¶
func (v Resource) WithType(typ *ResourceType) Resource
type ResourceInterfaceType ¶
type ResourceInterfaceType struct {
Location common.Location
QualifiedIdentifier string
Fields []Field
Initializers [][]Parameter
// contains filtered or unexported fields
}
func NewMeteredResourceInterfaceType ¶
func NewMeteredResourceInterfaceType( gauge common.MemoryGauge, location common.Location, qualifiedIdentifier string, fields []Field, initializers [][]Parameter, ) *ResourceInterfaceType
func (*ResourceInterfaceType) Equal ¶
func (t *ResourceInterfaceType) Equal(other Type) bool
func (*ResourceInterfaceType) ID ¶
func (t *ResourceInterfaceType) ID() string
func (*ResourceInterfaceType) InterfaceFields ¶
func (t *ResourceInterfaceType) InterfaceFields() []Field
func (*ResourceInterfaceType) InterfaceInitializers ¶
func (t *ResourceInterfaceType) InterfaceInitializers() [][]Parameter
func (*ResourceInterfaceType) InterfaceTypeLocation ¶
func (t *ResourceInterfaceType) InterfaceTypeLocation() common.Location
func (*ResourceInterfaceType) InterfaceTypeQualifiedIdentifier ¶
func (t *ResourceInterfaceType) InterfaceTypeQualifiedIdentifier() string
func (*ResourceInterfaceType) SetInterfaceFields ¶
func (t *ResourceInterfaceType) SetInterfaceFields(fields []Field)
type ResourceType ¶
type ResourceType struct {
Location common.Location
QualifiedIdentifier string
Fields []Field
Initializers [][]Parameter
// contains filtered or unexported fields
}
func NewMeteredResourceType ¶
func NewMeteredResourceType( gauge common.MemoryGauge, location common.Location, qualifiedIdentifier string, fields []Field, initializers [][]Parameter, ) *ResourceType
func NewResourceType ¶
func (*ResourceType) CompositeFields ¶
func (t *ResourceType) CompositeFields() []Field
func (*ResourceType) CompositeInitializers ¶
func (t *ResourceType) CompositeInitializers() [][]Parameter
func (*ResourceType) CompositeTypeLocation ¶
func (t *ResourceType) CompositeTypeLocation() common.Location
func (*ResourceType) CompositeTypeQualifiedIdentifier ¶
func (t *ResourceType) CompositeTypeQualifiedIdentifier() string
func (*ResourceType) Equal ¶
func (t *ResourceType) Equal(other Type) bool
func (*ResourceType) ID ¶
func (t *ResourceType) ID() string
func (*ResourceType) SetCompositeFields ¶
func (t *ResourceType) SetCompositeFields(fields []Field)
type RestrictedType ¶
type RestrictedType struct {
Type Type
Restrictions []Type
// contains filtered or unexported fields
}
func NewMeteredRestrictedType ¶
func NewMeteredRestrictedType( gauge common.MemoryGauge, typ Type, restrictions []Type, ) *RestrictedType
func NewRestrictedType ¶
func NewRestrictedType( typ Type, restrictions []Type, ) *RestrictedType
func (*RestrictedType) Equal ¶
func (t *RestrictedType) Equal(other Type) bool
func (*RestrictedType) ID ¶
func (t *RestrictedType) ID() string
func (*RestrictedType) RestrictionSet ¶
func (t *RestrictedType) RestrictionSet() RestrictionSet
type RestrictionSet ¶
type RestrictionSet = map[Type]struct{}
type SignedFixedPointType ¶
type SignedFixedPointType struct{}
func NewSignedFixedPointType ¶
func NewSignedFixedPointType() SignedFixedPointType
func (SignedFixedPointType) Equal ¶
func (t SignedFixedPointType) Equal(other Type) bool
func (SignedFixedPointType) ID ¶
func (SignedFixedPointType) ID() string
type SignedIntegerType ¶
type SignedIntegerType struct{}
func NewSignedIntegerType ¶
func NewSignedIntegerType() SignedIntegerType
func (SignedIntegerType) Equal ¶
func (t SignedIntegerType) Equal(other Type) bool
func (SignedIntegerType) ID ¶
func (SignedIntegerType) ID() string
type SignedNumberType ¶
type SignedNumberType struct{}
func NewSignedNumberType ¶
func NewSignedNumberType() SignedNumberType
func (SignedNumberType) Equal ¶
func (t SignedNumberType) Equal(other Type) bool
func (SignedNumberType) ID ¶
func (SignedNumberType) ID() string
type StoragePathType ¶
type StoragePathType struct{}
func NewStoragePathType ¶
func NewStoragePathType() StoragePathType
func (StoragePathType) Equal ¶
func (t StoragePathType) Equal(other Type) bool
func (StoragePathType) ID ¶
func (StoragePathType) ID() string
type String ¶
type String string
func NewMeteredString ¶
func NewMeteredString( memoryGauge common.MemoryGauge, memoryUsage common.MemoryUsage, stringConstructor func() string, ) (String, error)
func (String) MeteredType ¶
func (v String) MeteredType(common.MemoryGauge) Type
type StringType ¶
type StringType struct{}
func NewStringType ¶
func NewStringType() StringType
func (StringType) Equal ¶
func (t StringType) Equal(other Type) bool
func (StringType) ID ¶
func (StringType) ID() string
type Struct ¶
type Struct struct {
StructType *StructType
Fields []Value
}
func NewMeteredStruct ¶
func (Struct) GetFieldValues ¶
func (Struct) MeteredType ¶
func (v Struct) MeteredType(common.MemoryGauge) Type
func (Struct) WithType ¶
func (v Struct) WithType(typ *StructType) Struct
type StructInterfaceType ¶
type StructInterfaceType struct {
Location common.Location
QualifiedIdentifier string
Fields []Field
Initializers [][]Parameter
// contains filtered or unexported fields
}
func NewMeteredStructInterfaceType ¶
func NewMeteredStructInterfaceType( gauge common.MemoryGauge, location common.Location, qualifiedIdentifier string, fields []Field, initializers [][]Parameter, ) *StructInterfaceType
func NewStructInterfaceType ¶
func (*StructInterfaceType) Equal ¶
func (t *StructInterfaceType) Equal(other Type) bool
func (*StructInterfaceType) ID ¶
func (t *StructInterfaceType) ID() string
func (*StructInterfaceType) InterfaceFields ¶
func (t *StructInterfaceType) InterfaceFields() []Field
func (*StructInterfaceType) InterfaceInitializers ¶
func (t *StructInterfaceType) InterfaceInitializers() [][]Parameter
func (*StructInterfaceType) InterfaceTypeLocation ¶
func (t *StructInterfaceType) InterfaceTypeLocation() common.Location
func (*StructInterfaceType) InterfaceTypeQualifiedIdentifier ¶
func (t *StructInterfaceType) InterfaceTypeQualifiedIdentifier() string
func (*StructInterfaceType) SetInterfaceFields ¶
func (t *StructInterfaceType) SetInterfaceFields(fields []Field)
type StructType ¶
type StructType struct {
Location common.Location
QualifiedIdentifier string
Fields []Field
Initializers [][]Parameter
// contains filtered or unexported fields
}
func NewMeteredStructType ¶
func NewMeteredStructType( gauge common.MemoryGauge, location common.Location, qualifiedIdentifier string, fields []Field, initializers [][]Parameter, ) *StructType
func NewStructType ¶
func (*StructType) CompositeFields ¶
func (t *StructType) CompositeFields() []Field
func (*StructType) CompositeInitializers ¶
func (t *StructType) CompositeInitializers() [][]Parameter
func (*StructType) CompositeTypeLocation ¶
func (t *StructType) CompositeTypeLocation() common.Location
func (*StructType) CompositeTypeQualifiedIdentifier ¶
func (t *StructType) CompositeTypeQualifiedIdentifier() string
func (*StructType) Equal ¶
func (t *StructType) Equal(other Type) bool
func (*StructType) ID ¶
func (t *StructType) ID() string
func (*StructType) SetCompositeFields ¶
func (t *StructType) SetCompositeFields(fields []Field)
type Type ¶
type Type interface {
ID() string
Equal(other Type) bool
// contains filtered or unexported methods
}
func TypeWithCachedTypeID ¶
TypeWithCachedTypeID recursively caches type ID of type t. This is needed because each type ID is lazily cached on its first use in ID() to avoid performance penalty.
type TypeID ¶
type TypeID string
TypeID is a type which is only known by its type ID. This type should not be used when encoding values, and should only be used for decoding values that were encoded using an older format of the JSON encoding (<v0.3.0)
type TypeParameter ¶
func NewTypeParameter ¶
func NewTypeParameter( name string, typeBound Type, ) TypeParameter
type TypeValue ¶
type TypeValue struct {
StaticType Type
}
func NewMeteredTypeValue ¶
func NewMeteredTypeValue(gauge common.MemoryGauge, staticType Type) TypeValue
func NewTypeValue ¶
func (TypeValue) MeteredType ¶
func (v TypeValue) MeteredType(common.MemoryGauge) Type
type UFix64 ¶
type UFix64 uint64
func NewMeteredUFix64 ¶
func NewMeteredUFix64FromRawFixedPointNumber ¶
func NewMeteredUFix64FromRawFixedPointNumber(gauge common.MemoryGauge, n uint64) (UFix64, error)
func (UFix64) MeteredType ¶
func (v UFix64) MeteredType(common.MemoryGauge) Type
func (UFix64) ToBigEndianBytes ¶
type UFix64Type ¶
type UFix64Type struct{}
func NewUFix64Type ¶
func NewUFix64Type() UFix64Type
func (UFix64Type) Equal ¶
func (t UFix64Type) Equal(other Type) bool
func (UFix64Type) ID ¶
func (UFix64Type) ID() string
type UInt ¶
func NewMeteredUIntFromBig ¶
func NewMeteredUIntFromBig( memoryGauge common.MemoryGauge, memoryUsage common.MemoryUsage, bigIntConstructor func() *big.Int, ) (UInt, error)
func (UInt) MeteredType ¶
func (v UInt) MeteredType(common.MemoryGauge) Type
func (UInt) ToBigEndianBytes ¶
type UInt8 ¶
type UInt8 uint8
func NewMeteredUInt8 ¶
func NewMeteredUInt8(gauge common.MemoryGauge, v uint8) UInt8
func (UInt8) MeteredType ¶
func (v UInt8) MeteredType(common.MemoryGauge) Type
func (UInt8) ToBigEndianBytes ¶
type UInt16 ¶
type UInt16 uint16
func NewMeteredUInt16 ¶
func NewMeteredUInt16(gauge common.MemoryGauge, v uint16) UInt16
func (UInt16) MeteredType ¶
func (v UInt16) MeteredType(common.MemoryGauge) Type
func (UInt16) ToBigEndianBytes ¶
type UInt16Type ¶
type UInt16Type struct{}
func NewUInt16Type ¶
func NewUInt16Type() UInt16Type
func (UInt16Type) Equal ¶
func (t UInt16Type) Equal(other Type) bool
func (UInt16Type) ID ¶
func (UInt16Type) ID() string
type UInt32 ¶
type UInt32 uint32
func NewMeteredUInt32 ¶
func NewMeteredUInt32(gauge common.MemoryGauge, v uint32) UInt32
func (UInt32) MeteredType ¶
func (v UInt32) MeteredType(common.MemoryGauge) Type
func (UInt32) ToBigEndianBytes ¶
type UInt32Type ¶
type UInt32Type struct{}
func NewUInt32Type ¶
func NewUInt32Type() UInt32Type
func (UInt32Type) Equal ¶
func (t UInt32Type) Equal(other Type) bool
func (UInt32Type) ID ¶
func (UInt32Type) ID() string
type UInt64 ¶
type UInt64 uint64
func NewMeteredUInt64 ¶
func NewMeteredUInt64(gauge common.MemoryGauge, v uint64) UInt64
func (UInt64) MeteredType ¶
func (v UInt64) MeteredType(common.MemoryGauge) Type
func (UInt64) ToBigEndianBytes ¶
type UInt64Type ¶
type UInt64Type struct{}
func NewUInt64Type ¶
func NewUInt64Type() UInt64Type
func (UInt64Type) Equal ¶
func (t UInt64Type) Equal(other Type) bool
func (UInt64Type) ID ¶
func (UInt64Type) ID() string
type UInt128 ¶
func NewUInt128 ¶
func (UInt128) MeteredType ¶
func (v UInt128) MeteredType(common.MemoryGauge) Type
func (UInt128) ToBigEndianBytes ¶
type UInt128Type ¶
type UInt128Type struct{}
func NewUInt128Type ¶
func NewUInt128Type() UInt128Type
func (UInt128Type) Equal ¶
func (t UInt128Type) Equal(other Type) bool
func (UInt128Type) ID ¶
func (UInt128Type) ID() string
type UInt256 ¶
func NewUInt256 ¶
func (UInt256) MeteredType ¶
func (v UInt256) MeteredType(common.MemoryGauge) Type
func (UInt256) ToBigEndianBytes ¶
type UInt256Type ¶
type UInt256Type struct{}
func NewUInt256Type ¶
func NewUInt256Type() UInt256Type
func (UInt256Type) Equal ¶
func (t UInt256Type) Equal(other Type) bool
func (UInt256Type) ID ¶
func (UInt256Type) ID() string
type Value ¶
type Value interface {
Type() Type
MeteredType(gauge common.MemoryGauge) Type
ToGoValue() any
fmt.Stringer
// contains filtered or unexported methods
}
func GetFieldByName ¶
func MustConvertValue ¶
MustConvertValue converts a Go value to an ABI value or panics if the value cannot be converted.
type VariableSizedArrayType ¶
type VariableSizedArrayType struct {
ElementType Type
// contains filtered or unexported fields
}
func NewMeteredVariableSizedArrayType ¶
func NewMeteredVariableSizedArrayType( gauge common.MemoryGauge, elementType Type, ) *VariableSizedArrayType
func NewVariableSizedArrayType ¶
func NewVariableSizedArrayType( elementType Type, ) *VariableSizedArrayType
func (*VariableSizedArrayType) Element ¶
func (t *VariableSizedArrayType) Element() Type
func (*VariableSizedArrayType) Equal ¶
func (t *VariableSizedArrayType) Equal(other Type) bool
func (*VariableSizedArrayType) ID ¶
func (t *VariableSizedArrayType) ID() string
type Void ¶
type Void struct{}
func NewMeteredVoid ¶
func NewMeteredVoid(memoryGauge common.MemoryGauge) Void
func (Void) MeteredType ¶
func (v Void) MeteredType(common.MemoryGauge) Type
type Word8 ¶
type Word8 uint8
func NewMeteredWord8 ¶
func NewMeteredWord8(gauge common.MemoryGauge, v uint8) Word8
func (Word8) MeteredType ¶
func (v Word8) MeteredType(common.MemoryGauge) Type
func (Word8) ToBigEndianBytes ¶
type Word16 ¶
type Word16 uint16
func NewMeteredWord16 ¶
func NewMeteredWord16(gauge common.MemoryGauge, v uint16) Word16
func (Word16) MeteredType ¶
func (v Word16) MeteredType(common.MemoryGauge) Type
func (Word16) ToBigEndianBytes ¶
type Word16Type ¶
type Word16Type struct{}
func NewWord16Type ¶
func NewWord16Type() Word16Type
func (Word16Type) Equal ¶
func (t Word16Type) Equal(other Type) bool
func (Word16Type) ID ¶
func (Word16Type) ID() string
type Word32 ¶
type Word32 uint32
func NewMeteredWord32 ¶
func NewMeteredWord32(gauge common.MemoryGauge, v uint32) Word32
func (Word32) MeteredType ¶
func (v Word32) MeteredType(common.MemoryGauge) Type
func (Word32) ToBigEndianBytes ¶
type Word32Type ¶
type Word32Type struct{}
func NewWord32Type ¶
func NewWord32Type() Word32Type
func (Word32Type) Equal ¶
func (t Word32Type) Equal(other Type) bool
func (Word32Type) ID ¶
func (Word32Type) ID() string
type Word64 ¶
type Word64 uint64
func NewMeteredWord64 ¶
func NewMeteredWord64(gauge common.MemoryGauge, v uint64) Word64
func (Word64) MeteredType ¶
func (v Word64) MeteredType(common.MemoryGauge) Type
func (Word64) ToBigEndianBytes ¶
type Word64Type ¶
type Word64Type struct{}
func NewWord64Type ¶
func NewWord64Type() Word64Type
func (Word64Type) Equal ¶
func (t Word64Type) Equal(other Type) bool
func (Word64Type) ID ¶
func (Word64Type) ID() string
type Word128 ¶
func NewWord128 ¶
func (Word128) MeteredType ¶
func (v Word128) MeteredType(common.MemoryGauge) Type
func (Word128) ToBigEndianBytes ¶
type Word128Type ¶
type Word128Type struct{}
func NewWord128Type ¶
func NewWord128Type() Word128Type
func (Word128Type) Equal ¶
func (t Word128Type) Equal(other Type) bool
func (Word128Type) ID ¶
func (Word128Type) ID() string
type Word256 ¶
func NewWord256 ¶
func (Word256) MeteredType ¶
func (v Word256) MeteredType(common.MemoryGauge) Type
func (Word256) ToBigEndianBytes ¶
type Word256Type ¶
type Word256Type struct{}
func NewWord256Type ¶
func NewWord256Type() Word256Type
func (Word256Type) Equal ¶
func (t Word256Type) Equal(other Type) bool
func (Word256Type) ID ¶
func (Word256Type) ID() string
Directories
¶
| Path | Synopsis |
|---|---|
|
encoding
|
|
|
ccf
Package ccf implements CCF specification
|
Package ccf implements CCF specification |
|
json
Package json implements the JSON-Cadence specification: https://github.com/onflow/flow/blob/master/docs/json-cadence-spec.md
|
Package json implements the JSON-Cadence specification: https://github.com/onflow/flow/blob/master/docs/json-cadence-spec.md |
|
Package fixedpoint provides constants, as well as formatting, conversion, and checking functionality for Cadence fixed-point number types
|
Package fixedpoint provides constants, as well as formatting, conversion, and checking functionality for Cadence fixed-point number types |
|
ast
Package ast contains all AST nodes for Cadence.
|
Package ast contains all AST nodes for Cadence. |
|
cmd/check
command
|
|
|
cmd/compile
command
|
|
|
cmd/decode-state-values
command
|
|
|
cmd/json-cdc
command
|
|
|
cmd/main
command
|
|
|
cmd/minifier
command
* Cadence - The resource-oriented smart contract programming language * * Copyright Dapper Labs, Inc.
|
* Cadence - The resource-oriented smart contract programming language * * Copyright Dapper Labs, Inc. |
|
cmd/parse
command
|
|
|
common/list
Package list implements a doubly linked list.
|
Package list implements a doubly linked list. |
|
compiler/wasm
WebAssembly (https://webassembly.org/) is an open standard for portable executable programs.
|
WebAssembly (https://webassembly.org/) is an open standard for portable executable programs. |
|
compiler/wasm/gen
command
|
|
|
sema/gen
command
|
|
|
tools
|
|
|
astexplorer
command
|
|
|
compare-parsing
command
|
|
|
pretty
command
|
|
|
utils
|
|
|
version
command
Generates a Go file version.go with a constant variableName, which contains the current semantic version as a string literal.
|
Generates a Go file version.go with a constant variableName, which contains the current semantic version as a string literal. |