Documentation
¶
Index ¶
- Constants
- Variables
- func AddCDCExtension(name string) string
- func AddToGitIgnore(filename string, loader flowkit.ReaderWriter) error
- func CheckNetwork(network config.Network) error
- func CreateTabWriter(b *bytes.Buffer) *tabwriter.Writer
- func Exit(code int, msg string)
- func GetAccountByContractName(state *flowkit.State, contractName string, network config.Network) (*accounts.Account, error)
- func GetAddressByContractName(state *flowkit.State, contractName string, network config.Network) (flow.Address, error)
- func GetAddressNetwork(address flowsdk.Address) (flowsdk.ChainID, error)
- func MessageWithEmojiPrefix(emoji string, message string) string
- func NormalizeLineEndings(s string) string
- func Pluralize(word string, count int) string
- func PrintEmoji(emoji string) string
- func StripCDCExtension(name string) string
- func TestMocks(t *testing.T) (*mocks.MockServices, *flowkit.State, flowkit.ReaderWriter)
- func ValidateECDSAP256Pub(key string) error
- type StandardLibrary
- func (StandardLibrary) AccountKeysCount(_ common.Address) (uint64, error)
- func (StandardLibrary) AddAccountKey(_ common.Address, _ *stdlib.PublicKey, _ sema.HashAlgorithm, _ int) (*stdlib.AccountKey, error)
- func (StandardLibrary) AddEncodedAccountKey(_ common.Address, _ []byte) error
- func (StandardLibrary) BLSAggregatePublicKeys(_ []*stdlib.PublicKey) (*stdlib.PublicKey, error)
- func (StandardLibrary) BLSAggregateSignatures(_ [][]byte) ([]byte, error)
- func (StandardLibrary) BLSVerifyPOP(_ *stdlib.PublicKey, _ []byte) (bool, error)
- func (StandardLibrary) CommitStorageTemporarily(_ *interpreter.Interpreter) error
- func (StandardLibrary) ContractUpdateRecorded(_ common.AddressLocation) bool
- func (StandardLibrary) CreateAccount(_ common.Address) (address common.Address, err error)
- func (StandardLibrary) EmitEvent(_ *interpreter.Interpreter, _ *sema.CompositeType, _ []interpreter.Value, ...)
- func (StandardLibrary) EndContractAddition(_ common.AddressLocation)
- func (l StandardLibrary) GenerateAccountID(_ common.Address) (uint64, error)
- func (StandardLibrary) GetAccountAvailableBalance(_ common.Address) (uint64, error)
- func (StandardLibrary) GetAccountBalance(_ common.Address) (uint64, error)
- func (StandardLibrary) GetAccountContractCode(_ common.AddressLocation) ([]byte, error)
- func (StandardLibrary) GetAccountContractNames(_ common.Address) ([]string, error)
- func (StandardLibrary) GetAccountKey(_ common.Address, _ int) (*stdlib.AccountKey, error)
- func (StandardLibrary) GetBlockAtHeight(_ uint64) (stdlib.Block, bool, error)
- func (StandardLibrary) GetCurrentBlockHeight() (uint64, error)
- func (StandardLibrary) GetStorageCapacity(_ common.Address) (uint64, error)
- func (StandardLibrary) GetStorageUsed(_ common.Address) (uint64, error)
- func (StandardLibrary) Hash(_ []byte, _ string, _ sema.HashAlgorithm) ([]byte, error)
- func (StandardLibrary) InterpretContract(_ common.AddressLocation, _ *interpreter.Program, _ string, ...) (*interpreter.CompositeValue, error)
- func (StandardLibrary) IsContractBeingAdded(_ common.AddressLocation) bool
- func (StandardLibrary) ParseAndCheckProgram(_ []byte, _ common.Location, _ bool) (*interpreter.Program, error)
- func (StandardLibrary) ProgramLog(_ string, _ interpreter.LocationRange) error
- func (l StandardLibrary) ReadRandom(_ []byte) error
- func (StandardLibrary) RecordContractRemoval(_ common.AddressLocation)
- func (StandardLibrary) RecordContractUpdate(_ common.AddressLocation, _ *interpreter.CompositeValue)
- func (StandardLibrary) RemoveAccountContractCode(_ common.AddressLocation) error
- func (StandardLibrary) RevokeAccountKey(_ common.Address, _ int) (*stdlib.AccountKey, error)
- func (StandardLibrary) RevokeEncodedAccountKey(_ common.Address, _ int) ([]byte, error)
- func (StandardLibrary) StartContractAddition(_ common.AddressLocation)
- func (StandardLibrary) TemporarilyRecordCode(_ common.AddressLocation, _ []byte)
- func (StandardLibrary) UnsafeRandom() (uint64, error)
- func (StandardLibrary) UpdateAccountContractCode(_ common.AddressLocation, _ []byte) error
- func (StandardLibrary) ValidatePublicKey(_ *stdlib.PublicKey) error
- func (StandardLibrary) VerifySignature(_ []byte, _ string, _ []byte, _ []byte, _ sema.SignatureAlgorithm, ...) (bool, error)
Constants ¶
View Source
const EnvPrefix = "FLOW"
Variables ¶
View Source
var NoLogger = output.NewStdoutLogger(output.NoneLog)
View Source
var TestID = flow.HexToID("24993fc99f81641c45c0afa307e683b4f08d407d90041aa9439f487acb33d633")
Functions ¶
func AddCDCExtension ¶ added in v1.20.0
func AddToGitIgnore ¶
AddToGitIgnore adds a new line to the .gitignore if one doesn't exist it creates it.
func CheckNetwork ¶
func GetAddressNetwork ¶
GetAddressNetwork returns the chain ID for an address.
func MessageWithEmojiPrefix ¶ added in v1.18.0
func NormalizeLineEndings ¶ added in v1.19.0
func PrintEmoji ¶ added in v1.18.0
func StripCDCExtension ¶ added in v1.20.0
func TestMocks ¶
func TestMocks(t *testing.T) (*mocks.MockServices, *flowkit.State, flowkit.ReaderWriter)
TestMocks creates mock flowkit services, an empty state and a mock reader writer
func ValidateECDSAP256Pub ¶
ValidateECDSAP256Pub attempt to decode the hex string representation of a ECDSA P256 public key
Types ¶
type StandardLibrary ¶
type StandardLibrary struct {
BaseValueActivation *sema.VariableActivation
}
func NewScriptStandardLibrary ¶
func NewScriptStandardLibrary() (result StandardLibrary)
func NewStandardLibrary ¶
func NewStandardLibrary() (result StandardLibrary)
func (StandardLibrary) AccountKeysCount ¶
func (StandardLibrary) AccountKeysCount(_ common.Address) (uint64, error)
func (StandardLibrary) AddAccountKey ¶
func (StandardLibrary) AddAccountKey( _ common.Address, _ *stdlib.PublicKey, _ sema.HashAlgorithm, _ int, ) ( *stdlib.AccountKey, error, )
func (StandardLibrary) AddEncodedAccountKey ¶
func (StandardLibrary) AddEncodedAccountKey(_ common.Address, _ []byte) error
func (StandardLibrary) BLSAggregatePublicKeys ¶
func (StandardLibrary) BLSAggregateSignatures ¶
func (StandardLibrary) BLSAggregateSignatures(_ [][]byte) ([]byte, error)
func (StandardLibrary) BLSVerifyPOP ¶
func (StandardLibrary) CommitStorageTemporarily ¶
func (StandardLibrary) CommitStorageTemporarily(_ *interpreter.Interpreter) error
func (StandardLibrary) ContractUpdateRecorded ¶
func (StandardLibrary) ContractUpdateRecorded(_ common.AddressLocation) bool
func (StandardLibrary) CreateAccount ¶
func (StandardLibrary) EmitEvent ¶
func (StandardLibrary) EmitEvent( _ *interpreter.Interpreter, _ *sema.CompositeType, _ []interpreter.Value, _ interpreter.LocationRange, )
func (StandardLibrary) EndContractAddition ¶
func (StandardLibrary) EndContractAddition(_ common.AddressLocation)
func (StandardLibrary) GenerateAccountID ¶
func (l StandardLibrary) GenerateAccountID(_ common.Address) (uint64, error)
func (StandardLibrary) GetAccountAvailableBalance ¶
func (StandardLibrary) GetAccountAvailableBalance(_ common.Address) (uint64, error)
func (StandardLibrary) GetAccountBalance ¶
func (StandardLibrary) GetAccountBalance(_ common.Address) (uint64, error)
func (StandardLibrary) GetAccountContractCode ¶
func (StandardLibrary) GetAccountContractCode(_ common.AddressLocation) ([]byte, error)
func (StandardLibrary) GetAccountContractNames ¶
func (StandardLibrary) GetAccountContractNames(_ common.Address) ([]string, error)
func (StandardLibrary) GetAccountKey ¶
func (StandardLibrary) GetAccountKey(_ common.Address, _ int) (*stdlib.AccountKey, error)
func (StandardLibrary) GetBlockAtHeight ¶
func (StandardLibrary) GetCurrentBlockHeight ¶
func (StandardLibrary) GetCurrentBlockHeight() (uint64, error)
func (StandardLibrary) GetStorageCapacity ¶
func (StandardLibrary) GetStorageCapacity(_ common.Address) (uint64, error)
func (StandardLibrary) GetStorageUsed ¶
func (StandardLibrary) GetStorageUsed(_ common.Address) (uint64, error)
func (StandardLibrary) Hash ¶
func (StandardLibrary) Hash(_ []byte, _ string, _ sema.HashAlgorithm) ([]byte, error)
func (StandardLibrary) InterpretContract ¶
func (StandardLibrary) InterpretContract( _ common.AddressLocation, _ *interpreter.Program, _ string, _ stdlib.DeployedContractConstructorInvocation, ) (*interpreter.CompositeValue, error)
func (StandardLibrary) IsContractBeingAdded ¶
func (StandardLibrary) IsContractBeingAdded(_ common.AddressLocation) bool
func (StandardLibrary) ParseAndCheckProgram ¶
func (StandardLibrary) ParseAndCheckProgram(_ []byte, _ common.Location, _ bool) (*interpreter.Program, error)
func (StandardLibrary) ProgramLog ¶
func (StandardLibrary) ProgramLog(_ string, _ interpreter.LocationRange) error
func (StandardLibrary) ReadRandom ¶
func (l StandardLibrary) ReadRandom(_ []byte) error
func (StandardLibrary) RecordContractRemoval ¶
func (StandardLibrary) RecordContractRemoval(_ common.AddressLocation)
func (StandardLibrary) RecordContractUpdate ¶
func (StandardLibrary) RecordContractUpdate(_ common.AddressLocation, _ *interpreter.CompositeValue)
func (StandardLibrary) RemoveAccountContractCode ¶
func (StandardLibrary) RemoveAccountContractCode(_ common.AddressLocation) error
func (StandardLibrary) RevokeAccountKey ¶
func (StandardLibrary) RevokeAccountKey(_ common.Address, _ int) (*stdlib.AccountKey, error)
func (StandardLibrary) RevokeEncodedAccountKey ¶
func (StandardLibrary) StartContractAddition ¶
func (StandardLibrary) StartContractAddition(_ common.AddressLocation)
func (StandardLibrary) TemporarilyRecordCode ¶
func (StandardLibrary) TemporarilyRecordCode(_ common.AddressLocation, _ []byte)
func (StandardLibrary) UnsafeRandom ¶
func (StandardLibrary) UnsafeRandom() (uint64, error)
func (StandardLibrary) UpdateAccountContractCode ¶
func (StandardLibrary) UpdateAccountContractCode(_ common.AddressLocation, _ []byte) error
func (StandardLibrary) ValidatePublicKey ¶
func (StandardLibrary) ValidatePublicKey(_ *stdlib.PublicKey) error
func (StandardLibrary) VerifySignature ¶
func (StandardLibrary) VerifySignature( _ []byte, _ string, _ []byte, _ []byte, _ sema.SignatureAlgorithm, _ sema.HashAlgorithm, ) (bool, error)
Click to show internal directories.
Click to hide internal directories.