Documentation
¶
Overview ¶
Overflow is a DSL to help interact with the flow blockchain using go
By bjartek aka Bjarte Karlsen
Index ¶
- func CadenceString(input string) cadence.String
- func CadenceValueToInterface(field cadence.Value) interface{}
- func CadenceValueToJsonString(value cadence.Value) (string, error)
- func HexToAddress(h string) (*cadence.Address, error)
- func ParseEvents(events []flow.Event) (OverflowEvents, OverflowEvent)
- func PayloadSigner(signer ...string) func(ftb *FlowInteractionBuilder)
- func PrintEvents(events []flow.Event, ignoreFields map[string][]string)deprecated
- func WithEmulatorLog() func(opt *PrinterBuilder)
- func WithEventFilter(filter OverflowEventFilter) func(opt *PrinterBuilder)
- func WithFullMeter() func(opt *PrinterBuilder)
- func WithMeter() func(opt *PrinterBuilder)
- func WithoutEvents() func(opt *PrinterBuilder)
- func WithoutMeter(value int) func(opt *PrinterBuilder)
- type CodeWithSpec
- type DeclarationInfo
- type EventFetcherBuilder
- func (e EventFetcherBuilder) BatchSize(batchSize uint64) EventFetcherBuilderdeprecated
- func (e EventFetcherBuilder) End(blockHeight uint64) EventFetcherBuilderdeprecated
- func (e EventFetcherBuilder) Event(eventName string) EventFetcherBuilderdeprecated
- func (e EventFetcherBuilder) EventIgnoringFields(eventName string, ignoreFields []string) EventFetcherBuilderdeprecated
- func (e EventFetcherBuilder) From(blockHeight int64) EventFetcherBuilderdeprecated
- func (e EventFetcherBuilder) Last(number uint64) EventFetcherBuilderdeprecated
- func (e EventFetcherBuilder) Run() ([]*FormatedEvent, error)deprecated
- func (e EventFetcherBuilder) Start(blockHeight int64) EventFetcherBuilderdeprecated
- func (e EventFetcherBuilder) TrackProgressIn(fileName string) EventFetcherBuilderdeprecated
- func (e EventFetcherBuilder) Until(blockHeight uint64) EventFetcherBuilderdeprecated
- func (e EventFetcherBuilder) UntilCurrent() EventFetcherBuilderdeprecated
- func (e EventFetcherBuilder) Workers(workers int) EventFetcherBuilderdeprecated
- type EventFetcherOption
- func TrackProgressIn(fileName string) EventFetcherOption
- func UntilBlock(blockHeight uint64) EventFetcherOption
- func UntilCurrentBlock() EventFetcherOption
- func WithBatchSize(size uint64) EventFetcherOption
- func WithEndIndex(blockHeight uint64) EventFetcherOption
- func WithEvent(eventName string) EventFetcherOption
- func WithEventIgnoringField(eventName string, ignoreFields []string) EventFetcherOption
- func WithFromIndex(blockHeight int64) EventFetcherOption
- func WithLastBlocks(number uint64) EventFetcherOption
- func WithStartHeight(blockHeight int64) EventFetcherOption
- func WithWorkers(workers int) EventFetcherOption
- type FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) Account(key string) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) AccountArray(value ...string) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) Address(key string) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) Argument(value cadence.Value) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) Boolean(value bool) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) Build() []cadence.Valuedeprecated
- func (a *FlowArgumentsBuilder) Bytes(value []byte) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) DateStringAsUnixTimestamp(dateString string, timezone string) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) Fix64(value string) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) Int(value int) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) Int128(value int) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) Int16(value int16) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) Int256(value int) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) Int32(value int32) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) Int64(value int64) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) Int8(value int8) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) PrivatePath(input string) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) PublicPath(input string) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) RawAccount(address string) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) RawAddress(address string) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) RawAddressArray(value ...string) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) ScalarMap(input map[string]string) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) ScalarMapArray(value ...map[string]string) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) StoragePath(input string) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) String(value string) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) StringArray(value ...string) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) StringMap(input map[string]string) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) StringMapArray(value ...map[string]string) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) UFix64(input float64) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) UFix64Array(value ...float64) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) UInt(value uint) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) UInt128(value uint) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) UInt16(value uint16) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) UInt256(value uint) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) UInt32(value uint32) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) UInt64(value uint64) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) UInt64Array(value ...uint64) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) UInt8(value uint8) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) UInt8Array(value ...uint8) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) Word16(value uint16) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) Word32(value uint32) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) Word64(value uint64) *FlowArgumentsBuilderdeprecated
- func (a *FlowArgumentsBuilder) Word8(value uint8) *FlowArgumentsBuilderdeprecated
- type FlowInteractionBuilder
- func (t FlowInteractionBuilder) Args(args *FlowArgumentsBuilder) FlowInteractionBuilderdeprecated
- func (t FlowInteractionBuilder) ArgsFn(fn func(*FlowArgumentsBuilder)) FlowInteractionBuilderdeprecated
- func (t FlowInteractionBuilder) ArgsV(args []cadence.Value) FlowInteractionBuilderdeprecated
- func (t FlowInteractionBuilder) Gas(limit uint64) FlowInteractionBuilderdeprecated
- func (t FlowInteractionBuilder) NamedArguments(args map[string]string) FlowInteractionBuilderdeprecated
- func (t FlowInteractionBuilder) PayloadSigner(value string) FlowInteractionBuilderdeprecated
- func (t FlowInteractionBuilder) Run() []flow.Eventdeprecated
- func (t FlowInteractionBuilder) RunE() ([]flow.Event, error)deprecated
- func (t FlowInteractionBuilder) RunGetEventsWithName(eventName string) []FormatedEventdeprecated
- func (t FlowInteractionBuilder) RunGetEventsWithNameOrError(eventName string) ([]FormatedEvent, error)deprecated
- func (t FlowInteractionBuilder) RunGetIdFromEvent(eventName string, fieldName string) uint64
- func (t FlowInteractionBuilder) RunGetIdFromEventPrintAll(eventName string, fieldName string) uint64deprecated
- func (t FlowInteractionBuilder) RunGetIds(eventName string, fieldName string) ([]uint64, error)deprecated
- func (t FlowInteractionBuilder) RunPrintEvents(ignoreFields map[string][]string)deprecated
- func (t FlowInteractionBuilder) RunPrintEventsFull()deprecated
- func (t FlowInteractionBuilder) Send() *OverflowResult
- func (t FlowInteractionBuilder) SignProposeAndPayAs(signer string) FlowInteractionBuilderdeprecated
- func (t FlowInteractionBuilder) SignProposeAndPayAsService() FlowInteractionBuilderdeprecated
- func (f FlowInteractionBuilder) Test(t *testing.T) TransactionResultdeprecated
- func (t FlowInteractionBuilder) TransactionPath(path string) FlowInteractionBuilderdeprecated
- type FlowScriptBuilder
- func (t FlowScriptBuilder) Args(args *FlowArgumentsBuilder) FlowScriptBuilder
- func (t FlowScriptBuilder) ArgsFn(fn func(*FlowArgumentsBuilder)) FlowScriptBuilder
- func (t FlowScriptBuilder) ArgsV(args []cadence.Value) FlowScriptBuilder
- func (t FlowScriptBuilder) NamedArguments(args map[string]string) FlowScriptBuilder
- func (t FlowScriptBuilder) Run()
- func (t FlowScriptBuilder) RunFailOnError() cadence.Value
- func (t FlowScriptBuilder) RunMarshalAs(value interface{}) error
- func (t FlowScriptBuilder) RunReturns() (cadence.Value, error)
- func (t FlowScriptBuilder) RunReturnsInterface() interface{}
- func (t FlowScriptBuilder) RunReturnsJsonString() string
- func (t FlowScriptBuilder) ScriptPath(path string) FlowScriptBuilder
- type FormatedEventdeprecated
- type InteractionOption
- func Addresses(name string, value ...string) InteractionOption
- func Arg(name string, value interface{}) InteractionOption
- func Args(args ...interface{}) InteractionOption
- func ArgsM(args map[string]interface{}) InteractionOption
- func DateTimeArg(name string, dateString string, timezone string) InteractionOption
- func EventFilter(filter OverflowEventFilter) InteractionOption
- func Gas(gas uint64) InteractionOption
- func IgnoreGlobalEventFilters() InteractionOption
- func ProposeAs(proposer string) InteractionOption
- func ProposeAsServiceAccount() InteractionOption
- func SignProposeAndPayAs(signer string) InteractionOption
- func SignProposeAndPayAsServiceAccount() InteractionOption
- type LogrusMessage
- type MergedSolution
- type MergedSolutionNetwork
- type Meter
- type MeteredComputationIntensities
- type MeteredMemoryIntensities
- type OverflowBuilder
- func NewOverflow() *OverflowBuilderdeprecated
- func NewOverflowBuilder(network string, newEmulator bool, logLevel int) *OverflowBuilderdeprecated
- func NewOverflowEmulator() *OverflowBuilderdeprecated
- func NewOverflowForNetwork(network string) *OverflowBuilderdeprecated
- func NewOverflowInMemoryEmulator() *OverflowBuilder
- func NewOverflowMainnet() *OverflowBuilderdeprecated
- func NewOverflowTestnet() *OverflowBuilderdeprecated
- func NewTestingEmulator() *OverflowBuilderdeprecated
- func (o *OverflowBuilder) BasePath(path string) *OverflowBuilderdeprecated
- func (o *OverflowBuilder) Config(files ...string) *OverflowBuilderdeprecated
- func (o *OverflowBuilder) DefaultGas(gas int) *OverflowBuilderdeprecated
- func (o *OverflowBuilder) DoNotPrependNetworkToAccountNames() *OverflowBuilderdeprecated
- func (o *OverflowBuilder) ExistingEmulator() *OverflowBuilderdeprecated
- func (o *OverflowBuilder) NoneLog() *OverflowBuilderdeprecated
- func (o *OverflowBuilder) SetServiceSuffix(suffix string) *OverflowBuilderdeprecated
- func (ob *OverflowBuilder) Start() *OverflowStatedeprecated
- func (o *OverflowBuilder) StartE() (*OverflowState, error)deprecated
- type OverflowEvent
- type OverflowEventFilter
- type OverflowEvents
- type OverflowOption
- func DoNotPrependNetworkToAccountNames() OverflowOption
- func PrintInteractionResults(opts ...PrinterOption) OverflowOption
- func StopOnError() OverflowOption
- func WithBasePath(path string) OverflowOption
- func WithEmptyDepoitWithdrawEvents() OverflowOption
- func WithExistingEmulator() OverflowOption
- func WithFeesEvents() OverflowOption
- func WithFlowConfig(files ...string) OverflowOption
- func WithGas(gas int) OverflowOption
- func WithGlobalEventFilter(filter OverflowEventFilter) OverflowOption
- func WithInMemory() OverflowOption
- func WithNetwork(network string) OverflowOption
- func WithNoLog() OverflowOption
- func WithScriptFolderName(name string) OverflowOption
- func WithServiceAccountSuffix(suffix string) OverflowOption
- func WithTransactionFolderName(name string) OverflowOption
- type OverflowPastEvent
- type OverflowResult
- func (o OverflowResult) AssertComputationLessThenOrEqual(t *testing.T, computation int) OverflowResult
- func (o OverflowResult) AssertComputationUsed(t *testing.T, computation int) OverflowResult
- func (o OverflowResult) AssertDebugLog(t *testing.T, message ...string) OverflowResult
- func (o OverflowResult) AssertEmitEventName(t *testing.T, event ...string) OverflowResult
- func (o OverflowResult) AssertEmulatorLog(t *testing.T, message string) OverflowResult
- func (o OverflowResult) AssertEvent(t *testing.T, name string, fields OverflowEvent) OverflowResult
- func (o OverflowResult) AssertEventCount(t *testing.T, number int) OverflowResult
- func (o OverflowResult) AssertFailure(t *testing.T, msg string) OverflowResult
- func (o OverflowResult) AssertNoEvents(t *testing.T) OverflowResult
- func (o OverflowResult) AssertSuccess(t *testing.T) OverflowResult
- func (o OverflowResult) GetEventsWithName(eventName string) []OverflowEvent
- func (o OverflowResult) GetIdFromEvent(eventName string, fieldName string) (uint64, error)
- func (o OverflowResult) GetIdsFromEvent(eventName string, fieldName string) []uint64
- func (o OverflowResult) Print(opts ...PrinterOption) OverflowResult
- type OverflowScriptResult
- func (osr *OverflowScriptResult) AssertLengthWithPointer(t *testing.T, pointer string, length int) *OverflowScriptResult
- func (osr *OverflowScriptResult) AssertWant(t *testing.T, want autogold.Value) *OverflowScriptResult
- func (osr *OverflowScriptResult) AssertWithPointer(t *testing.T, pointer string, value interface{}) *OverflowScriptResult
- func (osr *OverflowScriptResult) AssertWithPointerError(t *testing.T, pointer string, message string) *OverflowScriptResult
- func (osr *OverflowScriptResult) AssertWithPointerWant(t *testing.T, pointer string, want autogold.Value) *OverflowScriptResult
- func (osr *OverflowScriptResult) GetAsInterface() (interface{}, error)
- func (osr *OverflowScriptResult) GetAsJson() (string, error)
- func (osr *OverflowScriptResult) GetWithPointer(pointer string) (interface{}, error)
- func (osr *OverflowScriptResult) MarshalAs(marshalTo interface{}) error
- func (osr *OverflowScriptResult) MarshalPointerAs(pointer string, marshalTo interface{}) error
- func (osr *OverflowScriptResult) Print()
- type OverflowState
- func (f *OverflowState) AccountE(key string) (*flowkit.Account, error)
- func (f *OverflowState) Arguments() *FlowArgumentsBuilderdeprecated
- func (o *OverflowState) BuildInteraction(filename string, interactionType string, opts ...InteractionOption) *FlowInteractionBuilder
- func (f *OverflowState) CreateAccountsE() (*OverflowState, error)
- func (o *OverflowState) DownloadAndUploadFile(url string, accountName string) error
- func (o *OverflowState) DownloadImageAndUploadAsDataUrl(url, accountName string) error
- func (o *OverflowState) EventFetcher() EventFetcherBuilderdeprecated
- func (o *OverflowState) FetchEvents(opts ...EventFetcherOption) ([]OverflowPastEvent, error)
- func (o *OverflowState) FillUpStorage(accountName string) *OverflowState
- func (f *OverflowState) GetAccount(key string) (*flow.Account, error)
- func (f *OverflowState) GetBlockAtHeight(height uint64) (*flow.Block, error)
- func (f *OverflowState) GetBlockById(blockId string) (*flow.Block, error)
- func (o *OverflowState) GetFreeCapacity(accountName string) int
- func (f *OverflowState) GetLatestBlock() (*flow.Block, error)
- func (o *OverflowState) InitializeContracts() *OverflowState
- func (o *OverflowState) InlineScript(content string) FlowScriptBuilder
- func (o *OverflowState) Parse(codeFileName string, code []byte, network string) (string, error)
- func (o *OverflowState) ParseAll() (*Solution, error)
- func (o *OverflowState) ParseAllWithConfig(skipContracts bool, txSkip []string, scriptSkip []string) (*Solution, error)
- func (f *OverflowState) ParseArgumentsWithoutType(fileName string, code []byte, inputArgs map[string]string) ([]cadence.Value, error)deprecated
- func (o *OverflowState) Script(filename string, opts ...InteractionOption) *OverflowScriptResult
- func (o *OverflowState) ScriptFN(outerOpts ...InteractionOption) ScriptFunction
- func (o *OverflowState) ScriptFileNameFN(filename string, outerOpts ...InteractionOption) ScriptOptsFunction
- func (o *OverflowState) ScriptFromFile(filename string) FlowScriptBuilder
- func (o *OverflowState) ServiceAccountName() string
- func (f *OverflowState) SignUserMessage(account string, message string) (string, error)
- func (o *OverflowState) SimpleTxArgs(filename string, signer string, args *FlowArgumentsBuilder)deprecated
- func (o *OverflowState) Transaction(content string) FlowInteractionBuilderdeprecated
- func (o *OverflowState) TransactionFromFile(filename string) FlowInteractionBuilderdeprecated
- func (o *OverflowState) Tx(filename string, opts ...InteractionOption) *OverflowResult
- func (o *OverflowState) TxFN(outerOpts ...InteractionOption) TransactionFunction
- func (o *OverflowState) TxFileNameFN(filename string, outerOpts ...InteractionOption) TransactionOptsFunction
- func (o *OverflowState) UploadFile(filename string, accountName string) error
- func (o *OverflowState) UploadImageAsDataUrl(filename string, accountName string) error
- func (o *OverflowState) UploadString(content string, accountName string) error
- type PrinterBuilder
- type PrinterOption
- type ScriptFunction
- type ScriptOptsFunction
- type Solution
- type SolutionNetwork
- type TransactionFunction
- type TransactionOptsFunction
- type TransactionResultdeprecated
- func (t TransactionResult) AssertComputationLessThenOrEqual(computation int) TransactionResultdeprecated
- func (t TransactionResult) AssertComputationUsed(computation int) TransactionResultdeprecated
- func (t TransactionResult) AssertDebugLog(message ...string) TransactionResultdeprecated
- func (t TransactionResult) AssertEmitEvent(event ...*FormatedEvent) TransactionResultdeprecated
- func (t TransactionResult) AssertEmitEventJson(event ...string) TransactionResultdeprecated
- func (t TransactionResult) AssertEmitEventName(event ...string) TransactionResultdeprecated
- func (t TransactionResult) AssertEmitEventNameShortForm(event ...string) TransactionResultdeprecated
- func (t TransactionResult) AssertEmulatorLog(message string) TransactionResultdeprecated
- func (t TransactionResult) AssertEventCount(number int) TransactionResultdeprecated
- func (t TransactionResult) AssertFailure(msg string) TransactionResultdeprecated
- func (t TransactionResult) AssertNoEvents() TransactionResultdeprecated
- func (t TransactionResult) AssertPartialEvent(expected *FormatedEvent) TransactionResultdeprecated
- func (t TransactionResult) AssertSuccess() TransactionResultdeprecated
- func (t TransactionResult) GetIdFromEvent(eventName string, fieldName string) uint64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CadenceString ¶
go string to cadence string panic if error
func CadenceValueToInterface ¶
CadenceValueToInterface convert a candence.Value into interface{}
func CadenceValueToJsonString ¶
CadenceValueToJsonString converts a cadence.Value into a json pretty printed string
func HexToAddress ¶
HexToAddress converts a hex string to an Address.
func ParseEvents ¶
func ParseEvents(events []flow.Event) (OverflowEvents, OverflowEvent)
Parse raw flow events into a list of events and a fee event
func PayloadSigner ¶
func PayloadSigner(signer ...string) func(ftb *FlowInteractionBuilder)
set an aditional authorizer that will sign the payload
func PrintEvents
deprecated
added in
v1.0.0
func WithEmulatorLog ¶
func WithEmulatorLog() func(opt *PrinterBuilder)
print the emulator log. NB! Verbose
func WithEventFilter ¶
func WithEventFilter(filter OverflowEventFilter) func(opt *PrinterBuilder)
filter out events that are printed
func WithMeter ¶
func WithMeter() func(opt *PrinterBuilder)
print meters as part of the transaction output line
Types ¶
type CodeWithSpec ¶
type CodeWithSpec struct { Code string `json:"code"` Spec *DeclarationInfo `json:"spec"` }
representing code with specification if parameters
type DeclarationInfo ¶
type DeclarationInfo struct { ParameterOrder []string `json:"order"` Parameters map[string]string `json:"parameters"` }
a type containing information about paramter types and orders
type EventFetcherBuilder ¶
type EventFetcherBuilder struct { OverflowState *OverflowState EventsAndIgnoreFields OverflowEventFilter FromIndex int64 EndAtCurrentHeight bool EndIndex uint64 ProgressFile string NumberOfWorkers int EventBatchSize uint64 }
EventFetcherBuilder builder to hold info about eventhook context.
func (EventFetcherBuilder) BatchSize
deprecated
func (e EventFetcherBuilder) BatchSize(batchSize uint64) EventFetcherBuilder
Deprecated: Deprecated in favor of FetchEvent with builder
BatchSize sets the size of a batch
func (EventFetcherBuilder) End
deprecated
func (e EventFetcherBuilder) End(blockHeight uint64) EventFetcherBuilder
Deprecated: Deprecated in favor of FetchEvent with builder
End specify what index to end at
func (EventFetcherBuilder) Event
deprecated
func (e EventFetcherBuilder) Event(eventName string) EventFetcherBuilder
Deprecated: Deprecated in favor of FetchEvent with builder
Event fetches and Events and all its fields
func (EventFetcherBuilder) EventIgnoringFields
deprecated
func (e EventFetcherBuilder) EventIgnoringFields(eventName string, ignoreFields []string) EventFetcherBuilder
Deprecated: Deprecated in favor of FetchEvent with builder
EventIgnoringFields fetch event and ignore the specified fields
func (EventFetcherBuilder) From
deprecated
func (e EventFetcherBuilder) From(blockHeight int64) EventFetcherBuilder
Deprecated: Deprecated in favor of FetchEvent with builder
From specify what blockHeight to fetch from. This can be negative related to end.
func (EventFetcherBuilder) Last
deprecated
func (e EventFetcherBuilder) Last(number uint64) EventFetcherBuilder
Deprecated: Deprecated in favor of FetchEvent with builder
Last fetch events from the number last blocks
func (EventFetcherBuilder) Run
deprecated
func (e EventFetcherBuilder) Run() ([]*FormatedEvent, error)
Deprecated: Deprecated in favor of FetchEvent with builder
Run runs the eventfetcher returning events or an error
func (EventFetcherBuilder) Start
deprecated
func (e EventFetcherBuilder) Start(blockHeight int64) EventFetcherBuilder
Deprecated: Deprecated in favor of FetchEvent with builder
Start specify what blockHeight to fetch starting atm. This can be negative related to end/until
func (EventFetcherBuilder) TrackProgressIn
deprecated
func (e EventFetcherBuilder) TrackProgressIn(fileName string) EventFetcherBuilder
Deprecated: Deprecated in favor of FetchEvent with builder
TrackProgressIn Specify a file to store progress in
func (EventFetcherBuilder) Until
deprecated
func (e EventFetcherBuilder) Until(blockHeight uint64) EventFetcherBuilder
Deprecated: Deprecated in favor of FetchEvent with builder
Until specify what index to end at
func (EventFetcherBuilder) UntilCurrent
deprecated
func (e EventFetcherBuilder) UntilCurrent() EventFetcherBuilder
Deprecated: Deprecated in favor of FetchEvent with builder
UntilCurrent Specify to fetch events until the current Block
func (EventFetcherBuilder) Workers
deprecated
func (e EventFetcherBuilder) Workers(workers int) EventFetcherBuilder
Deprecated: Deprecated in favor of FetchEvent with builder
Workers sets the number of workers.
type EventFetcherOption ¶
type EventFetcherOption func(*EventFetcherBuilder)
Event fetching
A function to customize the transaction builder
func TrackProgressIn ¶
func TrackProgressIn(fileName string) EventFetcherOption
track what block we have read since last run in a file
func UntilBlock ¶
func UntilBlock(blockHeight uint64) EventFetcherOption
fetch events until theg given height alias to WithEndHeight
func UntilCurrentBlock ¶
func UntilCurrentBlock() EventFetcherOption
set the end index to the current height
func WithBatchSize ¶
func WithBatchSize(size uint64) EventFetcherOption
Set the batch sice for FetchEvents
func WithEndIndex ¶
func WithEndIndex(blockHeight uint64) EventFetcherOption
set the end index to use
func WithEvent ¶
func WithEvent(eventName string) EventFetcherOption
set that we want to fetch an event and all its fields
func WithEventIgnoringField ¶
func WithEventIgnoringField(eventName string, ignoreFields []string) EventFetcherOption
set that we want the following events and ignoring the fields mentioned
func WithFromIndex ¶
func WithFromIndex(blockHeight int64) EventFetcherOption
set the from index to use alias to WithStartHeight
func WithLastBlocks ¶
func WithLastBlocks(number uint64) EventFetcherOption
set the relative list of blocks to fetch events from
func WithStartHeight ¶
func WithStartHeight(blockHeight int64) EventFetcherOption
set the start height to use
func WithWorkers ¶
func WithWorkers(workers int) EventFetcherOption
Set the Workers size for FetchEvents
type FlowArgumentsBuilder
deprecated
type FlowArgumentsBuilder struct { Overflow *OverflowState Arguments []cadence.Value Error error }
FlowArgumentsBuilder
The old way of specifing arguments to interactions ¶
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) Account
deprecated
func (a *FlowArgumentsBuilder) Account(key string) *FlowArgumentsBuilder
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) AccountArray
deprecated
func (a *FlowArgumentsBuilder) AccountArray(value ...string) *FlowArgumentsBuilder
Argument add a RawAddressArray to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) Address
deprecated
func (a *FlowArgumentsBuilder) Address(key string) *FlowArgumentsBuilder
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) Argument
deprecated
func (a *FlowArgumentsBuilder) Argument(value cadence.Value) *FlowArgumentsBuilder
Argument add an argument to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) Boolean
deprecated
func (a *FlowArgumentsBuilder) Boolean(value bool) *FlowArgumentsBuilder
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) Build
deprecated
func (a *FlowArgumentsBuilder) Build() []cadence.Value
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) Bytes
deprecated
func (a *FlowArgumentsBuilder) Bytes(value []byte) *FlowArgumentsBuilder
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) DateStringAsUnixTimestamp
deprecated
func (a *FlowArgumentsBuilder) DateStringAsUnixTimestamp(dateString string, timezone string) *FlowArgumentsBuilder
DateStringAsUnixTimestamp sends a dateString parsed in the timezone as a unix timeszone ufix
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) Fix64
deprecated
func (a *FlowArgumentsBuilder) Fix64(value string) *FlowArgumentsBuilder
Fix64 add a Fix64 Argument to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) Int
deprecated
func (a *FlowArgumentsBuilder) Int(value int) *FlowArgumentsBuilder
Int add an Int Argument to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) Int128
deprecated
func (a *FlowArgumentsBuilder) Int128(value int) *FlowArgumentsBuilder
Int128 add an Int128 Argument to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) Int16
deprecated
func (a *FlowArgumentsBuilder) Int16(value int16) *FlowArgumentsBuilder
Int16 add an Int16 Argument to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) Int256
deprecated
func (a *FlowArgumentsBuilder) Int256(value int) *FlowArgumentsBuilder
Int256 add an Int256 Argument to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) Int32
deprecated
func (a *FlowArgumentsBuilder) Int32(value int32) *FlowArgumentsBuilder
Int32 add an Int32 Argument to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) Int64
deprecated
func (a *FlowArgumentsBuilder) Int64(value int64) *FlowArgumentsBuilder
Int64 add an Int64 Argument to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) Int8
deprecated
func (a *FlowArgumentsBuilder) Int8(value int8) *FlowArgumentsBuilder
Int8 add an Int8 Argument to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) PrivatePath
deprecated
func (a *FlowArgumentsBuilder) PrivatePath(input string) *FlowArgumentsBuilder
PrivatePath argument
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) PublicPath
deprecated
func (a *FlowArgumentsBuilder) PublicPath(input string) *FlowArgumentsBuilder
PublicPath argument
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) RawAccount
deprecated
func (a *FlowArgumentsBuilder) RawAccount(address string) *FlowArgumentsBuilder
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) RawAddress
deprecated
func (a *FlowArgumentsBuilder) RawAddress(address string) *FlowArgumentsBuilder
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) RawAddressArray
deprecated
func (a *FlowArgumentsBuilder) RawAddressArray(value ...string) *FlowArgumentsBuilder
Argument add a RawAddressArray to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) ScalarMap
deprecated
func (a *FlowArgumentsBuilder) ScalarMap(input map[string]string) *FlowArgumentsBuilder
Add an {String:UFix64} to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) ScalarMapArray
deprecated
func (a *FlowArgumentsBuilder) ScalarMapArray(value ...map[string]string) *FlowArgumentsBuilder
Argument add an StringArray to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) StoragePath
deprecated
func (a *FlowArgumentsBuilder) StoragePath(input string) *FlowArgumentsBuilder
StoragePath argument
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) String
deprecated
func (a *FlowArgumentsBuilder) String(value string) *FlowArgumentsBuilder
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) StringArray
deprecated
func (a *FlowArgumentsBuilder) StringArray(value ...string) *FlowArgumentsBuilder
Argument add an StringArray to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) StringMap
deprecated
func (a *FlowArgumentsBuilder) StringMap(input map[string]string) *FlowArgumentsBuilder
Add an {String:String} to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) StringMapArray
deprecated
func (a *FlowArgumentsBuilder) StringMapArray(value ...map[string]string) *FlowArgumentsBuilder
Argument add an StringMapArray to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) UFix64
deprecated
func (a *FlowArgumentsBuilder) UFix64(input float64) *FlowArgumentsBuilder
UFix64 add a UFix64 Argument to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) UFix64Array
deprecated
func (a *FlowArgumentsBuilder) UFix64Array(value ...float64) *FlowArgumentsBuilder
Argument add an argument to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) UInt
deprecated
func (a *FlowArgumentsBuilder) UInt(value uint) *FlowArgumentsBuilder
UInt add an UInt Argument to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) UInt128
deprecated
func (a *FlowArgumentsBuilder) UInt128(value uint) *FlowArgumentsBuilder
UInt128 add an UInt128 Argument to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) UInt16
deprecated
func (a *FlowArgumentsBuilder) UInt16(value uint16) *FlowArgumentsBuilder
UInt16 add an UInt16 Argument to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) UInt256
deprecated
func (a *FlowArgumentsBuilder) UInt256(value uint) *FlowArgumentsBuilder
UInt256 add an UInt256 Argument to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) UInt32
deprecated
func (a *FlowArgumentsBuilder) UInt32(value uint32) *FlowArgumentsBuilder
UInt32 add an UInt32 Argument to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) UInt64
deprecated
func (a *FlowArgumentsBuilder) UInt64(value uint64) *FlowArgumentsBuilder
UInt64 add an UInt64 Argument to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) UInt64Array
deprecated
func (a *FlowArgumentsBuilder) UInt64Array(value ...uint64) *FlowArgumentsBuilder
Argument add an argument to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) UInt8
deprecated
func (a *FlowArgumentsBuilder) UInt8(value uint8) *FlowArgumentsBuilder
UInt8 add an UInt8 Argument to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) UInt8Array
deprecated
func (a *FlowArgumentsBuilder) UInt8Array(value ...uint8) *FlowArgumentsBuilder
Argument add an argument to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) Word16
deprecated
func (a *FlowArgumentsBuilder) Word16(value uint16) *FlowArgumentsBuilder
Word16 add a Word16 Argument to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) Word32
deprecated
func (a *FlowArgumentsBuilder) Word32(value uint32) *FlowArgumentsBuilder
Word32 add a Word32 Argument to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) Word64
deprecated
func (a *FlowArgumentsBuilder) Word64(value uint64) *FlowArgumentsBuilder
Word64 add a Word64 Argument to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*FlowArgumentsBuilder) Word8
deprecated
func (a *FlowArgumentsBuilder) Word8(value uint8) *FlowArgumentsBuilder
Word8 add a Word8 Argument to the transaction
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
type FlowInteractionBuilder ¶
type FlowInteractionBuilder struct { //The underlying state of overflow used to fetch some global settings Overflow *OverflowState //The file name of the interaction FileName string //The content of the interaction Content string //The list of raw arguments Arguments []cadence.Value //TODO: Should this be payer? //The main signer used to sign the transaction MainSigner *flowkit.Account //The propser account Proposer *flowkit.Account //The payload signers that will sign the payload PayloadSigners []*flowkit.Account //The gas limit to set for this given interaction GasLimit uint64 //The basepath on where to look for interactions BasePath string //An error object to store errors that arrive as you configure an interaction Error error //The code of the tranasction in bytes TransactionCode []byte //The named arguments NamedArgs map[string]interface{} //Event filters to apply to the interaction EventFilter OverflowEventFilter //Wheter to ignore global event filters from OverflowState or not IgnoreGlobalEventFilters bool }
FlowInteractionBuilder used to create a builder pattern for an interaction
func (FlowInteractionBuilder) Args
deprecated
func (t FlowInteractionBuilder) Args(args *FlowArgumentsBuilder) FlowInteractionBuilder
Deprecated: Use Arg
Specify arguments to send to transaction using a builder you send in
func (FlowInteractionBuilder) ArgsFn
deprecated
func (t FlowInteractionBuilder) ArgsFn(fn func(*FlowArgumentsBuilder)) FlowInteractionBuilder
Deprecated: Use Arg
Specify arguments to send to transaction using a function that takes a builder where you call the builder
func (FlowInteractionBuilder) ArgsV
deprecated
func (t FlowInteractionBuilder) ArgsV(args []cadence.Value) FlowInteractionBuilder
Deprecated: Use Args
Specify arguments to send to transaction using a raw list of values
func (FlowInteractionBuilder) Gas
deprecated
func (t FlowInteractionBuilder) Gas(limit uint64) FlowInteractionBuilder
Deprecated: Use Tx function
Gas sets the gas limit for this transaction
func (FlowInteractionBuilder) NamedArguments
deprecated
func (t FlowInteractionBuilder) NamedArguments(args map[string]string) FlowInteractionBuilder
Deprecated: Use ArgM
func (FlowInteractionBuilder) PayloadSigner
deprecated
func (t FlowInteractionBuilder) PayloadSigner(value string) FlowInteractionBuilder
Deprecated: Use Tx function
PayloadSigner set a signer for the payload
func (FlowInteractionBuilder) Run
deprecated
func (t FlowInteractionBuilder) Run() []flow.Event
Deprecated: use Send and get entire result
Run run the transaction
func (FlowInteractionBuilder) RunE
deprecated
func (t FlowInteractionBuilder) RunE() ([]flow.Event, error)
Deprecated: use Send()
RunE runs returns events and error
func (FlowInteractionBuilder) RunGetEventsWithName
deprecated
func (t FlowInteractionBuilder) RunGetEventsWithName(eventName string) []FormatedEvent
Deprecated: Use Send().GetEventsWithName()
func (FlowInteractionBuilder) RunGetEventsWithNameOrError
deprecated
func (t FlowInteractionBuilder) RunGetEventsWithNameOrError(eventName string) ([]FormatedEvent, error)
Deprecated: use Tx().GetEventsWithName
func (FlowInteractionBuilder) RunGetIdFromEvent ¶
func (t FlowInteractionBuilder) RunGetIdFromEvent(eventName string, fieldName string) uint64
Deprecated, use Send().GetIdFromEvent
func (FlowInteractionBuilder) RunGetIdFromEventPrintAll
deprecated
func (t FlowInteractionBuilder) RunGetIdFromEventPrintAll(eventName string, fieldName string) uint64
Deprecated: Use Tx().Print().GetIdFromEvent
func (FlowInteractionBuilder) RunPrintEvents
deprecated
func (t FlowInteractionBuilder) RunPrintEvents(ignoreFields map[string][]string)
Deprecated: use Send().PrintEventsFiltered()
RunPrintEvents will run a transaction and print all events ignoring some fields
func (FlowInteractionBuilder) RunPrintEventsFull
deprecated
func (t FlowInteractionBuilder) RunPrintEventsFull()
Deprecated: use Send().PrintEvents()
RunPrintEventsFull will run a transaction and print all events
func (FlowInteractionBuilder) Send ¶
func (t FlowInteractionBuilder) Send() *OverflowResult
Send a intereaction builder as a Transaction returning an overflow result
func (FlowInteractionBuilder) SignProposeAndPayAs
deprecated
func (t FlowInteractionBuilder) SignProposeAndPayAs(signer string) FlowInteractionBuilder
Deprecated: Use Tx function
SignProposeAndPayAs set the payer, proposer and envelope signer
func (FlowInteractionBuilder) SignProposeAndPayAsService
deprecated
func (t FlowInteractionBuilder) SignProposeAndPayAsService() FlowInteractionBuilder
Deprecated: Use Tx function
SignProposeAndPayAsService set the payer, proposer and envelope signer
func (FlowInteractionBuilder) Test
deprecated
func (f FlowInteractionBuilder) Test(t *testing.T) TransactionResult
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (FlowInteractionBuilder) TransactionPath
deprecated
func (t FlowInteractionBuilder) TransactionPath(path string) FlowInteractionBuilder
Deprecated: Use Tx function
type FlowScriptBuilder ¶
type FlowScriptBuilder struct { Overflow *OverflowState FileName string Arguments []cadence.Value ScriptAsString string BasePath string Error error }
FlowScriptBuilder is a struct to hold information for running a script
Deprecation: use FlowInteractionBuilder and the Script method
func (FlowScriptBuilder) Args ¶
func (t FlowScriptBuilder) Args(args *FlowArgumentsBuilder) FlowScriptBuilder
Specify arguments to send to transaction using a builder you send in
Deprecation: use FlowInteractionBuilder and the Script method
func (FlowScriptBuilder) ArgsFn ¶
func (t FlowScriptBuilder) ArgsFn(fn func(*FlowArgumentsBuilder)) FlowScriptBuilder
Specify arguments to send to transaction using a function that takes a builder where you call the builder
Deprecation: use FlowInteractionBuilder and the Script method
func (FlowScriptBuilder) ArgsV ¶
func (t FlowScriptBuilder) ArgsV(args []cadence.Value) FlowScriptBuilder
Specify arguments to send to transaction using a raw list of values
Deprecation: use FlowInteractionBuilder and the Script method
func (FlowScriptBuilder) NamedArguments ¶
func (t FlowScriptBuilder) NamedArguments(args map[string]string) FlowScriptBuilder
Deprecation: use FlowInteractionBuilder and the Script method
func (FlowScriptBuilder) Run ¶
func (t FlowScriptBuilder) Run()
Run executes a read only script Deprecation: use FlowInteractionBuilder and the Script method
func (FlowScriptBuilder) RunFailOnError ¶
func (t FlowScriptBuilder) RunFailOnError() cadence.Value
Deprecation: use FlowInteractionBuilder and the Script method
func (FlowScriptBuilder) RunMarshalAs ¶
func (t FlowScriptBuilder) RunMarshalAs(value interface{}) error
RunMarshalAs runs the script and marshals the result into the provided value, returning an error if any
Deprecation: use FlowInteractionBuilder and the Script method
func (FlowScriptBuilder) RunReturns ¶
func (t FlowScriptBuilder) RunReturns() (cadence.Value, error)
RunReturns executes a read only script
Deprecation: use FlowInteractionBuilder and the Script method
func (FlowScriptBuilder) RunReturnsInterface ¶
func (t FlowScriptBuilder) RunReturnsInterface() interface{}
RunReturnsInterface runs the script and returns interface{}
Deprecation: use FlowInteractionBuilder and the Script method
func (FlowScriptBuilder) RunReturnsJsonString ¶
func (t FlowScriptBuilder) RunReturnsJsonString() string
RunReturnsJsonString runs the script and returns pretty printed json string
Deprecation: use FlowInteractionBuilder and the Script method
func (FlowScriptBuilder) ScriptPath ¶
func (t FlowScriptBuilder) ScriptPath(path string) FlowScriptBuilder
Deprecation: use FlowInteractionBuilder and the Script method
type FormatedEvent
deprecated
type FormatedEvent struct { Name string `json:"name"` BlockHeight uint64 `json:"blockHeight,omitempty"` Time time.Time `json:"time,omitempty"` Fields map[string]interface{} `json:"fields"` }
Deprecated: Deprecated in favor of FetchEvent with builder
FormatedEvent event in a more condensed formated form
func FormatEvents ¶ added in v1.0.0
func FormatEvents(blockEvents []flow.BlockEvents, ignoreFields map[string][]string) []*FormatedEvent
FormatEvents
func NewTestEvent
deprecated
added in
v1.0.0
func NewTestEvent(name string, fields map[string]interface{}) *FormatedEvent
Deprecated: Deprecated in favor of FetchEvent with builder
func ParseEvent ¶ added in v1.0.0
func ParseEvent(event flow.Event, blockHeight uint64, time time.Time, ignoreFields []string) *FormatedEvent
ParseEvent parses a flow event into a more terse representation
func (FormatedEvent) ExistIn
deprecated
func (o FormatedEvent) ExistIn(events []*FormatedEvent) bool
Deprecated: Deprecated in favor of FetchEvent with builder
func (FormatedEvent) GetFieldAsUInt64
deprecated
func (e FormatedEvent) GetFieldAsUInt64(field string) uint64
Deprecated: Deprecated in favor of FetchEvent with builder
func (FormatedEvent) ShortName
deprecated
func (fe FormatedEvent) ShortName() string
Deprecated: Deprecated in favor of FetchEvent with builder
func (FormatedEvent) String
deprecated
func (e FormatedEvent) String() string
Deprecated: Deprecated in favor of FetchEvent with builder
String pretty print an event as a String
type InteractionOption ¶
type InteractionOption func(*FlowInteractionBuilder)
A function to customize the transaction builder
func Addresses ¶
func Addresses(name string, value ...string) InteractionOption
Send in an array of addresses as an argument
func Arg ¶
func Arg(name string, value interface{}) InteractionOption
Send an argument into a transaction
The value is treated in the given way depending on type - cadence.Value is sent as straight argument - string argument are resolved into cadence.Value using flowkit - ofther values are converted to string with %v and resolved into cadence.Value using flowkit - if the type of the paramter is Address and the string you send in is a valid account in flow.json it will resolve
func Args ¶
func Args(args ...interface{}) InteractionOption
set a list of args as key, value in an interaction, see Arg for options you can pass in
func ArgsM ¶
func ArgsM(args map[string]interface{}) InteractionOption
set arguments to the interaction from a map. See Arg for options on what you can pass in
func DateTimeArg ¶
func DateTimeArg(name string, dateString string, timezone string) InteractionOption
sending in a timestamp as an arg is quite complicated, use this method with the name of the arg, the datestring and the given timezone to parse it at
func EventFilter ¶
func EventFilter(filter OverflowEventFilter) InteractionOption
set a filter for events
func IgnoreGlobalEventFilters ¶
func IgnoreGlobalEventFilters() InteractionOption
ignore global events filters defined on OverflowState
func ProposeAsServiceAccount ¶
func ProposeAsServiceAccount() InteractionOption
set the propser to be the service account
func SignProposeAndPayAs ¶
func SignProposeAndPayAs(signer string) InteractionOption
set payer, proposer authorizer as the signer
func SignProposeAndPayAsServiceAccount ¶
func SignProposeAndPayAsServiceAccount() InteractionOption
set service account as payer, proposer, authorizer
type LogrusMessage ¶
type LogrusMessage struct { ComputationUsed int `json:"computationUsed"` Level string `json:"level"` Msg string `json:"msg"` Time time.Time `json:"time"` TxID string `json:"txID"` }
LogrusMessage a log message from the logrus implementation used in the flow emulator
type MergedSolution ¶
type MergedSolution struct {
Networks map[string]MergedSolutionNetwork `json:"networks"`
}
a type representing a merged solution that will be serialized as the json file for the npm module
type MergedSolutionNetwork ¶
type MergedSolutionNetwork struct { Scripts map[string]CodeWithSpec `json:"scripts"` Transactions map[string]CodeWithSpec `json:"transactions,omitempty"` Contracts *map[string]string `json:"contracts,omitempty"` }
a network in the merged solution
type Meter ¶
type Meter struct { LedgerInteractionUsed int `json:"ledgerInteractionUsed"` ComputationUsed int `json:"computationUsed"` MemoryUsed int `json:"memoryUsed"` ComputationIntensities MeteredComputationIntensities `json:"computationIntensities"` MemoryIntensities MeteredMemoryIntensities `json:"memoryIntensities"` }
a type representing a meter that contains information about the inner workings of an interaction, only available on local emulator
func (Meter) FunctionInvocations ¶
get the number of functions invocations
type MeteredComputationIntensities ¶
type MeteredComputationIntensities map[common.ComputationKind]uint
type collecting computatationIntensities
type MeteredMemoryIntensities ¶
type MeteredMemoryIntensities map[common.MemoryKind]uint
type collecting memoryIntensities
type OverflowBuilder ¶
type OverflowBuilder struct { Network string InMemory bool DeployContracts bool GasLimit int Path string LogLevel int InitializeAccounts bool PrependNetworkName bool ServiceSuffix string ConfigFiles []string TransactionFolderName string ScriptFolderName string FilterOutFeeEvents bool FilterOutEmptyWithDrawDepositEvents bool GlobalEventFilter OverflowEventFilter StopOnError bool PrintOptions *[]PrinterOption }
OverflowBuilder is the struct used to gather up configuration when building an overflow instance
func NewOverflow
deprecated
added in
v1.0.0
func NewOverflow() *OverflowBuilder
NewOverflow creates a new OverflowBuilder reading some confiuration from ENV var ( - OVERFLOW_ENV : sets the environment to use, valid values here are emulator|testnet|mainnet|embedded - OVERFLOW_CONTINUE : if set to `true` will not create accounts and deploy contracts even if on embeded/emulator - OVERFLOW_LOGGING : set the logging level of flowkit and overflow itself, 0 = No Log, 1 = Errors only, 2 = Debug, 3(default) = Info
Deprecated: use Overflow function with builder
func NewOverflowBuilder
deprecated
added in
v1.0.0
func NewOverflowBuilder(network string, newEmulator bool, logLevel int) *OverflowBuilder
Deprecated: use Overflow function with builder
func NewOverflowEmulator
deprecated
added in
v1.0.0
func NewOverflowEmulator() *OverflowBuilder
NewOverflowEmulator create a new client
Deprecated: use Overflow function with builder
func NewOverflowForNetwork
deprecated
added in
v1.0.0
func NewOverflowForNetwork(network string) *OverflowBuilder
NewOverflowForNetwork creates a new overflow client for the provided network
Deprecated: use Overflow function with builder
func NewOverflowInMemoryEmulator ¶ added in v1.0.0
func NewOverflowInMemoryEmulator() *OverflowBuilder
NewOverflowInMemoryEmulator this method is used to create an in memory emulator, deploy all contracts for the emulator and create all accounts Deprecated: use Overflow function with builder
func NewOverflowMainnet
deprecated
added in
v1.0.0
func NewOverflowMainnet() *OverflowBuilder
NewOverflowMainnet creates a new gwft client for mainnet
Deprecated: use Overflow function with builder
func NewOverflowTestnet
deprecated
added in
v1.0.0
func NewOverflowTestnet() *OverflowBuilder
NewOverflowTestnet creates a new overflow client for devnet/testnet
Deprecated: use Overflow function with builder
func NewTestingEmulator
deprecated
added in
v1.0.0
func NewTestingEmulator() *OverflowBuilder
NewTestingEmulator starts an embeded emulator with no log to be used most often in tests
Deprecated: use Overflow function with builder
func (*OverflowBuilder) BasePath
deprecated
added in
v1.0.0
func (o *OverflowBuilder) BasePath(path string) *OverflowBuilder
BasePath set the base path for transactions/scripts/contracts
Deprecated: use Overflow function with builder
func (*OverflowBuilder) Config
deprecated
added in
v1.0.0
func (o *OverflowBuilder) Config(files ...string) *OverflowBuilder
Config sets the file path to the flow.json config files to use
Deprecated: use Overflow function with builder
func (*OverflowBuilder) DefaultGas
deprecated
added in
v1.0.0
func (o *OverflowBuilder) DefaultGas(gas int) *OverflowBuilder
DefaultGas sets the default gas limit to use
Deprecated: use Overflow function with builder
func (*OverflowBuilder) DoNotPrependNetworkToAccountNames
deprecated
added in
v1.0.0
func (o *OverflowBuilder) DoNotPrependNetworkToAccountNames() *OverflowBuilder
DoNotPrependNetworkToAccountNames sets that network names will not be prepends to account names
Deprecated: use Overflow function with builder
func (*OverflowBuilder) ExistingEmulator
deprecated
added in
v1.0.0
func (o *OverflowBuilder) ExistingEmulator() *OverflowBuilder
ExistingEmulator this if you are using an existing emulator and you do not want to create contracts or initializeAccounts
Deprecated: use Overflow function with builder
func (*OverflowBuilder) NoneLog
deprecated
added in
v1.0.0
func (o *OverflowBuilder) NoneLog() *OverflowBuilder
NoneLog will turn of logging, making the script work well in batch jobs
Deprecated: use Overflow function with builder
func (*OverflowBuilder) SetServiceSuffix
deprecated
added in
v1.0.0
func (o *OverflowBuilder) SetServiceSuffix(suffix string) *OverflowBuilder
SetServiceSuffix will set the suffix to use for the service account. The default is `account`
Deprecated: use Overflow function with builder
func (*OverflowBuilder) Start
deprecated
added in
v1.0.0
func (ob *OverflowBuilder) Start() *OverflowState
Start will start the overflow builder and return OverflowState, will panic if there are errors
Deprecated: use Overflow function with builder
func (*OverflowBuilder) StartE
deprecated
func (o *OverflowBuilder) StartE() (*OverflowState, error)
StartE will start Overflow and return State and error if any
Deprecated: use Overflow function with builder
type OverflowEvent ¶
type OverflowEvent map[string]interface{}
a type representing the terse output of an raw Flow Event
func (OverflowEvent) ExistIn ¶
func (o OverflowEvent) ExistIn(events []OverflowEvent) bool
Check if an event exist in the other events
type OverflowEventFilter ¶
Event parsing
a type alias to an OverflowEventFilter to filter out all events with a given suffix and the fields with given suffixes
type OverflowEvents ¶
type OverflowEvents map[string][]OverflowEvent
a type holding all events that are emitted from a Transaction
func (OverflowEvents) FilterEvents ¶
func (overflowEvents OverflowEvents) FilterEvents(ignoreFields OverflowEventFilter) OverflowEvents
Filter out events given the sent in filter
func (OverflowEvents) FilterFees ¶
func (overflowEvents OverflowEvents) FilterFees(fee float64) OverflowEvents
Filtter out fee events
func (OverflowEvents) FilterTempWithdrawDeposit ¶
func (overflowEvents OverflowEvents) FilterTempWithdrawDeposit() OverflowEvents
Filter out temp withdraw deposit events
type OverflowOption ¶
type OverflowOption func(*OverflowBuilder)
OverflowOption and option function that you can send in to configure Overflow
func DoNotPrependNetworkToAccountNames ¶
func DoNotPrependNetworkToAccountNames() OverflowOption
DoNotPrependNetworkToAccountNames will not prepend the name of the network to account names
func PrintInteractionResults ¶
func PrintInteractionResults(opts ...PrinterOption) OverflowOption
automatically print interactions using the following options
func StopOnError ¶
func StopOnError() OverflowOption
If this option is used a panic will be called if an error occurs after an interaction is run
func WithBasePath ¶
func WithBasePath(path string) OverflowOption
WithBasePath will change the standard basepath `.` to another folder
func WithEmptyDepoitWithdrawEvents ¶
func WithEmptyDepoitWithdrawEvents() OverflowOption
filter out empty deposit and withdraw events
func WithExistingEmulator ¶
func WithExistingEmulator() OverflowOption
WithExistingEmulator will attach to an existing emulator, not deploying contracts and creating accounts
func WithFeesEvents ¶
func WithFeesEvents() OverflowOption
WithTransactionFolderName will overwite the default script subdir for transactions `transactions`
func WithFlowConfig ¶
func WithFlowConfig(files ...string) OverflowOption
WithFlowConfig will set the path to one or more flow.json config files The default is ~/flow.json and ./flow.json.
func WithGas ¶
func WithGas(gas int) OverflowOption
WithGas set the default gas limit, standard is 9999 (max)
func WithGlobalEventFilter ¶
func WithGlobalEventFilter(filter OverflowEventFilter) OverflowOption
set global filters to events
func WithInMemory ¶
func WithInMemory() OverflowOption
WithInMemory will set that this instance is an in memoy instance createing accounts/deploying contracts
func WithNetwork ¶
func WithNetwork(network string) OverflowOption
WithNetwork will start overflow with the given network. This function will also set up other options that are common for a given Network.
embedded: starts in memory, will deploy contracts and create accounts, info log testing: starts in memory, will deploy contracts and create accounts, no log testnet|mainnet: will only set network, not deploy contracts or create accounts
func WithScriptFolderName ¶
func WithScriptFolderName(name string) OverflowOption
WithScriptFolderName will overwite the default script subdir for scripts `scripts`
func WithServiceAccountSuffix ¶
func WithServiceAccountSuffix(suffix string) OverflowOption
WithServiceAccountSuffix will set the suffix of the service account
func WithTransactionFolderName ¶
func WithTransactionFolderName(name string) OverflowOption
WithTransactionFolderName will overwite the default script subdir for transactions `transactions`
type OverflowPastEvent ¶
type OverflowPastEvent struct { Name string `json:"name"` BlockHeight uint64 `json:"blockHeight,omitempty"` Time time.Time `json:"time,omitempty"` Fields OverflowEvent `json:"fields"` }
a type to represent an event that we get from FetchEvents
func (OverflowPastEvent) GetFieldAsUInt64 ¶
func (e OverflowPastEvent) GetFieldAsUInt64(field string) uint64
get the given field as an uint64
func (OverflowPastEvent) String ¶
func (e OverflowPastEvent) String() string
String pretty print an event as a String
type OverflowResult ¶
type OverflowResult struct { StopOnError bool //The error if any Err error //The id of the transaction Id flow.Identifier //If running on an emulator //the meter that contains useful debug information on memory and interactions Meter *Meter //The Raw log from the emulator RawLog []LogrusMessage // The log from the emulator EmulatorLog []string //The computation used ComputationUsed int //The raw unfiltered events RawEvents []flow.Event //Events that are filtered and parsed into a terse format Events OverflowEvents //The underlying transaction if we need to look into that Transaction *flow.Transaction //TODO: consider marshalling this as a struct for convenience //The fee event if any Fee map[string]interface{} //The name of the Transaction Name string }
OverflowResult represents the state after running an transaction
func (OverflowResult) AssertComputationLessThenOrEqual ¶
func (o OverflowResult) AssertComputationLessThenOrEqual(t *testing.T, computation int) OverflowResult
Assert that this transaction did not use more then the given amount of computation
func (OverflowResult) AssertComputationUsed ¶
func (o OverflowResult) AssertComputationUsed(t *testing.T, computation int) OverflowResult
Assert that the transaction uses exactly the given computation amount
func (OverflowResult) AssertDebugLog ¶
func (o OverflowResult) AssertDebugLog(t *testing.T, message ...string) OverflowResult
Assert that a Debug.Log event was emitted that contains the given messages
func (OverflowResult) AssertEmitEventName ¶
func (o OverflowResult) AssertEmitEventName(t *testing.T, event ...string) OverflowResult
Assert that events with the given suffixes are present
func (OverflowResult) AssertEmulatorLog ¶
func (o OverflowResult) AssertEmulatorLog(t *testing.T, message string) OverflowResult
Assert that the internal log of the emulator contains the given message
func (OverflowResult) AssertEvent ¶
func (o OverflowResult) AssertEvent(t *testing.T, name string, fields OverflowEvent) OverflowResult
Assert that the event with the given name suffix and fields are present
func (OverflowResult) AssertEventCount ¶
func (o OverflowResult) AssertEventCount(t *testing.T, number int) OverflowResult
Assert that the transaction result contains the amount of events
func (OverflowResult) AssertFailure ¶
func (o OverflowResult) AssertFailure(t *testing.T, msg string) OverflowResult
Assert that this particular transaction was a failure that has a message that contains the sendt in assertion
func (OverflowResult) AssertNoEvents ¶
func (o OverflowResult) AssertNoEvents(t *testing.T) OverflowResult
Assert that this transaction emitted no events
func (OverflowResult) AssertSuccess ¶
func (o OverflowResult) AssertSuccess(t *testing.T) OverflowResult
Assert that this transation was an success
func (OverflowResult) GetEventsWithName ¶
func (o OverflowResult) GetEventsWithName(eventName string) []OverflowEvent
Get all events that end with the given suffix
func (OverflowResult) GetIdFromEvent ¶
func (o OverflowResult) GetIdFromEvent(eventName string, fieldName string) (uint64, error)
Get a uint64 field with the given fieldname(most often an id) from an event with a given suffix
func (OverflowResult) GetIdsFromEvent ¶
func (o OverflowResult) GetIdsFromEvent(eventName string, fieldName string) []uint64
func (OverflowResult) Print ¶
func (o OverflowResult) Print(opts ...PrinterOption) OverflowResult
print out an result
type OverflowScriptResult ¶
type OverflowScriptResult struct { Err error Result cadence.Value Input *FlowInteractionBuilder Log []LogrusMessage Output interface{} }
result after running a script
func (*OverflowScriptResult) AssertLengthWithPointer ¶
func (osr *OverflowScriptResult) AssertLengthWithPointer(t *testing.T, pointer string, length int) *OverflowScriptResult
Assert that the length of a jsonPointer is equal to length
func (*OverflowScriptResult) AssertWant ¶
func (osr *OverflowScriptResult) AssertWant(t *testing.T, want autogold.Value) *OverflowScriptResult
Assert that the result is equal to the given autogold.Want
func (*OverflowScriptResult) AssertWithPointer ¶
func (osr *OverflowScriptResult) AssertWithPointer(t *testing.T, pointer string, value interface{}) *OverflowScriptResult
Assert that a jsonPointer into the result is equal to the given value
func (*OverflowScriptResult) AssertWithPointerError ¶
func (osr *OverflowScriptResult) AssertWithPointerError(t *testing.T, pointer string, message string) *OverflowScriptResult
Assert that a jsonPointer into the result is an error
func (*OverflowScriptResult) AssertWithPointerWant ¶
func (osr *OverflowScriptResult) AssertWithPointerWant(t *testing.T, pointer string, want autogold.Value) *OverflowScriptResult
Assert that a jsonPointer into the result is equal to the given autogold Want
func (*OverflowScriptResult) GetAsInterface ¶
func (osr *OverflowScriptResult) GetAsInterface() (interface{}, error)
get the script as interface{}
func (*OverflowScriptResult) GetAsJson ¶
func (osr *OverflowScriptResult) GetAsJson() (string, error)
get the script as json
func (*OverflowScriptResult) GetWithPointer ¶
func (osr *OverflowScriptResult) GetWithPointer(pointer string) (interface{}, error)
get the given jsonPointer as interface{}
func (*OverflowScriptResult) MarshalAs ¶
func (osr *OverflowScriptResult) MarshalAs(marshalTo interface{}) error
Marshal the script output as the given sent in type
func (*OverflowScriptResult) MarshalPointerAs ¶
func (osr *OverflowScriptResult) MarshalPointerAs(pointer string, marshalTo interface{}) error
Marshal the given jsonPointer as the given type
type OverflowState ¶
type OverflowState struct { //State is the current state of the configured overflow instance State *flowkit.State //the services from flowkit to performed operations on Services *services.Services //Configured variables that are taken from the builder since we need them in the execution of overflow later on Network string PrependNetworkToAccountNames bool ServiceAccountSuffix string Gas int //flowkit, emulator and emulator debug log uses three different logging technologies so we have them all stored here //this flowkit Logger can go away when we can remove deprecations! Logger output.Logger Log *bytes.Buffer //https://github.com/bjartek/overflow/issues/45 //This is not populated with anything yet since the emulator version that has this change is not in mainline yet EmulatorLog *bytes.Buffer //If there was an error starting overflow it is stored here Error error //Paths that points to where .cdc files are stored and the posibilty to specify something besides the standard `transactions`/`scripts`subdirectories BasePath string TransactionBasePath string ScriptBasePath string //Filters to events to remove uneeded noise FilterOutFeeEvents bool FilterOutEmptyWithDrawDepositEvents bool GlobalEventFilter OverflowEventFilter //Signal to overflow that if there is an error after running a single interaction we should panic StopOnError bool //Signal to overflow that if this is not nil we should print events on interaction completion PrintOptions *[]PrinterOption }
OverflowState contains information about how to Overflow is confitured and the current runnig state
func Overflow ¶
func Overflow(opts ...OverflowOption) *OverflowState
Overflow will start an Overflow instance that panics if there are initialization errors
Will read the following ENV vars as default: OVERFLOW_ENV : set to "mainnet|testnet|emulator|embedded", default embedded OVERFLOW_LOGGING: set from 0-3 to get increasing amount of log output, default 3 OVERFLOW_CONTINUE: to continue this overflow on an already running emulator., default false
Starting overflow without env vars will make it start in embedded mode deploying all contracts creating accounts ¶
You can then chose to override this setting with the builder methods example
Overflow(WithNetwork("mainnet"))
Setting the network in this way will reset other builder methods if appropriate so use with care.
func OverflowE ¶
func OverflowE(opts ...OverflowOption) (*OverflowState, error)
OverfloewE will start overflow and return state or an error if there is one
See Overflow doc comment for an better docs
func OverflowTesting ¶
func OverflowTesting(opts ...OverflowOption) (*OverflowState, error)
OverflowTesting starts an overflow emulator that is suitable for testing that will print no logs to stdout
func (*OverflowState) AccountE ¶
func (f *OverflowState) AccountE(key string) (*flowkit.Account, error)
AccountE fetch an account from State Note that if `PrependNetworkToAccountNames` is specified it is prefixed with the network so that you can use the same logical name accross networks
func (*OverflowState) Arguments
deprecated
added in
v1.0.0
func (f *OverflowState) Arguments() *FlowArgumentsBuilder
Deprecated: This builder and all its methods are deprecated. Use the new Tx/Script methods and its argument method
func (*OverflowState) BuildInteraction ¶
func (o *OverflowState) BuildInteraction(filename string, interactionType string, opts ...InteractionOption) *FlowInteractionBuilder
create a flowInteractionBuilder from the sent in options
func (*OverflowState) CreateAccountsE ¶
func (f *OverflowState) CreateAccountsE() (*OverflowState, error)
CreateAccountsE ensures that all accounts present in the deployment block for the given network is present
func (*OverflowState) DownloadAndUploadFile ¶
func (o *OverflowState) DownloadAndUploadFile(url string, accountName string) error
DownloadAndUploadFile reads a file, base64 encodes it and chunk upload to /storage/upload
func (*OverflowState) DownloadImageAndUploadAsDataUrl ¶
func (o *OverflowState) DownloadImageAndUploadAsDataUrl(url, accountName string) error
DownloadImageAndUploadAsDataUrl download an image and upload as data url
func (*OverflowState) EventFetcher
deprecated
added in
v1.0.0
func (o *OverflowState) EventFetcher() EventFetcherBuilder
Deprecated: Deprecated in favor of FetchEvent with builder
EventFetcher create an event fetcher builder.
func (*OverflowState) FetchEvents ¶
func (o *OverflowState) FetchEvents(opts ...EventFetcherOption) ([]OverflowPastEvent, error)
FetchEvents using the given options
func (*OverflowState) FillUpStorage ¶
func (o *OverflowState) FillUpStorage(accountName string) *OverflowState
A method to fill up a users storage, useful when testing
func (*OverflowState) GetAccount ¶
func (f *OverflowState) GetAccount(key string) (*flow.Account, error)
GetAccount takes the account name and returns the state of that account on the given network.
func (*OverflowState) GetBlockAtHeight ¶
func (f *OverflowState) GetBlockAtHeight(height uint64) (*flow.Block, error)
get block at a given height
func (*OverflowState) GetBlockById ¶
func (f *OverflowState) GetBlockById(blockId string) (*flow.Block, error)
blockId should be a hexadecimal string
func (*OverflowState) GetFreeCapacity ¶
func (o *OverflowState) GetFreeCapacity(accountName string) int
Get the free capacity in an account
func (*OverflowState) GetLatestBlock ¶
func (f *OverflowState) GetLatestBlock() (*flow.Block, error)
get the latest block
func (*OverflowState) InitializeContracts ¶
func (o *OverflowState) InitializeContracts() *OverflowState
InitializeContracts installs all contracts in the deployment block for the configured network
func (*OverflowState) InlineScript ¶ added in v1.0.0
func (o *OverflowState) InlineScript(content string) FlowScriptBuilder
Script start a script builder with the inline script as body
Deprecation: use FlowInteractionBuilder and the Script method
func (*OverflowState) ParseAll ¶
func (o *OverflowState) ParseAll() (*Solution, error)
Parse the given overflow state into a solution/npm-module
func (*OverflowState) ParseAllWithConfig ¶
func (o *OverflowState) ParseAllWithConfig(skipContracts bool, txSkip []string, scriptSkip []string) (*Solution, error)
Parse the gieven overflow state with filters
func (*OverflowState) ParseArgumentsWithoutType
deprecated
added in
v1.0.0
func (*OverflowState) Script ¶
func (o *OverflowState) Script(filename string, opts ...InteractionOption) *OverflowScriptResult
run a script with the given code/filanem an options
func (*OverflowState) ScriptFN ¶
func (o *OverflowState) ScriptFN(outerOpts ...InteractionOption) ScriptFunction
compose interactionOptions into a new Script function
func (*OverflowState) ScriptFileNameFN ¶
func (o *OverflowState) ScriptFileNameFN(filename string, outerOpts ...InteractionOption) ScriptOptsFunction
compose fileName and interactionOptions into a new Script function
func (*OverflowState) ScriptFromFile ¶ added in v1.0.0
func (o *OverflowState) ScriptFromFile(filename string) FlowScriptBuilder
ScriptFromFile will start a flow script builder
Deprecation: use FlowInteractionBuilder and the Script method
func (*OverflowState) ServiceAccountName ¶
func (o *OverflowState) ServiceAccountName() string
ServiceAccountName return the name of the current service account Note that if `PrependNetworkToAccountNames` is specified it is prefixed with the network so that you can use the same logical name accross networks
func (*OverflowState) SignUserMessage ¶
func (f *OverflowState) SignUserMessage(account string, message string) (string, error)
Sign a user message
func (*OverflowState) SimpleTxArgs
deprecated
added in
v1.0.0
func (o *OverflowState) SimpleTxArgs(filename string, signer string, args *FlowArgumentsBuilder)
Deprecated: Use Tx()
func (*OverflowState) Transaction
deprecated
added in
v1.0.0
func (o *OverflowState) Transaction(content string) FlowInteractionBuilder
Deprecated: Use Tx()
Transaction will start a flow transaction builder using the inline transaction
func (*OverflowState) TransactionFromFile
deprecated
added in
v1.0.0
func (o *OverflowState) TransactionFromFile(filename string) FlowInteractionBuilder
Deprecated: Use Tx()
TransactionFromFile will start a flow transaction builder
func (*OverflowState) Tx ¶
func (o *OverflowState) Tx(filename string, opts ...InteractionOption) *OverflowResult
The main function for running an transasction in overflow
func (*OverflowState) TxFN ¶
func (o *OverflowState) TxFN(outerOpts ...InteractionOption) TransactionFunction
If you store this in a struct and add arguments to it it will not reset between calls
func (*OverflowState) TxFileNameFN ¶
func (o *OverflowState) TxFileNameFN(filename string, outerOpts ...InteractionOption) TransactionOptsFunction
func (*OverflowState) UploadFile ¶
func (o *OverflowState) UploadFile(filename string, accountName string) error
UploadFile reads a file, base64 encodes it and chunk upload to /storage/upload
func (*OverflowState) UploadImageAsDataUrl ¶
func (o *OverflowState) UploadImageAsDataUrl(filename string, accountName string) error
UploadImageAsDataUrl will upload a image file from the filesystem into /storage/upload of the given account
func (*OverflowState) UploadString ¶
func (o *OverflowState) UploadString(content string, accountName string) error
UploadString will upload the given string data in 1mb chunkts to /storage/upload of the given account
type PrinterBuilder ¶
type PrinterBuilder struct { Events bool EventFilter OverflowEventFilter Meter int EmulatorLog bool }
a type representing the accuumlated state in the builder
the default setting is to print one line for each transaction with meter and all events
type PrinterOption ¶
type PrinterOption func(*PrinterBuilder)
a type represneting seting an option in the printer builder
type ScriptFunction ¶
type ScriptFunction func(filename string, opts ...InteractionOption) *OverflowScriptResult
a type used for composing scripts
type ScriptOptsFunction ¶
type ScriptOptsFunction func(opts ...InteractionOption) *OverflowScriptResult
a type used for composing scripts
type Solution ¶
type Solution struct { //all transactions with name and what paremters they have Transactions map[string]*DeclarationInfo `json:"transactions"` //all scripts with name and paramters they have Scripts map[string]*DeclarationInfo `json:"scripts"` //all networks with associated scripts/tranasctions/contracts preresolved Networks map[string]*SolutionNetwork `json:"networks"` //warnings accumulated during parsing Warnings []string `json:"warnings"` }
a type representing the raw solutions that contains all transactions, scripts, networks and warnings of any
func (*Solution) MergeSpecAndCode ¶
func (s *Solution) MergeSpecAndCode() *MergedSolution
merge the given Solution into a MergedSolution that is suited for exposing as an NPM module
type SolutionNetwork ¶
type SolutionNetwork struct { Scripts map[string]string `json:"scripts"` Transactions map[string]string `json:"transactions,omitempty"` Contracts *map[string]string `json:"contracts,omitempty"` }
a type representing one network in a solution, so mainnet/testnet/emulator
type TransactionFunction ¶
type TransactionFunction func(filename string, opts ...InteractionOption) *OverflowResult
a type to define a function used to compose Transaction interactions
type TransactionOptsFunction ¶
type TransactionOptsFunction func(opts ...InteractionOption) *OverflowResult
a type to define a function used to compose Transaction interactions
type TransactionResult
deprecated
type TransactionResult struct { Err error Events []*FormatedEvent Result *OverflowResult Testing *testing.T }
TransactionResult
The old result object from an transaction ¶
Deprecated: use the new Tx() method and OverflowResult
func (TransactionResult) AssertComputationLessThenOrEqual
deprecated
func (t TransactionResult) AssertComputationLessThenOrEqual(computation int) TransactionResult
Deprecated: use the new Tx() method and Asserts on the result
func (TransactionResult) AssertComputationUsed
deprecated
func (t TransactionResult) AssertComputationUsed(computation int) TransactionResult
Deprecated: use the new Tx() method and Asserts on the result
func (TransactionResult) AssertDebugLog
deprecated
func (t TransactionResult) AssertDebugLog(message ...string) TransactionResult
Deprecated: use the new Tx() method and Asserts on the result
func (TransactionResult) AssertEmitEvent
deprecated
func (t TransactionResult) AssertEmitEvent(event ...*FormatedEvent) TransactionResult
Deprecated: use the new Tx() method and Asserts on the result
func (TransactionResult) AssertEmitEventJson
deprecated
func (t TransactionResult) AssertEmitEventJson(event ...string) TransactionResult
Deprecated: use the new Tx() method and Asserts on the result
func (TransactionResult) AssertEmitEventName
deprecated
func (t TransactionResult) AssertEmitEventName(event ...string) TransactionResult
Deprecated: use the new Tx() method and Asserts on the result
func (TransactionResult) AssertEmitEventNameShortForm
deprecated
func (t TransactionResult) AssertEmitEventNameShortForm(event ...string) TransactionResult
Deprecated: use the new Tx() method and Asserts on the result
func (TransactionResult) AssertEmulatorLog
deprecated
func (t TransactionResult) AssertEmulatorLog(message string) TransactionResult
Deprecated: use the new Tx() method and Asserts on the result
func (TransactionResult) AssertEventCount
deprecated
func (t TransactionResult) AssertEventCount(number int) TransactionResult
Deprecated: use the new Tx() method and Asserts on the result
func (TransactionResult) AssertFailure
deprecated
func (t TransactionResult) AssertFailure(msg string) TransactionResult
Deprecated: use the new Tx() method and Asserts on the result
func (TransactionResult) AssertNoEvents
deprecated
func (t TransactionResult) AssertNoEvents() TransactionResult
Deprecated: use the new Tx() method and Asserts on the result
func (TransactionResult) AssertPartialEvent
deprecated
func (t TransactionResult) AssertPartialEvent(expected *FormatedEvent) TransactionResult
Deprecated: use the new Tx() method and Asserts on the result
func (TransactionResult) AssertSuccess
deprecated
func (t TransactionResult) AssertSuccess() TransactionResult
Deprecated: use the new Tx() method and Asserts on the result
func (TransactionResult) GetIdFromEvent ¶
func (t TransactionResult) GetIdFromEvent(eventName string, fieldName string) uint64
Deprecated use the new Tx() method and Asserts on the result