Documentation ¶
Index ¶
- func DefaultCheckerConfig(checkers map[common.Location]*sema.Checker, codes map[common.Location][]byte, ...) *sema.Config
- func ExitWithError(message string)
- func PrepareChecker(program *ast.Program, location common.Location, ...) (*sema.Checker, func(error))
- func PrepareInterpreter(filename string, debugger *interpreter.Debugger) (*interpreter.Interpreter, *sema.Checker, func(error))
- func PrepareProgram(code []byte, location common.Location, codes map[common.Location][]byte) (*ast.Program, func(error))
- func PrepareProgramFromFile(location common.StringLocation, codes map[common.Location][]byte) (*ast.Program, func(error))
- type StandardLibraryHandler
- func (*StandardLibraryHandler) AccountKeysCount(_ common.Address) (uint64, error)
- func (*StandardLibraryHandler) AddAccountKey(_ common.Address, _ *stdlib.PublicKey, _ sema.HashAlgorithm, _ int) (*stdlib.AccountKey, error)
- func (*StandardLibraryHandler) BLSAggregatePublicKeys(_ []*stdlib.PublicKey) (*stdlib.PublicKey, error)
- func (*StandardLibraryHandler) BLSAggregateSignatures(_ [][]byte) ([]byte, error)
- func (*StandardLibraryHandler) BLSVerifyPOP(_ *stdlib.PublicKey, _ []byte) (bool, error)
- func (*StandardLibraryHandler) CommitStorageTemporarily(_ *interpreter.Interpreter) error
- func (h *StandardLibraryHandler) ContractUpdateRecorded(_ common.AddressLocation) bool
- func (*StandardLibraryHandler) CreateAccount(_ common.Address) (address common.Address, err error)
- func (*StandardLibraryHandler) EmitEvent(_ *interpreter.Interpreter, _ *sema.CompositeType, _ []interpreter.Value, ...)
- func (h *StandardLibraryHandler) EndContractAddition(common.AddressLocation)
- func (h *StandardLibraryHandler) GenerateAccountID(address common.Address) (uint64, error)
- func (*StandardLibraryHandler) GetAccountAvailableBalance(_ common.Address) (uint64, error)
- func (*StandardLibraryHandler) GetAccountBalance(_ common.Address) (uint64, error)
- func (*StandardLibraryHandler) GetAccountContractCode(_ common.AddressLocation) ([]byte, error)
- func (*StandardLibraryHandler) GetAccountContractNames(_ common.Address) ([]string, error)
- func (*StandardLibraryHandler) GetAccountKey(_ common.Address, _ int) (*stdlib.AccountKey, error)
- func (*StandardLibraryHandler) GetBlockAtHeight(_ uint64) (block stdlib.Block, exists bool, err error)
- func (*StandardLibraryHandler) GetCurrentBlockHeight() (uint64, error)
- func (*StandardLibraryHandler) GetStorageCapacity(_ common.Address) (uint64, error)
- func (*StandardLibraryHandler) GetStorageUsed(_ common.Address) (uint64, error)
- func (*StandardLibraryHandler) Hash(_ []byte, _ string, _ sema.HashAlgorithm) ([]byte, error)
- func (*StandardLibraryHandler) InterpretContract(_ common.AddressLocation, _ *interpreter.Program, _ string, ...) (*interpreter.CompositeValue, error)
- func (h *StandardLibraryHandler) IsContractBeingAdded(common.AddressLocation) bool
- func (h *StandardLibraryHandler) NewOnEventEmittedHandler() interpreter.OnEventEmittedFunc
- func (*StandardLibraryHandler) ParseAndCheckProgram(_ []byte, _ common.Location, _ bool) (*interpreter.Program, error)
- func (*StandardLibraryHandler) ProgramLog(message string, locationRange interpreter.LocationRange) error
- func (h *StandardLibraryHandler) ReadRandom(p []byte) error
- func (*StandardLibraryHandler) RecordContractRemoval(_ common.AddressLocation)
- func (*StandardLibraryHandler) RecordContractUpdate(_ common.AddressLocation, _ *interpreter.CompositeValue)
- func (*StandardLibraryHandler) RemoveAccountContractCode(_ common.AddressLocation) error
- func (*StandardLibraryHandler) RevokeAccountKey(_ common.Address, _ int) (*stdlib.AccountKey, error)
- func (h *StandardLibraryHandler) StartContractAddition(common.AddressLocation)
- func (*StandardLibraryHandler) TemporarilyRecordCode(_ common.AddressLocation, _ []byte)
- func (*StandardLibraryHandler) UpdateAccountContractCode(_ common.AddressLocation, _ []byte) error
- func (*StandardLibraryHandler) ValidatePublicKey(_ *stdlib.PublicKey) error
- func (*StandardLibraryHandler) VerifySignature(_ []byte, _ string, _ []byte, _ []byte, _ sema.SignatureAlgorithm, ...) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultCheckerConfig ¶ added in v0.26.0
func ExitWithError ¶
func ExitWithError(message string)
func PrepareChecker ¶
func PrepareChecker( program *ast.Program, location common.Location, codes map[common.Location][]byte, memberAccountAccess map[common.Location]map[common.Location]struct{}, standardLibraryValues []stdlib.StandardLibraryValue, must func(error), ) (*sema.Checker, func(error))
PrepareChecker prepares and initializes a checker with a given code as a string, and a filename which is used for pretty-printing errors, if any
func PrepareInterpreter ¶
func PrepareInterpreter(filename string, debugger *interpreter.Debugger) (*interpreter.Interpreter, *sema.Checker, func(error))
func PrepareProgram ¶ added in v0.7.0
func PrepareProgramFromFile ¶ added in v0.7.0
Types ¶
type StandardLibraryHandler ¶ added in v1.0.0
type StandardLibraryHandler struct {
// contains filtered or unexported fields
}
func (*StandardLibraryHandler) AccountKeysCount ¶ added in v1.0.0
func (*StandardLibraryHandler) AccountKeysCount(_ common.Address) (uint64, error)
func (*StandardLibraryHandler) AddAccountKey ¶ added in v1.0.0
func (*StandardLibraryHandler) AddAccountKey( _ common.Address, _ *stdlib.PublicKey, _ sema.HashAlgorithm, _ int, ) ( *stdlib.AccountKey, error, )
func (*StandardLibraryHandler) BLSAggregatePublicKeys ¶ added in v1.0.0
func (*StandardLibraryHandler) BLSAggregateSignatures ¶ added in v1.0.0
func (*StandardLibraryHandler) BLSAggregateSignatures(_ [][]byte) ([]byte, error)
func (*StandardLibraryHandler) BLSVerifyPOP ¶ added in v1.0.0
func (*StandardLibraryHandler) CommitStorageTemporarily ¶ added in v1.0.0
func (*StandardLibraryHandler) CommitStorageTemporarily(_ *interpreter.Interpreter) error
func (*StandardLibraryHandler) ContractUpdateRecorded ¶ added in v1.0.0
func (h *StandardLibraryHandler) ContractUpdateRecorded(_ common.AddressLocation) bool
func (*StandardLibraryHandler) CreateAccount ¶ added in v1.0.0
func (*StandardLibraryHandler) EmitEvent ¶ added in v1.0.0
func (*StandardLibraryHandler) EmitEvent( _ *interpreter.Interpreter, _ *sema.CompositeType, _ []interpreter.Value, _ interpreter.LocationRange, )
func (*StandardLibraryHandler) EndContractAddition ¶ added in v1.0.0
func (h *StandardLibraryHandler) EndContractAddition(common.AddressLocation)
func (*StandardLibraryHandler) GenerateAccountID ¶ added in v1.0.0
func (h *StandardLibraryHandler) GenerateAccountID(address common.Address) (uint64, error)
func (*StandardLibraryHandler) GetAccountAvailableBalance ¶ added in v1.0.0
func (*StandardLibraryHandler) GetAccountAvailableBalance(_ common.Address) (uint64, error)
func (*StandardLibraryHandler) GetAccountBalance ¶ added in v1.0.0
func (*StandardLibraryHandler) GetAccountBalance(_ common.Address) (uint64, error)
func (*StandardLibraryHandler) GetAccountContractCode ¶ added in v1.0.0
func (*StandardLibraryHandler) GetAccountContractCode(_ common.AddressLocation) ([]byte, error)
func (*StandardLibraryHandler) GetAccountContractNames ¶ added in v1.0.0
func (*StandardLibraryHandler) GetAccountContractNames(_ common.Address) ([]string, error)
func (*StandardLibraryHandler) GetAccountKey ¶ added in v1.0.0
func (*StandardLibraryHandler) GetAccountKey(_ common.Address, _ int) (*stdlib.AccountKey, error)
func (*StandardLibraryHandler) GetBlockAtHeight ¶ added in v1.0.0
func (*StandardLibraryHandler) GetCurrentBlockHeight ¶ added in v1.0.0
func (*StandardLibraryHandler) GetCurrentBlockHeight() (uint64, error)
func (*StandardLibraryHandler) GetStorageCapacity ¶ added in v1.0.0
func (*StandardLibraryHandler) GetStorageCapacity(_ common.Address) (uint64, error)
func (*StandardLibraryHandler) GetStorageUsed ¶ added in v1.0.0
func (*StandardLibraryHandler) GetStorageUsed(_ common.Address) (uint64, error)
func (*StandardLibraryHandler) Hash ¶ added in v1.0.0
func (*StandardLibraryHandler) Hash(_ []byte, _ string, _ sema.HashAlgorithm) ([]byte, error)
func (*StandardLibraryHandler) InterpretContract ¶ added in v1.0.0
func (*StandardLibraryHandler) InterpretContract( _ common.AddressLocation, _ *interpreter.Program, _ string, _ stdlib.DeployedContractConstructorInvocation, ) ( *interpreter.CompositeValue, error, )
func (*StandardLibraryHandler) IsContractBeingAdded ¶ added in v1.0.0
func (h *StandardLibraryHandler) IsContractBeingAdded(common.AddressLocation) bool
func (*StandardLibraryHandler) NewOnEventEmittedHandler ¶ added in v1.0.0
func (h *StandardLibraryHandler) NewOnEventEmittedHandler() interpreter.OnEventEmittedFunc
func (*StandardLibraryHandler) ParseAndCheckProgram ¶ added in v1.0.0
func (*StandardLibraryHandler) ParseAndCheckProgram(_ []byte, _ common.Location, _ bool) (*interpreter.Program, error)
func (*StandardLibraryHandler) ProgramLog ¶ added in v1.0.0
func (*StandardLibraryHandler) ProgramLog(message string, locationRange interpreter.LocationRange) error
func (*StandardLibraryHandler) ReadRandom ¶ added in v1.0.0
func (h *StandardLibraryHandler) ReadRandom(p []byte) error
func (*StandardLibraryHandler) RecordContractRemoval ¶ added in v1.0.0
func (*StandardLibraryHandler) RecordContractRemoval(_ common.AddressLocation)
func (*StandardLibraryHandler) RecordContractUpdate ¶ added in v1.0.0
func (*StandardLibraryHandler) RecordContractUpdate(_ common.AddressLocation, _ *interpreter.CompositeValue)
func (*StandardLibraryHandler) RemoveAccountContractCode ¶ added in v1.0.0
func (*StandardLibraryHandler) RemoveAccountContractCode(_ common.AddressLocation) error
func (*StandardLibraryHandler) RevokeAccountKey ¶ added in v1.0.0
func (*StandardLibraryHandler) RevokeAccountKey(_ common.Address, _ int) (*stdlib.AccountKey, error)
func (*StandardLibraryHandler) StartContractAddition ¶ added in v1.0.0
func (h *StandardLibraryHandler) StartContractAddition(common.AddressLocation)
func (*StandardLibraryHandler) TemporarilyRecordCode ¶ added in v1.0.0
func (*StandardLibraryHandler) TemporarilyRecordCode(_ common.AddressLocation, _ []byte)
func (*StandardLibraryHandler) UpdateAccountContractCode ¶ added in v1.0.0
func (*StandardLibraryHandler) UpdateAccountContractCode(_ common.AddressLocation, _ []byte) error
func (*StandardLibraryHandler) ValidatePublicKey ¶ added in v1.0.0
func (*StandardLibraryHandler) ValidatePublicKey(_ *stdlib.PublicKey) error
func (*StandardLibraryHandler) VerifySignature ¶ added in v1.0.0
func (*StandardLibraryHandler) VerifySignature( _ []byte, _ string, _ []byte, _ []byte, _ sema.SignatureAlgorithm, _ sema.HashAlgorithm, ) ( bool, error, )
Directories ¶
Path | Synopsis |
---|---|
* Cadence - The resource-oriented smart contract programming language * * Copyright Dapper Labs, Inc.
|
* Cadence - The resource-oriented smart contract programming language * * Copyright Dapper Labs, Inc. |
Click to show internal directories.
Click to hide internal directories.