relayer

package
v1.0.0-beta Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2019 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKeyStore

func GetKeyStore() (string, *strings.Reader)

GetKeyStore return passparser and keystore reader

func GetKeyStoreReader

func GetKeyStoreReader() *strings.Reader

GetKeyStoreReader return reader for keystore

Types

type Blockchain

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

Blockchain struct

func NewBlockchain

func NewBlockchain(client *rpc.Client,
	ethclient *ethclient.Client,
	signer *Signer) *Blockchain

NewBlockchain init

func (*Blockchain) GetRelayer

func (b *Blockchain) GetRelayer(coinAddress common.Address, contractAddress common.Address) (*RInfo, error)

GetRelayer return all tokens in smart contract

func (*Blockchain) GetTokenInfo

func (b *Blockchain) GetTokenInfo(token common.Address, abi *abi.ABI) (*TokenInfo, error)

GetTokenInfo return token info

func (*Blockchain) GetTokenInfoEx

func (b *Blockchain) GetTokenInfoEx(token common.Address, abiPath string) (*TokenInfo, error)

GetTokenInfoEx return token info

func (*Blockchain) RunContract

func (b *Blockchain) RunContract(contractAddr common.Address, abi *abi.ABI, method string, args ...interface{}) (interface{}, error)

RunContract run smart contract

type PairToken

type PairToken struct {
	BaseToken  common.Address
	QuoteToken common.Address
}

PairToken pare token

type RInfo

type RInfo struct {
	Tokens  map[common.Address]*TokenInfo
	Pairs   []*PairToken
	MakeFee uint16
	TakeFee uint16
}

RInfo struct

type Relayer

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

Relayer get token

func NewRelayer

func NewRelayer(rpcURL string,
	coinBase common.Address,
	relayerAddress common.Address) *Relayer

NewRelayer init relayer

func (*Relayer) GetRelayer

func (r *Relayer) GetRelayer() (*RInfo, error)

GetRelayer get relayer information

type Signer

type Signer struct {
	Keystore   string `json:"keystore_path"`
	Passphrase string `json:"passphrase"`
	// contains filtered or unexported fields
}

func NewSigner

func NewSigner() *Signer

func NewSignerFile

func NewSignerFile(file string, fileLocation string) *Signer

func (*Signer) GetAddress

func (self *Signer) GetAddress() ethereum.Address

func (*Signer) GetTransactOpts

func (self *Signer) GetTransactOpts() *bind.TransactOpts

func (*Signer) Sign

func (self *Signer) Sign(tx *types.Transaction) (*types.Transaction, error)

type TokenInfo

type TokenInfo struct {
	Name     string
	Symbol   string
	Decimals uint8
	// contains filtered or unexported fields
}

TokenInfo token info

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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