Documentation ¶
Index ¶
- func GetClient(addr string, network ctypes.ChainNetwork, k keys.KeyManager) sdk.DexClient
- type Binance
- func (b Binance) CreateMsg(from btypes.AccAddress, fromCoins btypes.Coins, transfers []msg.Transfer) msg.SendMsg
- func (b Binance) Input(addr btypes.AccAddress, coins btypes.Coins) msg.Input
- func (b Binance) MsgToSend(in []msg.Input, out []msg.Output) msg.SendMsg
- func (b Binance) Output(addr btypes.AccAddress, coins btypes.Coins) msg.Output
- func (b Binance) ParseTx(key keys.KeyManager, transfers []msg.Transfer) msg.SendMsg
- func (b Binance) SendTxn(key keys.KeyManager, payload []msg.Transfer, memo string)
- type Config
- type Network
- type Smoke
- func (s *Smoke) ActorAmount(amount int64, output *types.Balance, actor string)
- func (s *Smoke) BinanceState(tx int)
- func (s *Smoke) ClientKey() (sdk.DexClient, keys.KeyManager)
- func (s *Smoke) GetBinance(client sdk.DexClient, address ctypes.AccAddress) []ctypes.TokenBalance
- func (s *Smoke) GetClient(k keys.KeyManager) sdk.DexClient
- func (s *Smoke) GetStatechain() types.StatechainPools
- func (s *Smoke) LogResults(tx int, delay time.Duration)
- func (s *Smoke) Run()
- func (s *Smoke) SaveLog()
- func (s *Smoke) SendTxn(client sdk.DexClient, key keys.KeyManager, payload []msg.Transfer, memo string)
- func (s *Smoke) Setup()
- func (s *Smoke) StatechainState(tx int)
- func (s *Smoke) Summary()
- func (s *Smoke) Sweep()
- type Statechain
- type Sweep
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClient ¶
func GetClient(addr string, network ctypes.ChainNetwork, k keys.KeyManager) sdk.DexClient
Get Client, retry if we fail to get it (ie API Rate limited)
Types ¶
type Binance ¶
type Binance struct {
// contains filtered or unexported fields
}
func NewBinance ¶
NewBinance : new instnance of Binance.
func (Binance) CreateMsg ¶
func (b Binance) CreateMsg(from btypes.AccAddress, fromCoins btypes.Coins, transfers []msg.Transfer) msg.SendMsg
CreateMsg : Create a new message to broadcast to Binance.
type Network ¶
type Network struct { Type ctypes.ChainNetwork ChainID string }
Network is the different between testnet and mainNet
func NewNetwork ¶
type Smoke ¶
type Smoke struct { Config Config ApiAddr string Network ctypes.ChainNetwork FaucetKey string PoolKey string Binance Binance Statechain Statechain Tests types.Tests Results []types.Output }
Smoke : test instructions.
func NewSmoke ¶
func NewSmoke(apiAddr, faucetKey, poolKey, env string, config string, network int, logFile string, debug bool) Smoke
NewSmoke : create a new Smoke instance.
func (*Smoke) ActorAmount ¶
ActorAmount : Amount for a given actor
func (*Smoke) BinanceState ¶
BinanceState : Compare expected vs actual Binance wallet values.
func (*Smoke) ClientKey ¶
func (s *Smoke) ClientKey() (sdk.DexClient, keys.KeyManager)
ClientKey : instantiate Client and Keys Binance SDK objects.
func (*Smoke) GetBinance ¶
func (s *Smoke) GetBinance(client sdk.DexClient, address ctypes.AccAddress) []ctypes.TokenBalance
GetBinance : Get Binance account balance.
func (*Smoke) GetClient ¶
func (s *Smoke) GetClient(k keys.KeyManager) sdk.DexClient
Get Client, retry if we fail to get it (ie API Rate limited)
func (*Smoke) GetStatechain ¶
func (s *Smoke) GetStatechain() types.StatechainPools
GetStatechain : Get the Statehcain pools.
func (*Smoke) LogResults ¶
LogResults : Log our results.
func (*Smoke) SendTxn ¶
func (s *Smoke) SendTxn(client sdk.DexClient, key keys.KeyManager, payload []msg.Transfer, memo string)
SendTxn : Send the transaction to Binance.
func (*Smoke) StatechainState ¶
StatechainState : Current Statechain state.
type Statechain ¶
type Statechain struct {
Env string
}
func NewStatechain ¶
func NewStatechain(env string) Statechain
NewStatechain : Create a new Statechain instance.
func (Statechain) PoolURL ¶
func (s Statechain) PoolURL() string
PoolURL : Return the Pool URL based on the selected environment.
func (Statechain) StakerURL ¶
func (s Statechain) StakerURL(staker string) string
StakerURL : Return the Staker URL based on the selected environment.
type Sweep ¶
type Sweep struct { ApiAddr string Network btypes.ChainNetwork Binance Binance KeyManager keys.KeyManager Client sdk.DexClient KeyList []string }
Sweep : our main sweep type.
func (Sweep) Balances ¶
func (s Sweep) Balances(address btypes.AccAddress) []btypes.TokenBalance
Balances : Get the account balances of a given wallet.
func (Sweep) EmptyWallets ¶
func (s Sweep) EmptyWallets()
EmptyWallets : Empty and transfer all assets out of the wallet.