Documentation ¶
Index ¶
- Constants
- Variables
- func CodeToHashValue(code []byte) *interpreter.ArrayValue
- func ExportType(t sema.Type, results map[sema.TypeID]cadence.Type) cadence.Type
- func ExportValue(value interpreter.Value, inter *interpreter.Interpreter) cadence.Value
- func LiteralValue(expression ast.Expression, ty sema.Type) (cadence.Value, error)
- func NewAccountKeyValue(accountKey *AccountKey) *interpreter.CompositeValue
- func NewBlockValue(block Block) interpreter.BlockValue
- func NewPublicKeyValue(publicKey *PublicKey) *interpreter.CompositeValue
- func ParseLiteral(literal string, ty sema.Type) (cadence.Value, error)
- func ParseLiteralArgumentList(argumentList string, parameterTypes []sema.Type) ([]cadence.Value, error)
- type AccountKey
- type Address
- type Block
- type BlockHash
- type Cache
- type CacheEntry
- type ComputationLimitExceededError
- type ConformanceCountMismatchError
- type ConformanceMismatchError
- type Context
- type ContractNotFoundError
- type ContractUpdate
- type ContractUpdateError
- type ContractUpdateValidator
- func (validator *ContractUpdateValidator) CheckConstantSizedTypeEquality(expected *ast.ConstantSizedType, found ast.Type) error
- func (validator *ContractUpdateValidator) CheckDictionaryTypeEquality(expected *ast.DictionaryType, found ast.Type) error
- func (validator *ContractUpdateValidator) CheckFunctionTypeEquality(expected *ast.FunctionType, found ast.Type) error
- func (validator *ContractUpdateValidator) CheckInstantiationTypeEquality(expected *ast.InstantiationType, found ast.Type) error
- func (validator *ContractUpdateValidator) CheckNominalTypeEquality(expected *ast.NominalType, found ast.Type) error
- func (validator *ContractUpdateValidator) CheckOptionalTypeEquality(expected *ast.OptionalType, found ast.Type) error
- func (validator *ContractUpdateValidator) CheckReferenceTypeEquality(expected *ast.ReferenceType, found ast.Type) error
- func (validator *ContractUpdateValidator) CheckRestrictedTypeEquality(expected *ast.RestrictedType, found ast.Type) error
- func (validator *ContractUpdateValidator) CheckVariableSizedTypeEquality(expected *ast.VariableSizedType, found ast.Type) error
- func (validator *ContractUpdateValidator) Validate() error
- type ContractUpdates
- type CoverageReport
- type Error
- type ExtraneousFieldError
- type FieldMismatchError
- type HashAlgorithm
- type HighLevelStorage
- type Identifier
- type ImportResolver
- type Interface
- type InvalidContractDeploymentError
- type InvalidContractDeploymentOriginError
- type InvalidDeclarationKindChangeError
- type InvalidEntryPointArgumentError
- type InvalidEntryPointParameterCountError
- type InvalidScriptReturnTypeError
- type InvalidTransactionAuthorizerCountError
- type InvalidTransactionCountError
- type InvalidTypeAssignmentError
- type Location
- type LocationCoverage
- type Metrics
- type Option
- type ParsingCheckingError
- type PublicKey
- type REPL
- type REPLSuggestion
- type ResolvedLocation
- type Runtime
- type Script
- type ScriptParameterTypeNotStorableError
- type SignatureAlgorithm
- type StorageKey
- type TypeMismatchError
- type ValueDeclaration
- func (v ValueDeclaration) ValueDeclarationArgumentLabels() []string
- func (v ValueDeclaration) ValueDeclarationAvailable(location common.Location) bool
- func (v ValueDeclaration) ValueDeclarationIsConstant() bool
- func (v ValueDeclaration) ValueDeclarationKind() common.DeclarationKind
- func (v ValueDeclaration) ValueDeclarationName() string
- func (v ValueDeclaration) ValueDeclarationPosition() ast.Position
- func (v ValueDeclaration) ValueDeclarationType() sema.Type
- func (v ValueDeclaration) ValueDeclarationValue() interpreter.Value
Constants ¶
const ( // Supported signing algorithms SignatureAlgorithmUnknown = sema.SignatureAlgorithmUnknown SignatureAlgorithmECDSA_P256 = sema.SignatureAlgorithmECDSA_P256 SignatureAlgorithmECDSA_Secp256k1 = sema.SignatureAlgorithmECDSA_Secp256k1 SignatureAlgorithmBLS_BLS12381 = sema.SignatureAlgorithmBLS_BLS12381 )
const ( // Supported hashing algorithms HashAlgorithmUnknown = sema.HashAlgorithmUnknown HashAlgorithmSHA2_256 = sema.HashAlgorithmSHA2_256 HashAlgorithmSHA2_384 = sema.HashAlgorithmSHA2_384 HashAlgorithmSHA3_256 = sema.HashAlgorithmSHA3_256 HashAlgorithmSHA3_384 = sema.HashAlgorithmSHA3_384 HashAlgorithmKMAC_128 = sema.HashAlgorithmKMAC_128 )
const BlockHashLength = 32
Variables ¶
var InvalidLiteralError = fmt.Errorf("invalid literal")
var LiteralExpressionTypeError = fmt.Errorf("input is not a literal")
var UnsupportedLiteralError = fmt.Errorf("unsupported literal")
Functions ¶
func CodeToHashValue ¶ added in v0.2.0
func CodeToHashValue(code []byte) *interpreter.ArrayValue
func ExportType ¶ added in v0.11.0
ExportType converts a runtime type to its corresponding Go representation.
func ExportValue ¶ added in v0.12.0
func ExportValue(value interpreter.Value, inter *interpreter.Interpreter) cadence.Value
ExportValue converts a runtime value to its native Go representation.
func LiteralValue ¶ added in v0.12.0
func NewAccountKeyValue ¶ added in v0.14.0
func NewAccountKeyValue(accountKey *AccountKey) *interpreter.CompositeValue
func NewBlockValue ¶ added in v0.2.0
func NewBlockValue(block Block) interpreter.BlockValue
func NewPublicKeyValue ¶ added in v0.14.0
func NewPublicKeyValue(publicKey *PublicKey) *interpreter.CompositeValue
func ParseLiteral ¶ added in v0.12.0
ParseLiteral parses a single literal string, that should have the given type.
Returns an error if the literal string is not a literal (e.g. it does not have valid syntax, or does not parse to a literal).
func ParseLiteralArgumentList ¶ added in v0.12.4
func ParseLiteralArgumentList(argumentList string, parameterTypes []sema.Type) ([]cadence.Value, error)
ParseLiteralArgumentList parses an argument list with literals, that should have the given types.
Returns an error if the code is not a valid argument list, or the arguments are not literals.
Types ¶
type AccountKey ¶ added in v0.14.0
type AccountKey struct { KeyIndex int PublicKey *PublicKey HashAlgo HashAlgorithm Weight int IsRevoked bool }
type BlockHash ¶ added in v0.3.0
type BlockHash [BlockHashLength]byte
type Cache ¶ added in v0.9.3
type Cache map[StorageKey]CacheEntry
type CacheEntry ¶ added in v0.9.3
type CacheEntry struct { // true indicates that the value definitely must be written, independent of the value. // false indicates that the value may has to be written if the value is modified. MustWrite bool Value interpreter.Value }
type ComputationLimitExceededError ¶ added in v0.2.0
type ComputationLimitExceededError struct {
Limit uint64
}
func (ComputationLimitExceededError) Error ¶ added in v0.2.0
func (e ComputationLimitExceededError) Error() string
type ConformanceCountMismatchError ¶ added in v0.13.0
ConformanceCountMismatchError is reported during a contract update, when the conformance count does not match the existing conformance count.
func (*ConformanceCountMismatchError) Error ¶ added in v0.13.0
func (e *ConformanceCountMismatchError) Error() string
type ConformanceMismatchError ¶ added in v0.13.0
ConformanceMismatchError is reported during a contract update, when the enum conformance of the new program does not match the existing one.
func (*ConformanceMismatchError) Error ¶ added in v0.13.0
func (e *ConformanceMismatchError) Error() string
func (*ConformanceMismatchError) SecondaryError ¶ added in v0.13.0
func (e *ConformanceMismatchError) SecondaryError() string
type Context ¶ added in v0.12.0
type Context struct { Interface Interface Location Location PredeclaredValues []ValueDeclaration // contains filtered or unexported fields }
func (*Context) InitializeCodesAndPrograms ¶ added in v0.12.3
func (c *Context) InitializeCodesAndPrograms()
func (Context) SetProgram ¶ added in v0.12.3
type ContractNotFoundError ¶ added in v0.13.0
ContractNotFoundError is reported during a contract update, if no contract can be found in the program.
func (*ContractNotFoundError) Error ¶ added in v0.13.0
func (e *ContractNotFoundError) Error() string
type ContractUpdate ¶ added in v0.13.2
type ContractUpdate struct { Contract interpreter.Value ExportedContract cadence.Value }
type ContractUpdateError ¶ added in v0.13.0
type ContractUpdateError struct {
// contains filtered or unexported fields
}
ContractUpdateError is reported upon any invalid update to a contract or contract interface. It contains all the errors reported during the update validation.
func (*ContractUpdateError) ChildErrors ¶ added in v0.13.0
func (e *ContractUpdateError) ChildErrors() []error
func (*ContractUpdateError) Error ¶ added in v0.13.0
func (e *ContractUpdateError) Error() string
func (*ContractUpdateError) ImportLocation ¶ added in v0.13.0
func (e *ContractUpdateError) ImportLocation() common.Location
type ContractUpdateValidator ¶ added in v0.13.0
type ContractUpdateValidator struct {
// contains filtered or unexported fields
}
func NewContractUpdateValidator ¶ added in v0.13.0
func NewContractUpdateValidator( location Location, contractName string, oldProgram *ast.Program, newProgram *ast.Program, ) *ContractUpdateValidator
NewContractUpdateValidator initializes and returns a validator, without performing any validation. Invoke the `Validate()` method of the validator returned, to start validating the contract.
func (*ContractUpdateValidator) CheckConstantSizedTypeEquality ¶ added in v0.13.0
func (validator *ContractUpdateValidator) CheckConstantSizedTypeEquality(expected *ast.ConstantSizedType, found ast.Type) error
func (*ContractUpdateValidator) CheckDictionaryTypeEquality ¶ added in v0.13.0
func (validator *ContractUpdateValidator) CheckDictionaryTypeEquality(expected *ast.DictionaryType, found ast.Type) error
func (*ContractUpdateValidator) CheckFunctionTypeEquality ¶ added in v0.13.0
func (validator *ContractUpdateValidator) CheckFunctionTypeEquality(expected *ast.FunctionType, found ast.Type) error
func (*ContractUpdateValidator) CheckInstantiationTypeEquality ¶ added in v0.13.0
func (validator *ContractUpdateValidator) CheckInstantiationTypeEquality(expected *ast.InstantiationType, found ast.Type) error
func (*ContractUpdateValidator) CheckNominalTypeEquality ¶ added in v0.13.0
func (validator *ContractUpdateValidator) CheckNominalTypeEquality(expected *ast.NominalType, found ast.Type) error
func (*ContractUpdateValidator) CheckOptionalTypeEquality ¶ added in v0.13.0
func (validator *ContractUpdateValidator) CheckOptionalTypeEquality(expected *ast.OptionalType, found ast.Type) error
func (*ContractUpdateValidator) CheckReferenceTypeEquality ¶ added in v0.13.0
func (validator *ContractUpdateValidator) CheckReferenceTypeEquality(expected *ast.ReferenceType, found ast.Type) error
func (*ContractUpdateValidator) CheckRestrictedTypeEquality ¶ added in v0.13.0
func (validator *ContractUpdateValidator) CheckRestrictedTypeEquality(expected *ast.RestrictedType, found ast.Type) error
func (*ContractUpdateValidator) CheckVariableSizedTypeEquality ¶ added in v0.13.0
func (validator *ContractUpdateValidator) CheckVariableSizedTypeEquality(expected *ast.VariableSizedType, found ast.Type) error
func (*ContractUpdateValidator) Validate ¶ added in v0.13.0
func (validator *ContractUpdateValidator) Validate() error
Validate validates the contract update, and returns an error if it is an invalid update.
type ContractUpdates ¶ added in v0.13.2
type ContractUpdates map[StorageKey]ContractUpdate
type CoverageReport ¶ added in v0.12.0
type CoverageReport struct {
Coverage map[common.LocationID]*LocationCoverage `json:"coverage"`
}
CoverageReport is a collection of coverage per location
func NewCoverageReport ¶ added in v0.12.0
func NewCoverageReport() *CoverageReport
func (*CoverageReport) AddLineHit ¶ added in v0.12.0
func (r *CoverageReport) AddLineHit(location common.Location, line int)
type Error ¶
type Error struct { Err error Location common.Location Codes map[common.LocationID]string Programs map[common.LocationID]*ast.Program }
Error is the containing type for all errors produced by the runtime.
type ExtraneousFieldError ¶ added in v0.13.0
ExtraneousFieldError is reported during a contract update, when the new contract has more fields than the existing contract.
func (*ExtraneousFieldError) Error ¶ added in v0.13.0
func (e *ExtraneousFieldError) Error() string
type FieldMismatchError ¶ added in v0.13.0
FieldMismatchError is reported during a contract update, when a type of a field does not match the existing type of the same field.
func (*FieldMismatchError) Error ¶ added in v0.13.0
func (e *FieldMismatchError) Error() string
func (*FieldMismatchError) SecondaryError ¶ added in v0.13.0
func (e *FieldMismatchError) SecondaryError() string
type HashAlgorithm ¶ added in v0.14.0
type HashAlgorithm = sema.HashAlgorithm
func NewHashAlgorithmFromValue ¶ added in v0.14.0
func NewHashAlgorithmFromValue(value interpreter.Value) HashAlgorithm
type HighLevelStorage ¶ added in v0.6.0
type HighLevelStorage interface { Interface // HighLevelStorageEnabled should return true // if the functions of HighLevelStorage should be called, // e.g. SetCadenceValue HighLevelStorageEnabled() bool // SetCadenceValue sets a value for the given key in the storage, owned by the given account. SetCadenceValue(owner Address, key string, value cadence.Value) (err error) }
type Identifier ¶ added in v0.10.0
type Identifier = ast.Identifier
type ImportResolver ¶
type Interface ¶
type Interface interface { // ResolveLocation resolves an import location. ResolveLocation(identifiers []Identifier, location Location) ([]ResolvedLocation, error) // GetCode returns the code at a given location GetCode(location Location) ([]byte, error) // GetProgram attempts gets the program for the given location, if available. // // NOTE: During execution, this function must always return the *same* program, // i.e. it may NOT return a different program, // an elaboration in the program that is not annotating the AST in the program; // or a program/elaboration and then nothing in a subsequent call. // // This function must also return what was set using SetProgram, // it may NOT return something different or nothing (!) after SetProgram was called. // // This is not a caching function! // GetProgram(Location) (*interpreter.Program, error) // SetProgram sets the program for the given location. SetProgram(Location, *interpreter.Program) error // GetValue gets a value for the given key in the storage, owned by the given account. GetValue(owner, key []byte) (value []byte, err error) // SetValue sets a value for the given key in the storage, owned by the given account. SetValue(owner, key, value []byte) (err error) // CreateAccount creates a new account. CreateAccount(payer Address) (address Address, err error) // AddEncodedAccountKey appends an encoded key to an account. AddEncodedAccountKey(address Address, publicKey []byte) error // RevokeEncodedAccountKey removes a key from an account by index, add returns the encoded key. RevokeEncodedAccountKey(address Address, index int) (publicKey []byte, err error) // AddAccountKey appends a key to an account. AddAccountKey(address Address, publicKey *PublicKey, hashAlgo HashAlgorithm, weight int) (*AccountKey, error) // GetAccountKey retrieves a key from an account by index. GetAccountKey(address Address, index int) (*AccountKey, error) // RemoveAccountKey removes a key from an account by index. RevokeAccountKey(address Address, index int) (*AccountKey, error) // UpdateAccountContractCode updates the code associated with an account contract. UpdateAccountContractCode(address Address, name string, code []byte) (err error) // GetAccountContractCode returns the code associated with an account contract. GetAccountContractCode(address Address, name string) (code []byte, err error) // RemoveAccountContractCode removes the code associated with an account contract. RemoveAccountContractCode(address Address, name string) (err error) // GetSigningAccounts returns the signing accounts. GetSigningAccounts() ([]Address, error) // ProgramLog logs program logs. ProgramLog(string) error // EmitEvent is called when an event is emitted by the runtime. EmitEvent(cadence.Event) error // ValueExists returns true if the given key exists in the storage, owned by the given account. ValueExists(owner, key []byte) (exists bool, err error) // GenerateUUID is called to generate a UUID. GenerateUUID() (uint64, error) // GetComputationLimit returns the computation limit. A value <= 0 means there is no limit GetComputationLimit() uint64 // SetComputationUsed reports the amount of computation used. SetComputationUsed(used uint64) error // DecodeArgument decodes a transaction argument against the given type. DecodeArgument(argument []byte, argumentType cadence.Type) (cadence.Value, error) // GetCurrentBlockHeight returns the current block height. GetCurrentBlockHeight() (uint64, error) // GetBlockAtHeight returns the block at the given height. GetBlockAtHeight(height uint64) (block Block, exists bool, err error) // UnsafeRandom returns a random uint64, where the process of random number derivation is not cryptographically // secure. UnsafeRandom() (uint64, error) // VerifySignature returns true if the given signature was produced by signing the given tag + data // using the given public key, signature algorithm, and hash algorithm. VerifySignature( signature []byte, tag string, signedData []byte, publicKey []byte, signatureAlgorithm SignatureAlgorithm, hashAlgorithm HashAlgorithm, ) (bool, error) // Hash returns the digest of hashing the given data with using the given hash algorithm Hash(data []byte, hashAlgorithm HashAlgorithm) ([]byte, error) // GetStorageUsed gets storage used in bytes by the address at the moment of the function call. GetStorageUsed(address Address) (value uint64, err error) // GetStorageCapacity gets storage capacity in bytes on the address. GetStorageCapacity(address Address) (value uint64, err error) // ImplementationDebugLog logs implementation log statements on a debug-level ImplementationDebugLog(message string) error }
func NewEmptyRuntimeInterface ¶ added in v0.13.0
func NewEmptyRuntimeInterface() Interface
type InvalidContractDeploymentError ¶ added in v0.12.1
type InvalidContractDeploymentError struct { Err error interpreter.LocationRange }
InvalidContractDeploymentError
func (*InvalidContractDeploymentError) ChildErrors ¶ added in v0.12.1
func (e *InvalidContractDeploymentError) ChildErrors() []error
func (*InvalidContractDeploymentError) Error ¶ added in v0.12.1
func (e *InvalidContractDeploymentError) Error() string
func (*InvalidContractDeploymentError) Unwrap ¶ added in v0.12.1
func (e *InvalidContractDeploymentError) Unwrap() error
type InvalidContractDeploymentOriginError ¶ added in v0.12.1
type InvalidContractDeploymentOriginError struct {
interpreter.LocationRange
}
InvalidContractDeploymentOriginError
func (*InvalidContractDeploymentOriginError) Error ¶ added in v0.12.1
func (*InvalidContractDeploymentOriginError) Error() string
type InvalidDeclarationKindChangeError ¶ added in v0.13.0
type InvalidDeclarationKindChangeError struct { ast.Range // contains filtered or unexported fields }
InvalidDeclarationKindChangeError is reported during a contract update, when an attempt is made to convert an existing contract to a contract interface, or vise versa.
func (*InvalidDeclarationKindChangeError) Error ¶ added in v0.13.0
func (e *InvalidDeclarationKindChangeError) Error() string
type InvalidEntryPointArgumentError ¶ added in v0.5.0
func (*InvalidEntryPointArgumentError) Error ¶ added in v0.5.0
func (e *InvalidEntryPointArgumentError) Error() string
func (*InvalidEntryPointArgumentError) Unwrap ¶ added in v0.5.0
func (e *InvalidEntryPointArgumentError) Unwrap() error
type InvalidEntryPointParameterCountError ¶ added in v0.5.0
func (InvalidEntryPointParameterCountError) Error ¶ added in v0.5.0
func (e InvalidEntryPointParameterCountError) Error() string
type InvalidScriptReturnTypeError ¶ added in v0.11.0
InvalidScriptReturnTypeError is an error that is reported for invalid script return types.
For example, the type `Int` is valid, whereas a function type is not, because it cannot be exported/serialized.
func (*InvalidScriptReturnTypeError) Error ¶ added in v0.11.0
func (e *InvalidScriptReturnTypeError) Error() string
type InvalidTransactionAuthorizerCountError ¶ added in v0.2.0
func (InvalidTransactionAuthorizerCountError) Error ¶ added in v0.2.0
func (e InvalidTransactionAuthorizerCountError) Error() string
type InvalidTransactionCountError ¶
type InvalidTransactionCountError struct {
Count int
}
func (InvalidTransactionCountError) Error ¶
func (e InvalidTransactionCountError) Error() string
type InvalidTypeAssignmentError ¶ added in v0.2.0
type InvalidTypeAssignmentError struct { Value interpreter.Value Type sema.Type Err error }
func (*InvalidTypeAssignmentError) Error ¶ added in v0.2.0
func (e *InvalidTypeAssignmentError) Error() string
func (*InvalidTypeAssignmentError) Unwrap ¶ added in v0.2.0
func (e *InvalidTypeAssignmentError) Unwrap() error
type LocationCoverage ¶ added in v0.12.0
LocationCoverage records coverage information for a location
func NewLocationCoverage ¶ added in v0.12.0
func NewLocationCoverage() *LocationCoverage
func (*LocationCoverage) AddLineHit ¶ added in v0.12.0
func (c *LocationCoverage) AddLineHit(line int)
type Option ¶ added in v0.5.0
type Option func(Runtime)
func WithContractUpdateValidationEnabled ¶ added in v0.13.2
WithContractUpdateValidationEnabled returns a runtime option that configures if contract update validation is enabled.
type ParsingCheckingError ¶ added in v0.9.3
ParsingCheckingError is an error wrapper for a parsing or a checking error at a specific location
func (*ParsingCheckingError) ChildErrors ¶ added in v0.9.3
func (e *ParsingCheckingError) ChildErrors() []error
func (*ParsingCheckingError) Error ¶ added in v0.9.3
func (e *ParsingCheckingError) Error() string
func (*ParsingCheckingError) ImportLocation ¶ added in v0.12.1
func (e *ParsingCheckingError) ImportLocation() common.Location
func (*ParsingCheckingError) Unwrap ¶ added in v0.9.3
func (e *ParsingCheckingError) Unwrap() error
type PublicKey ¶ added in v0.14.0
type PublicKey struct { PublicKey []byte SignAlgo SignatureAlgorithm }
func NewPublicKeyFromValue ¶ added in v0.14.0
func NewPublicKeyFromValue(publicKey *interpreter.CompositeValue) *PublicKey
type REPL ¶
type REPL struct {
// contains filtered or unexported fields
}
func (*REPL) Suggestions ¶
func (r *REPL) Suggestions() (result []REPLSuggestion)
type REPLSuggestion ¶ added in v0.2.0
type REPLSuggestion struct {
Name, Description string
}
type ResolvedLocation ¶ added in v0.10.0
type ResolvedLocation = sema.ResolvedLocation
type Runtime ¶
type Runtime interface { // ExecuteScript executes the given script. // // This function returns an error if the program has errors (e.g syntax errors, type errors), // or if the execution fails. ExecuteScript(Script, Context) (cadence.Value, error) // ExecuteTransaction executes the given transaction. // // This function returns an error if the program has errors (e.g syntax errors, type errors), // or if the execution fails. ExecuteTransaction(Script, Context) error // ParseAndCheckProgram parses and checks the given code without executing the program. // // This function returns an error if the program contains any syntax or semantic errors. ParseAndCheckProgram(source []byte, context Context) (*interpreter.Program, error) // SetCoverageReport activates reporting coverage in the given report. // Passing nil disables coverage reporting (default). // SetCoverageReport(coverageReport *CoverageReport) // SetContractUpdateValidationEnabled configures if contract update validation is enabled. // SetContractUpdateValidationEnabled(enabled bool) }
Runtime is a runtime capable of executing Cadence.
func NewInterpreterRuntime ¶
NewInterpreterRuntime returns a interpreter-based version of the Flow runtime.
type ScriptParameterTypeNotStorableError ¶ added in v0.8.0
ScriptParameterTypeNotStorableError is an error that is reported for script parameter types that are not storable.
For example, the type `Int` is a storable type, whereas a function type is not.
func (*ScriptParameterTypeNotStorableError) Error ¶ added in v0.8.0
func (e *ScriptParameterTypeNotStorableError) Error() string
type SignatureAlgorithm ¶ added in v0.14.0
type SignatureAlgorithm = sema.SignatureAlgorithm
type StorageKey ¶ added in v0.9.3
type TypeMismatchError ¶ added in v0.13.0
TypeMismatchError is reported during a contract update, when a type of the new program does not match the existing type.
func (*TypeMismatchError) Error ¶ added in v0.13.0
func (e *TypeMismatchError) Error() string
type ValueDeclaration ¶ added in v0.12.0
type ValueDeclaration struct { Name string Type sema.Type Kind common.DeclarationKind IsConstant bool ArgumentLabels []string Available func(common.Location) bool Value interpreter.Value }
func (ValueDeclaration) ValueDeclarationArgumentLabels ¶ added in v0.12.0
func (v ValueDeclaration) ValueDeclarationArgumentLabels() []string
func (ValueDeclaration) ValueDeclarationAvailable ¶ added in v0.12.0
func (v ValueDeclaration) ValueDeclarationAvailable(location common.Location) bool
func (ValueDeclaration) ValueDeclarationIsConstant ¶ added in v0.12.0
func (v ValueDeclaration) ValueDeclarationIsConstant() bool
func (ValueDeclaration) ValueDeclarationKind ¶ added in v0.12.0
func (v ValueDeclaration) ValueDeclarationKind() common.DeclarationKind
func (ValueDeclaration) ValueDeclarationName ¶ added in v0.12.0
func (v ValueDeclaration) ValueDeclarationName() string
func (ValueDeclaration) ValueDeclarationPosition ¶ added in v0.12.0
func (v ValueDeclaration) ValueDeclarationPosition() ast.Position
func (ValueDeclaration) ValueDeclarationType ¶ added in v0.12.0
func (v ValueDeclaration) ValueDeclarationType() sema.Type
func (ValueDeclaration) ValueDeclarationValue ¶ added in v0.12.0
func (v ValueDeclaration) ValueDeclarationValue() interpreter.Value
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package ast contains all AST nodes for Cadence.
|
Package ast contains all AST nodes for Cadence. |
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. |
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. |
tests
|
|