mock

package
v0.29.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2023 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountCreator

type AccountCreator struct {
	mock.Mock
}

AccountCreator is an autogenerated mock type for the AccountCreator type

func NewAccountCreator

func NewAccountCreator(t mockConstructorTestingTNewAccountCreator) *AccountCreator

NewAccountCreator creates a new instance of AccountCreator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*AccountCreator) CreateAccount

func (_m *AccountCreator) CreateAccount(payer common.Address) (common.Address, error)

CreateAccount provides a mock function with given fields: payer

type AccountFreezer

type AccountFreezer struct {
	mock.Mock
}

AccountFreezer is an autogenerated mock type for the AccountFreezer type

func NewAccountFreezer

func NewAccountFreezer(t mockConstructorTestingTNewAccountFreezer) *AccountFreezer

NewAccountFreezer creates a new instance of AccountFreezer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*AccountFreezer) FrozenAccounts

func (_m *AccountFreezer) FrozenAccounts() []common.Address

FrozenAccounts provides a mock function with given fields:

func (*AccountFreezer) Reset

func (_m *AccountFreezer) Reset()

Reset provides a mock function with given fields:

func (*AccountFreezer) SetAccountFrozen

func (_m *AccountFreezer) SetAccountFrozen(address common.Address, frozen bool) error

SetAccountFrozen provides a mock function with given fields: address, frozen

type AccountInfo

type AccountInfo struct {
	mock.Mock
}

AccountInfo is an autogenerated mock type for the AccountInfo type

func NewAccountInfo

func NewAccountInfo(t mockConstructorTestingTNewAccountInfo) *AccountInfo

NewAccountInfo creates a new instance of AccountInfo. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*AccountInfo) GetAccount

func (_m *AccountInfo) GetAccount(address flow.Address) (*flow.Account, error)

GetAccount provides a mock function with given fields: address

func (*AccountInfo) GetAccountAvailableBalance

func (_m *AccountInfo) GetAccountAvailableBalance(address common.Address) (uint64, error)

GetAccountAvailableBalance provides a mock function with given fields: address

func (*AccountInfo) GetAccountBalance

func (_m *AccountInfo) GetAccountBalance(address common.Address) (uint64, error)

GetAccountBalance provides a mock function with given fields: address

func (*AccountInfo) GetStorageCapacity

func (_m *AccountInfo) GetStorageCapacity(address common.Address) (uint64, error)

GetStorageCapacity provides a mock function with given fields: address

func (*AccountInfo) GetStorageUsed

func (_m *AccountInfo) GetStorageUsed(address common.Address) (uint64, error)

GetStorageUsed provides a mock function with given fields: address

type AccountKeyReader

type AccountKeyReader struct {
	mock.Mock
}

AccountKeyReader is an autogenerated mock type for the AccountKeyReader type

func NewAccountKeyReader

func NewAccountKeyReader(t mockConstructorTestingTNewAccountKeyReader) *AccountKeyReader

NewAccountKeyReader creates a new instance of AccountKeyReader. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*AccountKeyReader) AccountKeysCount

func (_m *AccountKeyReader) AccountKeysCount(address common.Address) (uint64, error)

AccountKeysCount provides a mock function with given fields: address

func (*AccountKeyReader) GetAccountKey

func (_m *AccountKeyReader) GetAccountKey(address common.Address, keyIndex int) (*stdlib.AccountKey, error)

GetAccountKey provides a mock function with given fields: address, keyIndex

type AccountKeyUpdater

type AccountKeyUpdater struct {
	mock.Mock
}

AccountKeyUpdater is an autogenerated mock type for the AccountKeyUpdater type

func NewAccountKeyUpdater

func NewAccountKeyUpdater(t mockConstructorTestingTNewAccountKeyUpdater) *AccountKeyUpdater

NewAccountKeyUpdater creates a new instance of AccountKeyUpdater. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*AccountKeyUpdater) AddAccountKey

func (_m *AccountKeyUpdater) AddAccountKey(address common.Address, publicKey *stdlib.PublicKey, hashAlgo sema.HashAlgorithm, weight int) (*stdlib.AccountKey, error)

AddAccountKey provides a mock function with given fields: address, publicKey, hashAlgo, weight

func (*AccountKeyUpdater) AddEncodedAccountKey

func (_m *AccountKeyUpdater) AddEncodedAccountKey(address common.Address, publicKey []byte) error

AddEncodedAccountKey provides a mock function with given fields: address, publicKey

func (*AccountKeyUpdater) RevokeAccountKey

func (_m *AccountKeyUpdater) RevokeAccountKey(address common.Address, keyIndex int) (*stdlib.AccountKey, error)

RevokeAccountKey provides a mock function with given fields: address, keyIndex

