trader

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SeroConfig

type SeroConfig struct {
	Rpc string

	From     string
	Refund   string
	Gas      *big.Int
	GasPrice *big.Int
}

type Trader

type Trader struct {
	Rpc      string
	From     string
	Refund   string
	Gas      *big.Int
	GasPrice *big.Int
	// contains filtered or unexported fields
}

func NewTrader

func NewTrader(cfg SeroConfig) (t *Trader, err error)

func (*Trader) BulkTransfer

func (t *Trader) BulkTransfer(ctx context.Context, records [][]string)

func (Trader) CheckTx

func (t Trader) CheckTx(ctx context.Context, txHash string) (blockNumber uint64, err error)

func (Trader) ClearUsedFlag

func (t Trader) ClearUsedFlag(ctx context.Context) error

func (*Trader) Close

func (t *Trader) Close()

func (Trader) GenTx

func (t Trader) GenTx(ctx context.Context, to string, currency string, amount *big.Int) (gtx txtool.GTx, err error)

func (Trader) GetBalance

func (t Trader) GetBalance(ctx context.Context) (balance *big.Int, err error)

func (Trader) GetBlockNumber

func (t Trader) GetBlockNumber(ctx context.Context) (blockNumber uint64, err error)
curl -X POST 'http://47.92.64.129:8545' -H 'Content-Type:application/json' -d '{
   "id": 0,
   "jsonrpc": "2.0",
   "method": "sero_blockNumber",
   "params": []
}'

{"jsonrpc":"2.0","id":0,"result":"0x302a"}

func (Trader) GetMaxAvailable

func (t Trader) GetMaxAvailable(ctx context.Context) (balance *big.Int, err error)

Jump to

Keyboard shortcuts

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