ethereum

package
v0.0.0-...-213c9da Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Conf = &com.EthereumConfig{
	NetworkID:   com.RopstenNetworkId,
	EthApiUrl:   "https://ropsten.infura.io/v3/f3245cef90ed440897e43efc6b3dd0f7",
	MicroPaySys: common.HexToAddress("0x2af669877aFe2fe2aF750b4d7dCa8aE19501b054"),
	Token:       common.HexToAddress("0x3adc98d5e292355e59ae2ca169d241d889b092e3"),
}

Functions

func AllMinersOfPool

func AllMinersOfPool(pool common.Address) [][32]byte

func AllPoosInMarket

func AllPoosInMarket() (map[common.Address]*eth.PoolData, error)

func ApproveToSpend

func ApproveToSpend(tokenNo *big.Int, key *ecdsa.PrivateKey) (string, error)

func BuyPacket

func BuyPacket(userAddr, poolAddr string, tokenNo *big.Int, key *ecdsa.PrivateKey) (string, error)

func ConvertByDecimal

func ConvertByDecimal(val *big.Int) float64

func ConvertByFloat

func ConvertByFloat(val float64) *big.Int

func EthUserData

func EthUserData(user, pool common.Address) (*eth.UserData, error)

func MinerDetails

func MinerDetails(subAddr [32]byte) *eth.MinerData

func MinerSize

func MinerSize(pool common.Address) int

func MinersByIndex

func MinersByIndex(pool common.Address, start, end int64) [][32]byte

func QueryApproved

func QueryApproved(address common.Address) *big.Int

func SubscribedPools

func SubscribedPools(user common.Address) ([]common.Address, error)

func SyncSystemSetting

func SyncSystemSetting() (*eth.SysSetting, error)

func TokenBalance

func TokenBalance(address string) (*big.Int, *big.Int, *big.Int)

func TransferEth

func TransferEth(target string, tokenNo float64, privateKey *ecdsa.PrivateKey) (string, error)

func TransferLinToken

func TransferLinToken(target string, tokenNo float64, key *ecdsa.PrivateKey) (string, error)

func TxStatus

func TxStatus(tx common.Hash) bool

func VersionManager

func VersionManager() (*eth.Versions, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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