func (*AccountKeyUpdater) RevokeEncodedAccountKey

func (_m *AccountKeyUpdater) RevokeEncodedAccountKey(address common.Address, index int) ([]byte, error)

RevokeEncodedAccountKey provides a mock function with given fields: address, index

type Accounts

type Accounts struct {
	mock.Mock
}

Accounts is an autogenerated mock type for the Accounts type

func NewAccounts

func NewAccounts(t mockConstructorTestingTNewAccounts) *Accounts

NewAccounts creates a new instance of Accounts. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Accounts) AllocateStorageIndex

func (_m *Accounts) AllocateStorageIndex(address flow.Address) (atree.StorageIndex, error)

AllocateStorageIndex provides a mock function with given fields: address

func (*Accounts) AppendPublicKey

func (_m *Accounts) AppendPublicKey(address flow.Address, key flow.AccountPublicKey) error

AppendPublicKey provides a mock function with given fields: address, key

func (*Accounts) CheckAccountNotFrozen

func (_m *Accounts) CheckAccountNotFrozen(address flow.Address) error

CheckAccountNotFrozen provides a mock function with given fields: address

func (*Accounts) ContractExists

func (_m *Accounts) ContractExists(contractName string, address flow.Address) (bool, error)

ContractExists provides a mock function with given fields: contractName, address

func (*Accounts) Create

func (_m *Accounts) Create(publicKeys []flow.AccountPublicKey, newAddress flow.Address) error

Create provides a mock function with given fields: publicKeys, newAddress

func (*Accounts) DeleteContract

func (_m *Accounts) DeleteContract(contractName string, address flow.Address) error

DeleteContract provides a mock function with given fields: contractName, address

func (*Accounts) Exists

func (_m *Accounts) Exists(address flow.Address) (bool, error)

Exists provides a mock function with given fields: address

func (*Accounts) Get

func (_m *Accounts) Get(address flow.Address) (*flow.Account, error)

Get provides a mock function with given fields: address

func (*Accounts) GetContract

func (_m *Accounts) GetContract(contractName string, address flow.Address) ([]byte, error)

GetContract provides a mock function with given fields: contractName, address

func (*Accounts) GetContractNames

func (_m *Accounts) GetContractNames(address flow.Address) ([]string, error)

GetContractNames provides a mock function with given fields: address

func (*Accounts) GetPublicKey

func (_m *Accounts) GetPublicKey(address flow.Address, keyIndex uint64) (flow.AccountPublicKey, error)

GetPublicKey provides a mock function with given fields: address, keyIndex

func (*Accounts) GetPublicKeyCount

func (_m *Accounts) GetPublicKeyCount(address flow.Address) (uint64, error)

GetPublicKeyCount provides a mock function with given fields: address

func (*Accounts) GetStorageUsed

func (_m *Accounts) GetStorageUsed(address flow.Address) (uint64, error)

GetStorageUsed provides a mock function with given fields: address

func (*Accounts) GetValue

func (_m *Accounts) GetValue(address flow.Address, key string) ([]byte, error)

GetValue provides a mock function with given fields: address, key

func (*Accounts) SetAccountFrozen

func (_m *Accounts) SetAccountFrozen(address flow.Address, frozen bool) error

SetAccountFrozen provides a mock function with given fields: address, frozen

func (*Accounts) SetContract

func (_m *Accounts) SetContract(contractName string, address flow.Address, contract []byte) error

SetContract provides a mock function with given fields: contractName, address, contract

func (*Accounts) SetPublicKey

func (_m *Accounts) SetPublicKey(address flow.Address, keyIndex uint64, publicKey flow.AccountPublicKey) ([]byte, error)

SetPublicKey provides a mock function with given fields: address, keyIndex, publicKey

func (*Accounts) SetValue

func (_m *Accounts) SetValue(address flow.Address, key string, value []byte) error

SetValue provides a mock function with given fields: address, key, value

type AddressGenerator

type AddressGenerator struct {
	mock.Mock
}

AddressGenerator is an autogenerated mock type for the AddressGenerator type

func NewAddressGenerator

func NewAddressGenerator(t mockConstructorTestingTNewAddressGenerator) *AddressGenerator

NewAddressGenerator creates a new instance of AddressGenerator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*AddressGenerator) AddressCount

func (_m *AddressGenerator) AddressCount() uint64

AddressCount provides a mock function with given fields:

func (*AddressGenerator) Bytes

func (_m *AddressGenerator) Bytes() []byte

Bytes provides a mock function with given fields:

func (*AddressGenerator) CurrentAddress

func (_m *AddressGenerator) CurrentAddress() flow.Address

CurrentAddress provides a mock function with given fields:

func (*AddressGenerator) NextAddress

func (_m *AddressGenerator) NextAddress() (flow.Address, error)

