deals

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2020 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeCoop   = "coop"
	TypeUncoop = "uncoop"
)

Deal types.

Variables

This section is empty.

Functions

func Make

func Make(back eth.Backend, agents, clients []Account, deals []Deal)

Make makes and closes deals.

func TransferToPSC

func TransferToPSC(back eth.Backend, acc Account) error

TransferToPSC transfers all PTC to PSC.

Types

type Account

type Account struct {
	EthAddr    data.HexString
	PrivateKey data.HexString
}

Account is an ethereum account

func CreateAccounts

func CreateAccounts(n int) ([]Account, error)

CreateAccounts just creates accounts.

type Deal

type Deal struct {
	Agent      int     `json:"agent"`
	Client     int     `json:"client"`
	PrixClosed float64 `json:"prixClosed"`
	Type       string  `json:"type"`
}

Deal is a detailed deals closed over blockchain between given angent and client.

Jump to

Keyboard shortcuts

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