tests

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAccountCreateResult

func NewAccountCreateResult(address string) *flow.TransactionResult

func NewAccountWithAddress

func NewAccountWithAddress(address string) *flow.Account

func NewBlock

func NewBlock() *flow.Block

func NewCollection

func NewCollection() *flow.Collection

func NewEvent

func NewEvent(index int, eventId string, fields []cadence.Field, values []cadence.Value) *flow.Event

func NewMockGateway

func NewMockGateway() gateway.Gateway

func NewTransaction

func NewTransaction() *flow.Transaction

func NewTransactionResult

func NewTransactionResult(events []flow.Event) *flow.TransactionResult

Types

type MockGateway

type MockGateway struct {
	GetAccountMock           func(address flow.Address) (*flow.Account, error)
	SendTransactionMock      func(tx *flow.Transaction, signer *project.Account) (*flow.Transaction, error)
	GetTransactionResultMock func(tx *flow.Transaction) (*flow.TransactionResult, error)
	GetTransactionMock       func(id flow.Identifier) (*flow.Transaction, error)
	ExecuteScriptMock        func(script []byte, arguments []cadence.Value) (cadence.Value, error)
	GetLatestBlockMock       func() (*flow.Block, error)
	GetEventsMock            func(string, uint64, uint64) ([]client.BlockEvents, error)
	GetCollectionMock        func(id flow.Identifier) (*flow.Collection, error)
	GetBlockByHeightMock     func(uint64) (*flow.Block, error)
	GetBlockByIDMock         func(flow.Identifier) (*flow.Block, error)
}

func (*MockGateway) ExecuteScript

func (g *MockGateway) ExecuteScript(script []byte, arguments []cadence.Value) (cadence.Value, error)

func (*MockGateway) GetAccount

func (g *MockGateway) GetAccount(address flow.Address) (*flow.Account, error)

func (*MockGateway) GetBlockByHeight

func (g *MockGateway) GetBlockByHeight(height uint64) (*flow.Block, error)

func (*MockGateway) GetBlockByID

func (g *MockGateway) GetBlockByID(id flow.Identifier) (*flow.Block, error)

func (*MockGateway) GetCollection

func (g *MockGateway) GetCollection(id flow.Identifier) (*flow.Collection, error)

func (*MockGateway) GetEvents

func (g *MockGateway) GetEvents(name string, start uint64, end uint64) ([]client.BlockEvents, error)

func (*MockGateway) GetLatestBlock

func (g *MockGateway) GetLatestBlock() (*flow.Block, error)

func (*MockGateway) GetTransaction

func (g *MockGateway) GetTransaction(id flow.Identifier) (*flow.Transaction, error)

func (*MockGateway) GetTransactionResult

func (g *MockGateway) GetTransactionResult(tx *flow.Transaction, waitSeal bool) (*flow.TransactionResult, error)

func (*MockGateway) SendTransaction

func (g *MockGateway) SendTransaction(tx *flow.Transaction, signer *project.Account) (*flow.Transaction, error)

Jump to

Keyboard shortcuts

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