NextAddress provides a mock function with given fields:

type BlockInfo

type BlockInfo struct {
	mock.Mock
}

BlockInfo is an autogenerated mock type for the BlockInfo type

func NewBlockInfo

func NewBlockInfo(t mockConstructorTestingTNewBlockInfo) *BlockInfo

NewBlockInfo creates a new instance of BlockInfo. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*BlockInfo) GetBlockAtHeight

func (_m *BlockInfo) GetBlockAtHeight(height uint64) (stdlib.Block, bool, error)

GetBlockAtHeight provides a mock function with given fields: height

func (*BlockInfo) GetCurrentBlockHeight

func (_m *BlockInfo) GetCurrentBlockHeight() (uint64, error)

GetCurrentBlockHeight provides a mock function with given fields:

type Blocks

type Blocks struct {
	mock.Mock
}

Blocks is an autogenerated mock type for the Blocks type

func NewBlocks

func NewBlocks(t mockConstructorTestingTNewBlocks) *Blocks

NewBlocks creates a new instance of Blocks. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Blocks) ByHeightFrom

func (_m *Blocks) ByHeightFrom(height uint64, header *flow.Header) (*flow.Header, error)

ByHeightFrom provides a mock function with given fields: height, header

type BootstrapAccountCreator

type BootstrapAccountCreator struct {
	mock.Mock
}

BootstrapAccountCreator is an autogenerated mock type for the BootstrapAccountCreator type

func NewBootstrapAccountCreator

func NewBootstrapAccountCreator(t mockConstructorTestingTNewBootstrapAccountCreator) *BootstrapAccountCreator

NewBootstrapAccountCreator creates a new instance of BootstrapAccountCreator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*BootstrapAccountCreator) CreateBootstrapAccount

func (_m *BootstrapAccountCreator) CreateBootstrapAccount(publicKeys []flow.AccountPublicKey) (flow.Address, error)

CreateBootstrapAccount provides a mock function with given fields: publicKeys

type ContractUpdater

type ContractUpdater struct {
	mock.Mock
}

ContractUpdater is an autogenerated mock type for the ContractUpdater type

func NewContractUpdater

func NewContractUpdater(t mockConstructorTestingTNewContractUpdater) *ContractUpdater

NewContractUpdater creates a new instance of ContractUpdater. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*ContractUpdater) Commit

Commit provides a mock function with given fields:

func (*ContractUpdater) RemoveAccountContractCode

func (_m *ContractUpdater) RemoveAccountContractCode(address common.Address, name string) error

RemoveAccountContractCode provides a mock function with given fields: address, name

func (*ContractUpdater) Reset

func (_m *ContractUpdater) Reset()

Reset provides a mock function with given fields:

func (*ContractUpdater) UpdateAccountContractCode

func (_m *ContractUpdater) UpdateAccountContractCode(address common.Address, name string, code []byte) error

UpdateAccountContractCode provides a mock function with given fields: address, name, code

type ContractUpdaterStubs

type ContractUpdaterStubs struct {
	mock.Mock
}

ContractUpdaterStubs is an autogenerated mock type for the ContractUpdaterStubs type

func NewContractUpdaterStubs

func NewContractUpdaterStubs(t mockConstructorTestingTNewContractUpdaterStubs) *ContractUpdaterStubs

NewContractUpdaterStubs creates a new instance of ContractUpdaterStubs. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*ContractUpdaterStubs) GetAuthorizedAccounts

func (_m *ContractUpdaterStubs) GetAuthorizedAccounts(path cadence.Path) []common.Address

GetAuthorizedAccounts provides a mock function with given fields: path

func (*ContractUpdaterStubs) RestrictedDeploymentEnabled

func (_m *ContractUpdaterStubs) RestrictedDeploymentEnabled() bool

RestrictedDeploymentEnabled provides a mock function with given fields:

func (*ContractUpdaterStubs) RestrictedRemovalEnabled

func (_m *ContractUpdaterStubs) RestrictedRemovalEnabled() bool

RestrictedRemovalEnabled provides a mock function with given fields:

func (*ContractUpdaterStubs) UseContractAuditVoucher

func (_m *ContractUpdaterStubs) UseContractAuditVoucher(address common.Address, code []byte) (bool, error)

UseContractAuditVoucher provides a mock function with given fields: address, code

type CryptoLibrary

type CryptoLibrary struct {
	mock.Mock
}

CryptoLibrary is an autogenerated mock type for the CryptoLibrary type

func NewCryptoLibrary

func NewCryptoLibrary(t mockConstructorTestingTNewCryptoLibrary) *CryptoLibrary

NewCryptoLibrary creates a new instance of CryptoLibrary. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*CryptoLibrary) BLSAggregatePublicKeys

