liquidity

package
v0.0.0-...-086ef7a Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// The Smart Contract defines currency as [3]byte.
	// But here, for simplicity we ware using string (encoding)
	CurrUSD = Currency("USD")
	CurrETH = Currency("ETH")
	CurrBTC = Currency("BTC")
)

currencies

View Source
var (
	BRGusdABI = ethereum.MustParseABI("BRGusd", contracts.BridgeTokenABI)
)

globals

Functions

func LogBRGusdTransfer

func LogBRGusdTransfer() abi.Event

LogBRGusdTransfer returns event

Types

type Currency

type Currency string

Currency type represent currency ISO name

func ParseCurrency

func ParseCurrency(curr string) (Currency, errstack.E)

ParseCurrency converts currency string into Currency type

func ParseCurrencyErrp

func ParseCurrencyErrp(curr string, errp errstack.Putter) Currency

ParseCurrencyErrp converts currency string into Currency type

func (Currency) Bytes

func (curr Currency) Bytes() [3]byte

Bytes converts Currency to bytes array which is expected by the SmartContract

func (Currency) MarshalJSON

func (curr Currency) MarshalJSON() ([]byte, error)

MarshalJSON implements Marshaller interface

func (*Currency) Scan

func (curr *Currency) Scan(src interface{}) error

Scan implements sql.Sanner interface

func (*Currency) UnmarshalJSON

func (curr *Currency) UnmarshalJSON(data []byte) (err error)

UnmarshalJSON implements Unmarshaller interface

func (Currency) Value

func (curr Currency) Value() (driver.Value, error)

Value implements sql/driver.Valuer

type EventTokenTransfer

type EventTokenTransfer struct {
	From  common.Address
	To    common.Address
	Value *big.Int
}

EventTokenTransfer represents Transfer event payload

func (*EventTokenTransfer) Unmarshal

func (e *EventTokenTransfer) Unmarshal(log *types.Log) errstack.E

Unmarshal blockchain log into the event structure

Jump to

Keyboard shortcuts

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