Documentation ¶
Index ¶
- Constants
- func CastToArray(value Value) ([]interface{}, error)
- func CastToInt(value Value) (int, error)
- func CastToString(value Value) (string, error)
- func CastToUInt16(value Value) (uint16, error)
- func CastToUInt8(value Value) (uint8, error)
- func Fuzz(data []byte) int
- type Address
- type AddressType
- type AnyResourceType
- type AnyStructType
- type AnyType
- type Array
- type ArrayType
- type AuthAccountType
- type BlockType
- type Bool
- type BoolType
- type Bytes
- type BytesType
- type Capability
- type CapabilityPathType
- type CapabilityType
- type CharacterType
- type CompositeType
- type ConstantSizedArrayType
- type Contract
- type ContractInterfaceType
- 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
- type ContractType
- type Dictionary
- type DictionaryType
- type Enum
- type EnumType
- type Event
- type EventPointer
- type EventType
- type Field
- type Fix64
- type Fix64Type
- type FixedPointType
- type Function
- type Int
- type Int128
- type Int128Type
- type Int16
- type Int16Type
- type Int256
- type Int256Type
- type Int32
- type Int32Type
- type Int64
- type Int64Type
- type Int8
- type Int8Type
- type IntType
- type IntegerType
- type InterfaceType
- type KeyValuePair
- type Link
- type MetaType
- type NeverType
- type NumberType
- type NumberValue
- type Optional
- type OptionalType
- type Parameter
- type Path
- type PathType
- type PrivatePathType
- type PublicAccountType
- type PublicPathType
- type ReferenceType
- type Resource
- type ResourceInterfaceType
- 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
- type ResourcePointer
- type ResourceType
- type RestrictedType
- type SignedFixedPointType
- type SignedIntegerType
- type SignedNumberType
- type StoragePathType
- type String
- type StringType
- type Struct
- type StructInterfaceType
- 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
- type StructPointer
- type StructType
- type Type
- type TypeValue
- type UFix64
- type UFix64Type
- type UInt
- type UInt128
- type UInt128Type
- type UInt16
- type UInt16Type
- type UInt256
- type UInt256Type
- type UInt32
- type UInt32Type
- type UInt64
- type UInt64Type
- type UInt8
- type UInt8Type
- type UIntType
- type Value
- type Variable
- type VariableSizedArrayType
- type Void
- type VoidType
- type Word16
- type Word16Type
- type Word32
- type Word32Type
- type Word64
- type Word64Type
- type Word8
- type Word8Type
Constants ¶
View Source
const AddressLength = 8
View Source
const Version = "v0.14.1"
Variables ¶
This section is empty.
Functions ¶
func CastToArray ¶
func CastToString ¶
func CastToUInt16 ¶
func CastToUInt8 ¶
Types ¶
type Address ¶
type Address [AddressLength]byte
func BytesToAddress ¶
func NewAddress ¶
func NewAddress(b [AddressLength]byte) Address
type AnyResourceType ¶
type AnyResourceType struct{}
func (AnyResourceType) ID ¶
func (AnyResourceType) ID() string
type AnyStructType ¶
type AnyStructType struct{}
func (AnyStructType) ID ¶
func (AnyStructType) ID() string
type AuthAccountType ¶ added in v0.7.0
type AuthAccountType struct{}
func (AuthAccountType) ID ¶ added in v0.7.0
func (AuthAccountType) ID() string
type Capability ¶ added in v0.10.0
type Capability struct { Path Path Address Address // TODO: a future version might want to export the whole type BorrowType string }
func (Capability) String ¶ added in v0.12.0
func (v Capability) String() string
func (Capability) ToGoValue ¶ added in v0.10.0
func (Capability) ToGoValue() interface{}
func (Capability) Type ¶ added in v0.10.0
func (Capability) Type() Type
type CapabilityPathType ¶ added in v0.11.0
type CapabilityPathType struct{}
func (CapabilityPathType) ID ¶ added in v0.11.0
func (CapabilityPathType) ID() string
type CapabilityType ¶ added in v0.7.0
type CapabilityType struct { BorrowType Type // contains filtered or unexported fields }
func (CapabilityType) ID ¶ added in v0.7.0
func (t CapabilityType) ID() string
func (CapabilityType) WithID ¶ added in v0.7.0
func (t CapabilityType) WithID(id string) CapabilityType
type CharacterType ¶ added in v0.7.0
type CharacterType struct{}
func (CharacterType) ID ¶ added in v0.7.0
func (CharacterType) ID() string
type CompositeType ¶
type ConstantSizedArrayType ¶
func (ConstantSizedArrayType) Element ¶
func (v ConstantSizedArrayType) Element() Type
func (ConstantSizedArrayType) ID ¶
func (t ConstantSizedArrayType) ID() string
type Contract ¶ added in v0.6.0
type Contract struct { ContractType *ContractType Fields []Value }
func NewContract ¶ added in v0.6.0
func (Contract) WithType ¶ added in v0.6.0
func (v Contract) WithType(typ *ContractType) Contract
type ContractInterfaceType ¶ added in v0.7.0
type ContractInterfaceType struct { Location common.Location QualifiedIdentifier string Fields []Field Initializers [][]Parameter }
func (*ContractInterfaceType) ID ¶ added in v0.7.0
func (t *ContractInterfaceType) ID() string
func (*ContractInterfaceType) InterfaceFields ¶ added in v0.7.0
func (t *ContractInterfaceType) InterfaceFields() []Field
func (*ContractInterfaceType) InterfaceInitializers ¶ added in v0.7.0
func (t *ContractInterfaceType) InterfaceInitializers() [][]Parameter
func (*ContractInterfaceType) InterfaceTypeLocation ¶ added in v0.12.0
func (t *ContractInterfaceType) InterfaceTypeLocation() common.Location
func (*ContractInterfaceType) InterfaceTypeQualifiedIdentifier ¶ added in v0.12.0
func (t *ContractInterfaceType) InterfaceTypeQualifiedIdentifier() string
type ContractType ¶ added in v0.6.0
type ContractType struct { Location common.Location QualifiedIdentifier string Fields []Field Initializers [][]Parameter }
func (*ContractType) CompositeFields ¶ added in v0.6.0
func (t *ContractType) CompositeFields() []Field
func (*ContractType) CompositeInitializers ¶ added in v0.6.0
func (t *ContractType) CompositeInitializers() [][]Parameter
func (*ContractType) CompositeTypeLocation ¶ added in v0.12.0
func (t *ContractType) CompositeTypeLocation() common.Location
func (*ContractType) CompositeTypeQualifiedIdentifier ¶ added in v0.12.0
func (t *ContractType) CompositeTypeQualifiedIdentifier() string
func (*ContractType) ID ¶ added in v0.6.0
func (t *ContractType) ID() string
type Dictionary ¶
type Dictionary struct { Pairs []KeyValuePair // contains filtered or unexported fields }
func NewDictionary ¶
func NewDictionary(pairs []KeyValuePair) Dictionary
func (Dictionary) String ¶ added in v0.12.0
func (v Dictionary) String() string
func (Dictionary) ToGoValue ¶
func (v Dictionary) ToGoValue() interface{}
func (Dictionary) Type ¶
func (v Dictionary) Type() Type
type DictionaryType ¶
func (DictionaryType) ID ¶
func (t DictionaryType) ID() string
type EnumType ¶ added in v0.14.0
type EnumType struct { Location common.Location QualifiedIdentifier string RawType Type Fields []Field Initializers [][]Parameter }
EnumType
func (*EnumType) CompositeFields ¶ added in v0.14.0
func (*EnumType) CompositeInitializers ¶ added in v0.14.0
func (*EnumType) CompositeTypeLocation ¶ added in v0.14.0
func (*EnumType) CompositeTypeQualifiedIdentifier ¶ added in v0.14.0
type EventPointer ¶
type EventPointer struct {
TypeName string
}
func (EventPointer) ID ¶
func (t EventPointer) ID() string
type EventType ¶
type EventType struct { Location common.Location QualifiedIdentifier string Fields []Field Initializer []Parameter }
func (*EventType) CompositeFields ¶
func (*EventType) CompositeInitializers ¶
func (*EventType) CompositeTypeLocation ¶ added in v0.12.0
func (*EventType) CompositeTypeQualifiedIdentifier ¶ added in v0.12.0
type Fix64 ¶
type Fix64 int64
func NewFix64FromParts ¶ added in v0.5.0
func (Fix64) ToBigEndianBytes ¶ added in v0.5.0
type FixedPointType ¶ added in v0.7.0
type FixedPointType struct{}
func (FixedPointType) ID ¶ added in v0.7.0
func (FixedPointType) ID() string
type Function ¶
type IntegerType ¶ added in v0.7.0
type IntegerType struct{}
func (IntegerType) ID ¶ added in v0.7.0
func (IntegerType) ID() string
type InterfaceType ¶ added in v0.7.0
type KeyValuePair ¶
type Link ¶ added in v0.7.0
type NumberType ¶ added in v0.7.0
type NumberType struct{}
func (NumberType) ID ¶ added in v0.7.0
func (NumberType) ID() string
type NumberValue ¶ added in v0.5.0
type OptionalType ¶
type OptionalType struct {
Type Type
}
func (OptionalType) ID ¶
func (t OptionalType) ID() string
type PrivatePathType ¶ added in v0.11.0
type PrivatePathType struct{}
func (PrivatePathType) ID ¶ added in v0.11.0
func (PrivatePathType) ID() string
type PublicAccountType ¶ added in v0.7.0
type PublicAccountType struct{}
func (PublicAccountType) ID ¶ added in v0.7.0
func (PublicAccountType) ID() string
type PublicPathType ¶ added in v0.11.0
type PublicPathType struct{}
func (PublicPathType) ID ¶ added in v0.11.0
func (PublicPathType) ID() string
type ReferenceType ¶ added in v0.7.0
func (ReferenceType) ID ¶ added in v0.7.0
func (t ReferenceType) ID() string
func (ReferenceType) WithID ¶ added in v0.7.0
func (t ReferenceType) WithID(id string) ReferenceType
type Resource ¶
type Resource struct { ResourceType *ResourceType Fields []Value }
func NewResource ¶
func (Resource) WithType ¶
func (v Resource) WithType(typ *ResourceType) Resource
type ResourceInterfaceType ¶ added in v0.7.0
type ResourceInterfaceType struct { Location common.Location QualifiedIdentifier string Fields []Field Initializers [][]Parameter }
func (*ResourceInterfaceType) ID ¶ added in v0.7.0
func (t *ResourceInterfaceType) ID() string
func (*ResourceInterfaceType) InterfaceFields ¶ added in v0.7.0
func (t *ResourceInterfaceType) InterfaceFields() []Field
func (*ResourceInterfaceType) InterfaceInitializers ¶ added in v0.7.0
func (t *ResourceInterfaceType) InterfaceInitializers() [][]Parameter
func (*ResourceInterfaceType) InterfaceTypeLocation ¶ added in v0.12.0
func (t *ResourceInterfaceType) InterfaceTypeLocation() common.Location
func (*ResourceInterfaceType) InterfaceTypeQualifiedIdentifier ¶ added in v0.12.0
func (t *ResourceInterfaceType) InterfaceTypeQualifiedIdentifier() string
type ResourcePointer ¶
type ResourcePointer struct {
TypeName string
}
func (ResourcePointer) ID ¶
func (t ResourcePointer) ID() string
type ResourceType ¶
type ResourceType struct { Location common.Location QualifiedIdentifier string Fields []Field Initializers [][]Parameter }
func (*ResourceType) CompositeFields ¶
func (t *ResourceType) CompositeFields() []Field
func (*ResourceType) CompositeInitializers ¶
func (t *ResourceType) CompositeInitializers() [][]Parameter
func (*ResourceType) CompositeTypeLocation ¶ added in v0.12.0
func (t *ResourceType) CompositeTypeLocation() common.Location
func (*ResourceType) CompositeTypeQualifiedIdentifier ¶ added in v0.12.0
func (t *ResourceType) CompositeTypeQualifiedIdentifier() string
func (*ResourceType) ID ¶
func (t *ResourceType) ID() string
type RestrictedType ¶ added in v0.7.0
type RestrictedType struct { Type Type Restrictions []Type // contains filtered or unexported fields }
func (RestrictedType) ID ¶ added in v0.7.0
func (t RestrictedType) ID() string
func (RestrictedType) WithID ¶ added in v0.7.0
func (t RestrictedType) WithID(id string) RestrictedType
type SignedFixedPointType ¶ added in v0.7.0
type SignedFixedPointType struct{}
func (SignedFixedPointType) ID ¶ added in v0.7.0
func (SignedFixedPointType) ID() string
type SignedIntegerType ¶ added in v0.7.0
type SignedIntegerType struct{}
func (SignedIntegerType) ID ¶ added in v0.7.0
func (SignedIntegerType) ID() string
type SignedNumberType ¶ added in v0.7.0
type SignedNumberType struct{}
func (SignedNumberType) ID ¶ added in v0.7.0
func (SignedNumberType) ID() string
type StoragePathType ¶ added in v0.11.0
type StoragePathType struct{}
func (StoragePathType) ID ¶ added in v0.11.0
func (StoragePathType) ID() string
type Struct ¶
type Struct struct { StructType *StructType Fields []Value }
func (Struct) WithType ¶
func (v Struct) WithType(typ *StructType) Struct
type StructInterfaceType ¶ added in v0.7.0
type StructInterfaceType struct { Location common.Location QualifiedIdentifier string Fields []Field Initializers [][]Parameter }
func (*StructInterfaceType) ID ¶ added in v0.7.0
func (t *StructInterfaceType) ID() string
func (*StructInterfaceType) InterfaceFields ¶ added in v0.7.0
func (t *StructInterfaceType) InterfaceFields() []Field
func (*StructInterfaceType) InterfaceInitializers ¶ added in v0.7.0
func (t *StructInterfaceType) InterfaceInitializers() [][]Parameter
func (*StructInterfaceType) InterfaceTypeLocation ¶ added in v0.12.0
func (t *StructInterfaceType) InterfaceTypeLocation() common.Location
func (*StructInterfaceType) InterfaceTypeQualifiedIdentifier ¶ added in v0.12.0
func (t *StructInterfaceType) InterfaceTypeQualifiedIdentifier() string
type StructPointer ¶
type StructPointer struct {
TypeName string
}
func (StructPointer) ID ¶
func (t StructPointer) ID() string
type StructType ¶
type StructType struct { Location common.Location QualifiedIdentifier string Fields []Field Initializers [][]Parameter }
func (*StructType) CompositeFields ¶
func (t *StructType) CompositeFields() []Field
func (*StructType) CompositeInitializers ¶
func (t *StructType) CompositeInitializers() [][]Parameter
func (*StructType) CompositeTypeLocation ¶ added in v0.12.0
func (t *StructType) CompositeTypeLocation() common.Location
func (*StructType) CompositeTypeQualifiedIdentifier ¶ added in v0.12.0
func (t *StructType) CompositeTypeQualifiedIdentifier() string
func (*StructType) ID ¶
func (t *StructType) ID() string
type TypeValue ¶ added in v0.10.0
type TypeValue struct { // TODO: a future version might want to export the whole type StaticType string }
type UFix64 ¶
type UFix64 uint64
func NewUFix64FromParts ¶ added in v0.5.0
func (UFix64) ToBigEndianBytes ¶ added in v0.5.0
type UInt128 ¶
func NewUInt128 ¶
func NewUInt128FromBig ¶
func (UInt128) ToBigEndianBytes ¶ added in v0.5.0
type UInt256 ¶
func NewUInt256 ¶
func NewUInt256FromBig ¶
func (UInt256) ToBigEndianBytes ¶ added in v0.5.0
type Value ¶
type Value interface { Type() Type ToGoValue() interface{} fmt.Stringer // contains filtered or unexported methods }
func MustConvertValue ¶
func MustConvertValue(value interface{}) Value
MustConvertValue converts a Go value to an ABI value or panics if the value cannot be converted.
type VariableSizedArrayType ¶
type VariableSizedArrayType struct {
ElementType Type
}
func (VariableSizedArrayType) Element ¶
func (v VariableSizedArrayType) Element() Type
func (VariableSizedArrayType) ID ¶
func (t VariableSizedArrayType) ID() string
Directories ¶
Path | Synopsis |
---|---|
encoding
|
|
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 |
languageserver
module
|
|
ast
Package ast contains all AST nodes for Cadence.
|
Package ast contains all AST nodes for Cadence. |
cmd/minifier
* Cadence - The resource-oriented smart contract programming language * * Copyright 2019-2020 Dapper Labs, Inc.
|
* Cadence - The resource-oriented smart contract programming language * * Copyright 2019-2020 Dapper Labs, Inc. |
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. |
test-framework
module
|
|
tools
|
|
batch-script
Module
|
|
constructorcheck
Module
|
|
contract-analyzer
Module
|
|
docgen
Module
|
|
get-contracts
Module
|
|
golangci-lint
Module
|
|
maprange
Module
|
|
maprangecheck
Module
|
|
storage-explorer
Module
|
|
unkeyed
Module
|
|
utils
|
|
Click to show internal directories.
Click to hide internal directories.