func (_m *CryptoLibrary) BLSAggregatePublicKeys(keys []*stdlib.PublicKey) (*stdlib.PublicKey, error)

BLSAggregatePublicKeys provides a mock function with given fields: keys

func (*CryptoLibrary) BLSAggregateSignatures

func (_m *CryptoLibrary) BLSAggregateSignatures(sigs [][]byte) ([]byte, error)

BLSAggregateSignatures provides a mock function with given fields: sigs

func (*CryptoLibrary) BLSVerifyPOP

func (_m *CryptoLibrary) BLSVerifyPOP(pk *stdlib.PublicKey, sig []byte) (bool, error)

BLSVerifyPOP provides a mock function with given fields: pk, sig

func (*CryptoLibrary) Hash

func (_m *CryptoLibrary) Hash(data []byte, tag string, hashAlgorithm sema.HashAlgorithm) ([]byte, error)

Hash provides a mock function with given fields: data, tag, hashAlgorithm

func (*CryptoLibrary) ValidatePublicKey

func (_m *CryptoLibrary) ValidatePublicKey(pk *stdlib.PublicKey) error

ValidatePublicKey provides a mock function with given fields: pk

func (*CryptoLibrary) VerifySignature

func (_m *CryptoLibrary) VerifySignature(signature []byte, tag string, signedData []byte, publicKey []byte, signatureAlgorithm sema.SignatureAlgorithm, hashAlgorithm sema.HashAlgorithm) (bool, error)

VerifySignature provides a mock function with given fields: signature, tag, signedData, publicKey, signatureAlgorithm, hashAlgorithm

type DerivedTransactionData

type DerivedTransactionData struct {
	mock.Mock
}

DerivedTransactionData is an autogenerated mock type for the DerivedTransactionData type

func NewDerivedTransactionData

func NewDerivedTransactionData(t mockConstructorTestingTNewDerivedTransactionData) *DerivedTransactionData

NewDerivedTransactionData creates a new instance of DerivedTransactionData. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*DerivedTransactionData) GetProgram

GetProgram provides a mock function with given fields: loc

func (*DerivedTransactionData) SetProgram

func (_m *DerivedTransactionData) SetProgram(loc common.AddressLocation, prog *derived.Program, _a2 *state.State)

SetProgram provides a mock function with given fields: loc, prog, _a2

type Environment

type Environment struct {
	mock.Mock
}

Environment is an autogenerated mock type for the Environment type

func NewEnvironment

func NewEnvironment(t mockConstructorTestingTNewEnvironment) *Environment

NewEnvironment creates a new instance of Environment. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Environment) AccountKeysCount

func (_m *Environment) AccountKeysCount(address common.Address) (uint64, error)

AccountKeysCount provides a mock function with given fields: address

func (*Environment) AccountsStorageCapacity

func (_m *Environment) AccountsStorageCapacity(addresses []common.Address, payer common.Address, maxTxFees uint64) (cadence.Value, error)

AccountsStorageCapacity provides a mock function with given fields: addresses, payer, maxTxFees

func (*Environment) AddAccountKey

func (_m *Environment) AddAccountKey(address common.Address, publicKey *stdlib.PublicKey, hashAlgo sema.HashAlgorithm, weight int) (*stdlib.AccountKey, error)

AddAccountKey provides a mock function with given fields: address, publicKey, hashAlgo, weight

func (*Environment) AddEncodedAccountKey

func (_m *Environment) AddEncodedAccountKey(address common.Address, publicKey []byte) error

AddEncodedAccountKey provides a mock function with given fields: address, publicKey

func (*Environment) AllocateStorageIndex

func (_m *Environment) AllocateStorageIndex(owner []byte) (atree.StorageIndex, error)

AllocateStorageIndex provides a mock function with given fields: owner

func (*Environment) BLSAggregatePublicKeys

func (_m *Environment) BLSAggregatePublicKeys(publicKeys []*stdlib.PublicKey) (*stdlib.PublicKey, error)

BLSAggregatePublicKeys provides a mock function with given fields: publicKeys

func (*Environment) BLSAggregateSignatures

func (_m *Environment) BLSAggregateSignatures(signatures [][]byte) ([]byte, error)

BLSAggregateSignatures provides a mock function with given fields: signatures

func (*Environment) BLSVerifyPOP

func (_m *Environment) BLSVerifyPOP(publicKey *stdlib.PublicKey, signature []byte) (bool, error)

BLSVerifyPOP provides a mock function with given fields: publicKey, signature

func (*Environment) BorrowCadenceRuntime

func (_m *Environment) BorrowCadenceRuntime() *runtime.ReusableCadenceRuntime

BorrowCadenceRuntime provides a mock function with given fields:

func (*Environment) CheckPayerBalanceAndGetMaxTxFees

