scripts

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator struct {
	// contains filtered or unexported fields
}

Generator dynamically generates Cadence scripts from templates.

func NewGenerator

func NewGenerator(params dps.Params) *Generator

NewGenerator returns a Generator using the given parameters.

func (*Generator) GetBalance

func (g *Generator) GetBalance(symbol string) ([]byte, error)

GetBalance generates a Cadence script to retrieve the balance of an account.

func (*Generator) TokensDeposited

func (g *Generator) TokensDeposited(symbol string) (string, error)

TokensDeposited generates a Cadence script that matches the Flow event for tokens being deposited.

func (*Generator) TokensWithdrawn

func (g *Generator) TokensWithdrawn(symbol string) (string, error)

TokensWithdrawn generates a Cadence script that matches the Flow event for tokens being withdrawn.

func (*Generator) TransferTokens

func (g *Generator) TransferTokens(symbol string) ([]byte, error)

TransferTokens generates a Cadence script to operate a token transfer transaction.

Jump to

Keyboard shortcuts

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