func (_m *Environment) CheckPayerBalanceAndGetMaxTxFees(payer flow.Address, inclusionEffort uint64, executionEffort uint64) (cadence.Value, error)

CheckPayerBalanceAndGetMaxTxFees provides a mock function with given fields: payer, inclusionEffort, executionEffort

func (*Environment) ComputationIntensities

func (_m *Environment) ComputationIntensities() meter.MeteredComputationIntensities

ComputationIntensities provides a mock function with given fields:

func (*Environment) ComputationUsed

func (_m *Environment) ComputationUsed() uint64

ComputationUsed provides a mock function with given fields:

func (*Environment) CreateAccount

func (_m *Environment) CreateAccount(payer common.Address) (common.Address, error)

CreateAccount provides a mock function with given fields: payer

func (*Environment) DecodeArgument

func (_m *Environment) DecodeArgument(argument []byte, argumentType cadence.Type) (cadence.Value, error)

DecodeArgument provides a mock function with given fields: argument, argumentType

func (*Environment) DeductTransactionFees

func (_m *Environment) DeductTransactionFees(payer flow.Address, inclusionEffort uint64, executionEffort uint64) (cadence.Value, error)

DeductTransactionFees provides a mock function with given fields: payer, inclusionEffort, executionEffort

func (*Environment) EmitEvent

func (_m *Environment) EmitEvent(_a0 cadence.Event) error

EmitEvent provides a mock function with given fields: _a0

func (*Environment) Events

func (_m *Environment) Events() []flow.Event

Events provides a mock function with given fields:

func (*Environment) FlushPendingUpdates

func (_m *Environment) FlushPendingUpdates() (derived.TransactionInvalidator, error)

FlushPendingUpdates provides a mock function with given fields:

func (*Environment) FrozenAccounts

func (_m *Environment) FrozenAccounts() []common.Address

FrozenAccounts provides a mock function with given fields:

func (*Environment) GenerateUUID

func (_m *Environment) GenerateUUID() (uint64, error)

GenerateUUID provides a mock function with given fields:

func (*Environment) GetAccount

func (_m *Environment) GetAccount(address flow.Address) (*flow.Account, error)

GetAccount provides a mock function with given fields: address

func (*Environment) GetAccountAvailableBalance

func (_m *Environment) GetAccountAvailableBalance(address common.Address) (uint64, error)

GetAccountAvailableBalance provides a mock function with given fields: address

func (*Environment) GetAccountBalance

func (_m *Environment) GetAccountBalance(address common.Address) (uint64, error)

GetAccountBalance provides a mock function with given fields: address

func (*Environment) GetAccountContractCode

func (_m *Environment) GetAccountContractCode(address common.Address, name string) ([]byte, error)

GetAccountContractCode provides a mock function with given fields: address, name

func (*Environment) GetAccountContractNames

func (_m *Environment) GetAccountContractNames(address common.Address) ([]string, error)

GetAccountContractNames provides a mock function with given fields: address

func (*Environment) GetAccountKey

func (_m *Environment) GetAccountKey(address common.Address, index int) (*stdlib.AccountKey, error)

GetAccountKey provides a mock function with given fields: address, index

func (*Environment) GetBlockAtHeight

func (_m *Environment) GetBlockAtHeight(height uint64) (stdlib.Block, bool, error)

GetBlockAtHeight provides a mock function with given fields: height

func (*Environment) GetCode

func (_m *Environment) GetCode(location common.Location) ([]byte, error)

GetCode provides a mock function with given fields: location

func (*Environment) GetCurrentBlockHeight

func (_m *Environment) GetCurrentBlockHeight() (uint64, error)

GetCurrentBlockHeight provides a mock function with given fields:

func (*Environment) GetInterpreterSharedState

func (_m *Environment) GetInterpreterSharedState() *interpreter.SharedState

GetInterpreterSharedState provides a mock function with given fields:

func (*Environment) GetProgram

func (_m *Environment) GetProgram(_a0 common.Location) (*interpreter.Program, error)

GetProgram provides a mock function with given fields: _a0

func (*Environment) GetSigningAccounts

func (_m *Environment) GetSigningAccounts() ([]common.Address, error)

GetSigningAccounts provides a mock function with given fields:

func (*Environment) GetStorageCapacity

func (_m *Environment) GetStorageCapacity(address common.Address) (uint64, error)

GetStorageCapacity provides a mock function with given fields: address

func (*Environment) GetStorageUsed

func (_m *Environment) GetStorageUsed(address common.Address) (uint64, error)

GetStorageUsed provides a mock function with given fields: address

func (*Environment) GetValue

func (_m *Environment) GetValue(owner []byte, key []byte) ([]byte, error)

GetValue provides a mock function with given fields: owner, key

func (*Environment) Hash

func (_m *Environment) Hash(data []byte, tag string, hashAlgorithm sema.HashAlgorithm) ([]byte, error)

Hash provides a mock function with given fields: data, tag, hashAlgorithm

func (*Environment) ImplementationDebugLog

func (_m *Environment) ImplementationDebugLog(message string) error

ImplementationDebugLog provides a mock function with given fields: message

func (*Environment) IsServiceAccountAuthorizer

func (_m *Environment) IsServiceAccountAuthorizer() bool

IsServiceAccountAuthorizer provides a mock function with given fields:

func (*Environment) LimitAccountStorage

func (_m *Environment) LimitAccountStorage() bool

LimitAccountStorage provides a mock function with given fields:

func (*Environment) Logger

func (_m *Environment) Logger() *zerolog.Logger

Logger provides a mock function with given fields:

func (*Environment) Logs

func (_m *Environment) Logs() []string

Logs provides a mock function with given fields:

func (*Environment) MemoryEstimate

func (_m *Environment) MemoryEstimate() uint64

MemoryEstimate provides a mock function with given fields:

func (*Environment) MeterComputation

func (_m *Environment) MeterComputation(operationType common.ComputationKind, intensity uint) error

MeterComputation provides a mock function with given fields: operationType, intensity

func (*Environment) MeterEmittedEvent

func (_m *Environment) MeterEmittedEvent(byteSize uint64) error

MeterEmittedEvent provides a mock function with given fields: byteSize

func (*Environment) MeterMemory

func (_m *Environment) MeterMemory(usage common.MemoryUsage) error

MeterMemory provides a mock function with given fields: usage

func (*Environment) ProgramLog

func (_m *Environment) ProgramLog(_a0 string) error

ProgramLog provides a mock function with given fields: _a0

func (*Environment) RecordTrace

func (_m *Environment) RecordTrace(operation string, location common.Location, duration time.Duration, attrs []attribute.KeyValue)

RecordTrace provides a mock function with given fields: operation, location, duration, attrs

func (*Environment) RemoveAccountContractCode

func (_m *Environment) RemoveAccountContractCode(address common.Address, name string) error

RemoveAccountContractCode provides a mock function with given fields: address, name

func (*Environment) Reset

func (_m *Environment) Reset()

Reset provides a mock function with given fields:

func (*Environment) ResolveLocation

func (_m *Environment) ResolveLocation(identifiers []ast.Identifier, location common.Location) ([]sema.ResolvedLocation, error)

ResolveLocation provides a mock function with given fields: identifiers, location

func (*Environment) ResourceOwnerChanged

func (_m *Environment) ResourceOwnerChanged(_a0 *interpreter.Interpreter, resource *interpreter.CompositeValue, oldOwner common.Address, newOwner common.Address)

ResourceOwnerChanged provides a mock function with given fields: _a0, resource, oldOwner, newOwner

func (*Environment) ReturnCadenceRuntime

func (_m *Environment) ReturnCadenceRuntime(_a0 *runtime.ReusableCadenceRuntime)

ReturnCadenceRuntime provides a mock function with given fields: _a0

func (*Environment) RevokeAccountKey

func (_m *Environment) RevokeAccountKey(address common.Address, index int) (*stdlib.AccountKey, error)

RevokeAccountKey provides a mock function with given fields: address, index

func (*Environment) RevokeEncodedAccountKey

func (_m *Environment) RevokeEncodedAccountKey(address common.Address, index int) ([]byte, error)

RevokeEncodedAccountKey provides a mock function with given fields: address, index

func (*Environment) ServiceEvents

func (_m *Environment) ServiceEvents() []flow.Event

ServiceEvents provides a mock function with given fields:

func (*Environment) SetAccountFrozen

func (_m *Environment) SetAccountFrozen(address common.Address, frozen bool) error

SetAccountFrozen provides a mock function with given fields: address, frozen

func (*Environment) SetInterpreterSharedState

func (_m *Environment) SetInterpreterSharedState(state *interpreter.SharedState)

SetInterpreterSharedState provides a mock function with given fields: state

func (*Environment) SetProgram

func (_m *Environment) SetProgram(_a0 common.Location, _a1 *interpreter.Program) error

SetProgram provides a mock function with given fields: _a0, _a1

func (*Environment) SetValue

func (_m *Environment) SetValue(owner []byte, key []byte, value []byte) error

SetValue provides a mock function with given fields: owner, key, value

func (*Environment) SigningAccounts

func (_m *Environment) SigningAccounts() []common.Address

SigningAccounts provides a mock function with given fields:

func (*Environment) StartChildSpan

func (_m *Environment) StartChildSpan(name trace.SpanName, options ...oteltrace.SpanStartOption) tracing.TracerSpan

StartChildSpan provides a mock function with given fields: name, options

func (*Environment) TotalEmittedEventBytes

func (_m *Environment) TotalEmittedEventBytes() uint64

TotalEmittedEventBytes provides a mock function with given fields:

func (*Environment) TransactionFeesEnabled

func (_m *Environment) TransactionFeesEnabled() bool

TransactionFeesEnabled provides a mock function with given fields:

func (*Environment) TxID

func (_m *Environment) TxID() flow.Identifier

TxID provides a mock function with given fields:

func (*Environment) TxIndex

func (_m *Environment) TxIndex() uint32

TxIndex provides a mock function with given fields:

func (*Environment) UnsafeRandom

func (_m *Environment) UnsafeRandom() (uint64, error)

UnsafeRandom provides a mock function with given fields:

func (*Environment) UpdateAccountContractCode

func (_m *Environment) UpdateAccountContractCode(address common.Address, name string, code []byte) error

UpdateAccountContractCode provides a mock function with given fields: address, name, code

func (*Environment) ValidatePublicKey

func (_m *Environment) ValidatePublicKey(key *stdlib.PublicKey) error

ValidatePublicKey provides a mock function with given fields: key

func (*Environment) ValueExists

func (_m *Environment) ValueExists(owner []byte, key []byte) (bool, error)

ValueExists provides a mock function with given fields: owner, key

func (*Environment) VerifySignature

func (_m *Environment) VerifySignature(signature []byte, tag string, signedData []byte, publicKey []byte, signatureAlgorithm sema.SignatureAlgorithm, hashAlgorithm sema.HashAlgorithm) (bool, error)

VerifySignature provides a mock function with given fields: signature, tag, signedData, publicKey, signatureAlgorithm, hashAlgorithm

type EventEmitter

type EventEmitter struct {
	mock.Mock
}

EventEmitter is an autogenerated mock type for the EventEmitter type

func NewEventEmitter

func NewEventEmitter(t mockConstructorTestingTNewEventEmitter) *EventEmitter

NewEventEmitter creates a new instance of EventEmitter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*EventEmitter) EmitEvent

func (_m *EventEmitter) EmitEvent(event cadence.Event) error

EmitEvent provides a mock function with given fields: event

func (*EventEmitter) Events

func (_m *EventEmitter) Events() []flow.Event

Events provides a mock function with given fields:

func (*EventEmitter) Reset

func (_m *EventEmitter) Reset()

Reset provides a mock function with given fields:

func (*EventEmitter) ServiceEvents

func (_m *EventEmitter) ServiceEvents() []flow.Event

ServiceEvents provides a mock function with given fields:

type EventEncoder

type EventEncoder struct {
	mock.Mock
}

EventEncoder is an autogenerated mock type for the EventEncoder type

func NewEventEncoder

func NewEventEncoder(t mockConstructorTestingTNewEventEncoder) *EventEncoder

NewEventEncoder creates a new instance of EventEncoder. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*EventEncoder) Encode

func (_m *EventEncoder) Encode(event cadence.Event) ([]byte, error)

Encode provides a mock function with given fields: event

type Meter

type Meter struct {
	mock.Mock
}

Meter is an autogenerated mock type for the Meter type

func NewMeter

func NewMeter(t mockConstructorTestingTNewMeter) *Meter

NewMeter creates a new instance of Meter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Meter) ComputationIntensities

func (_m *Meter) ComputationIntensities() meter.MeteredComputationIntensities

ComputationIntensities provides a mock function with given fields:

func (*Meter) ComputationUsed

func (_m *Meter) ComputationUsed() uint64

ComputationUsed provides a mock function with given fields:

func (*Meter) MemoryEstimate

func (_m *Meter) MemoryEstimate() uint64

MemoryEstimate provides a mock function with given fields:

func (*Meter) MeterComputation

func (_m *Meter) MeterComputation(_a0 common.ComputationKind, _a1 uint) error

MeterComputation provides a mock function with given fields: _a0, _a1

func (*Meter) MeterEmittedEvent

func (_m *Meter) MeterEmittedEvent(byteSize uint64) error

MeterEmittedEvent provides a mock function with given fields: byteSize

func (*Meter) MeterMemory

func (_m *Meter) MeterMemory(usage common.MemoryUsage) error

MeterMemory provides a mock function with given fields: usage

func (*Meter) TotalEmittedEventBytes

func (_m *Meter) TotalEmittedEventBytes() uint64

TotalEmittedEventBytes provides a mock function with given fields:

type MetricsReporter

type MetricsReporter struct {
	mock.Mock
}

MetricsReporter is an autogenerated mock type for the MetricsReporter type

func NewMetricsReporter

func NewMetricsReporter(t mockConstructorTestingTNewMetricsReporter) *MetricsReporter

NewMetricsReporter creates a new instance of MetricsReporter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MetricsReporter) RuntimeSetNumberOfAccounts

func (_m *MetricsReporter) RuntimeSetNumberOfAccounts(count uint64)

RuntimeSetNumberOfAccounts provides a mock function with given fields: count

func (*MetricsReporter) RuntimeTransactionChecked

func (_m *MetricsReporter) RuntimeTransactionChecked(_a0 time.Duration)

RuntimeTransactionChecked provides a mock function with given fields: _a0

func (*MetricsReporter) RuntimeTransactionInterpreted

func (_m *MetricsReporter) RuntimeTransactionInterpreted(_a0 time.Duration)

RuntimeTransactionInterpreted provides a mock function with given fields: _a0

func (*MetricsReporter) RuntimeTransactionParsed

func (_m *MetricsReporter) RuntimeTransactionParsed(_a0 time.Duration)

RuntimeTransactionParsed provides a mock function with given fields: _a0

type TransactionInfo

type TransactionInfo struct {
	mock.Mock
}

TransactionInfo is an autogenerated mock type for the TransactionInfo type

func NewTransactionInfo

func NewTransactionInfo(t mockConstructorTestingTNewTransactionInfo) *TransactionInfo

NewTransactionInfo creates a new instance of TransactionInfo. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*TransactionInfo) GetSigningAccounts

func (_m *TransactionInfo) GetSigningAccounts() ([]common.Address, error)

GetSigningAccounts provides a mock function with given fields:

func (*TransactionInfo) IsServiceAccountAuthorizer

func (_m *TransactionInfo) IsServiceAccountAuthorizer() bool

IsServiceAccountAuthorizer provides a mock function with given fields:

func (*TransactionInfo) LimitAccountStorage

func (_m *TransactionInfo) LimitAccountStorage() bool

LimitAccountStorage provides a mock function with given fields:

func (*TransactionInfo) SigningAccounts

func (_m *TransactionInfo) SigningAccounts() []common.Address

SigningAccounts provides a mock function with given fields:

func (*TransactionInfo) TransactionFeesEnabled

func (_m *TransactionInfo) TransactionFeesEnabled() bool

TransactionFeesEnabled provides a mock function with given fields:

func (*TransactionInfo) TxID

func (_m *TransactionInfo) TxID() flow.Identifier

TxID provides a mock function with given fields:

func (*TransactionInfo) TxIndex

func (_m *TransactionInfo) TxIndex() uint32

TxIndex provides a mock function with given fields:

type UUIDGenerator

type UUIDGenerator struct {
	mock.Mock
}

UUIDGenerator is an autogenerated mock type for the UUIDGenerator type

func NewUUIDGenerator

func NewUUIDGenerator(t mockConstructorTestingTNewUUIDGenerator) *UUIDGenerator

NewUUIDGenerator creates a new instance of UUIDGenerator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*UUIDGenerator) GenerateUUID

func (_m *UUIDGenerator) GenerateUUID() (uint64, error)

GenerateUUID provides a mock function with given fields:

type UnsafeRandomGenerator

type UnsafeRandomGenerator struct {
	mock.Mock
}

UnsafeRandomGenerator is an autogenerated mock type for the UnsafeRandomGenerator type

func NewUnsafeRandomGenerator

func NewUnsafeRandomGenerator(t mockConstructorTestingTNewUnsafeRandomGenerator) *UnsafeRandomGenerator

NewUnsafeRandomGenerator creates a new instance of UnsafeRandomGenerator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*UnsafeRandomGenerator) UnsafeRandom

func (_m *UnsafeRandomGenerator) UnsafeRandom() (uint64, error)

UnsafeRandom provides a mock function with given fields:

type ValueStore

type ValueStore struct {
	mock.Mock
}

ValueStore is an autogenerated mock type for the ValueStore type

func NewValueStore

func NewValueStore(t mockConstructorTestingTNewValueStore) *ValueStore

NewValueStore creates a new instance of ValueStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*ValueStore) AllocateStorageIndex

func (_m *ValueStore) AllocateStorageIndex(owner []byte) (atree.StorageIndex, error)

AllocateStorageIndex provides a mock function with given fields: owner

func (*ValueStore) GetValue

func (_m *ValueStore) GetValue(owner []byte, key []byte) ([]byte, error)

GetValue provides a mock function with given fields: owner, key

func (*ValueStore) SetValue

func (_m *ValueStore) SetValue(owner []byte, key []byte, value []byte) error

SetValue provides a mock function with given fields: owner, key, value

func (*ValueStore) ValueExists

func (_m *ValueStore) ValueExists(owner []byte, key []byte) (bool, error)

ValueExists provides a mock function with given fields: owner, key

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL