Documentation
¶
Overview ¶
Package eth client is the go client for the Livepeer Ethereum smart contract. Contracts here are generated.
Index ¶
- Variables
- func FormatPerc(value *big.Int) string
- func FormatUnits(baseAmount *big.Int, name string) string
- func FromBaseUnit(baseAmount *big.Int) *big.Float
- func FromPerc(perc float64) *big.Int
- func FromPercOfUint256(perc float64) *big.Int
- func IsNullAddress(addr ethcommon.Address) bool
- func ToBaseUnit(lptAmount *big.Float) *big.Int
- func ToPerc(value *big.Int) float64
- func Wait(db *common.DB, blocks *big.Int) error
- type AccountManager
- type Backend
- type BlockHashReader
- type BlockNumReader
- type GasPriceMonitor
- type GasPriceOracle
- type LivepeerEthClient
- type MockClient
- func (m *MockClient) Account() accounts.Account
- func (m *MockClient) CancelUnlock() (*types.Transaction, error)
- func (m *MockClient) CheckTx(tx *types.Transaction) error
- func (m *MockClient) CurrentRound() (*big.Int, error)
- func (m *MockClient) CurrentRoundInitialized() (bool, error)
- func (m *MockClient) CurrentRoundStartBlock() (*big.Int, error)
- func (m *MockClient) FundDeposit(amount *big.Int) (*types.Transaction, error)
- func (m *MockClient) FundDepositAndReserve(depositAmount, reserveAmount *big.Int) (*types.Transaction, error)
- func (m *MockClient) GetSenderInfo(addr common.Address) (*pm.SenderInfo, error)
- func (m *MockClient) GetTranscoderPoolMaxSize() (*big.Int, error)
- func (m *MockClient) InitializeRound() (*types.Transaction, error)
- func (m *MockClient) RegisteredTranscoders() ([]*lpTypes.Transcoder, error)
- func (m *MockClient) Senders(addr common.Address) (sender struct{ ... }, err error)
- func (m *MockClient) Unlock() (*types.Transaction, error)
- func (m *MockClient) UnlockPeriod() (*big.Int, error)
- func (m *MockClient) Withdraw() (*types.Transaction, error)
- type NonceManager
- type RemoteNonceReader
- type RoundInitializer
- type StubClient
- func (e *StubClient) Account() accounts.Account
- func (e *StubClient) Backend() (Backend, error)
- func (e *StubClient) BalanceOf(addr common.Address) (*big.Int, error)
- func (e *StubClient) BlockHashForRound(round *big.Int) ([32]byte, error)
- func (e *StubClient) Bond(amount *big.Int, toAddr common.Address) (*types.Transaction, error)
- func (e *StubClient) CancelUnlock() (*types.Transaction, error)
- func (c *StubClient) CheckTx(tx *types.Transaction) error
- func (e *StubClient) ClaimEarnings(endRound *big.Int) error
- func (e *StubClient) ClaimableReserve(reserveHolder, claimant ethcommon.Address) (*big.Int, error)
- func (e *StubClient) ClaimedReserve(sender ethcommon.Address, claimant ethcommon.Address) (*big.Int, error)
- func (c *StubClient) ContractAddresses() map[string]common.Address
- func (e *StubClient) CurrentRound() (*big.Int, error)
- func (e *StubClient) CurrentRoundInitialized() (bool, error)
- func (e *StubClient) CurrentRoundLocked() (bool, error)
- func (e *StubClient) CurrentRoundStartBlock() (*big.Int, error)
- func (e *StubClient) FundDeposit(amount *big.Int) (*types.Transaction, error)
- func (e *StubClient) FundDepositAndReserve(depositAmount, reserveAmount *big.Int) (*types.Transaction, error)
- func (e *StubClient) FundReserve(amount *big.Int) (*types.Transaction, error)
- func (e *StubClient) GetDelegator(addr common.Address) (*lpTypes.Delegator, error)
- func (e *StubClient) GetDelegatorUnbondingLock(addr common.Address, unbondingLockId *big.Int) (*lpTypes.UnbondingLock, error)
- func (c *StubClient) GetGasInfo() (uint64, *big.Int)
- func (e *StubClient) GetSenderInfo(addr ethcommon.Address) (*pm.SenderInfo, error)
- func (e *StubClient) GetServiceURI(addr common.Address) (string, error)
- func (e *StubClient) GetTotalBonded() (*big.Int, error)
- func (e *StubClient) GetTranscoder(addr common.Address) (*lpTypes.Transcoder, error)
- func (e *StubClient) GetTranscoderEarningsPoolForRound(addr common.Address, round *big.Int) (*lpTypes.TokenPools, error)
- func (c *StubClient) GetTranscoderPoolMaxSize() (*big.Int, error)
- func (e *StubClient) GetTranscoderPoolSize() (*big.Int, error)
- func (c *StubClient) Inflation() (*big.Int, error)
- func (c *StubClient) InflationChange() (*big.Int, error)
- func (e *StubClient) InitializeRound() (*types.Transaction, error)
- func (e *StubClient) IsActiveTranscoder() (bool, error)
- func (e *StubClient) IsUsedTicket(ticket *pm.Ticket) (bool, error)
- func (e *StubClient) LastInitializedRound() (*big.Int, error)
- func (e *StubClient) Paused() (bool, error)
- func (e *StubClient) Rebond(*big.Int) (*types.Transaction, error)
- func (e *StubClient) RebondFromUnbonded(common.Address, *big.Int) (*types.Transaction, error)
- func (e *StubClient) RedeemWinningTicket(ticket *pm.Ticket, sig []byte, recipientRand *big.Int) (*types.Transaction, error)
- func (e *StubClient) RegisteredTranscoders() ([]*lpTypes.Transcoder, error)
- func (c *StubClient) ReplaceTransaction(tx *types.Transaction, method string, gasPrice *big.Int) (*types.Transaction, error)
- func (e *StubClient) Request() (*types.Transaction, error)
- func (e *StubClient) Reward() (*types.Transaction, error)
- func (c *StubClient) RoundLength() (*big.Int, error)
- func (c *StubClient) RoundLockAmount() (*big.Int, error)
- func (e *StubClient) Senders(addr ethcommon.Address) (sender struct{ ... }, err error)
- func (c *StubClient) SetGasInfo(uint64, *big.Int) error
- func (e *StubClient) SetServiceURI(serviceURI string) (*types.Transaction, error)
- func (e *StubClient) Setup(password string, gasLimit uint64, gasPrice *big.Int) error
- func (c *StubClient) Sign(msg []byte) ([]byte, error)
- func (c *StubClient) TargetBondingRate() (*big.Int, error)
- func (e *StubClient) TotalSupply() (*big.Int, error)
- func (e *StubClient) Transcoder(blockRewardCut, feeShare *big.Int) (*types.Transaction, error)
- func (e *StubClient) Transfer(toAddr common.Address, amount *big.Int) (*types.Transaction, error)
- func (e *StubClient) Unbond(*big.Int) (*types.Transaction, error)
- func (c *StubClient) UnbondingPeriod() (uint64, error)
- func (e *StubClient) Unlock() (*types.Transaction, error)
- func (e *StubClient) UnlockPeriod() (*big.Int, error)
- func (e *StubClient) Withdraw() (*types.Transaction, error)
- func (e *StubClient) WithdrawFees() (*types.Transaction, error)
- func (e *StubClient) WithdrawStake(*big.Int) (*types.Transaction, error)
Constants ¶
This section is empty.
Variables ¶
var ( ErrAccountNotFound = fmt.Errorf("ETH account not found") ErrLocked = fmt.Errorf("account locked") ErrPassphraseMismatch = fmt.Errorf("passphrases do not match") )
var ( ErrReplacingMinedTx = fmt.Errorf("trying to replace already mined tx") ErrCurrentRoundLocked = fmt.Errorf("current round locked") ErrMissingBackend = fmt.Errorf("missing Ethereum client backend") )
var (
BlocksUntilFirstClaimDeadline = big.NewInt(200)
)
Functions ¶
func FormatPerc ¶ added in v0.3.3
func FromPercOfUint256 ¶ added in v0.5.0
func IsNullAddress ¶
Types ¶
type AccountManager ¶ added in v0.3.3
type AccountManager interface {
Unlock(passphrase string) error
Lock() error
CreateTransactOpts(gasLimit uint64, gasPrice *big.Int) (*bind.TransactOpts, error)
SignTx(signer types.Signer, tx *types.Transaction) (*types.Transaction, error)
Sign(msg []byte) ([]byte, error)
Account() accounts.Account
}
func NewAccountManager ¶ added in v0.3.3
func NewAccountManager(accountAddr ethcommon.Address, keystoreDir string) (AccountManager, error)
type Backend ¶ added in v0.5.0
type Backend interface {
ethereum.ChainStateReader
ethereum.TransactionReader
ethereum.TransactionSender
ethereum.ContractCaller
ethereum.PendingContractCaller
ethereum.PendingStateReader
ethereum.GasEstimator
ethereum.GasPricer
ethereum.LogFilterer
ChainID(ctx context.Context) (*big.Int, error)
}
type BlockHashReader ¶ added in v0.5.0
type BlockHashReader interface {
LastInitializedBlockHash() [32]byte
}
BlockHashReader describes methods for reading the last initialized block hash
type BlockNumReader ¶ added in v0.5.0
BlockNumReader describes methods for reading the last seen block number
type GasPriceMonitor ¶ added in v0.5.0
type GasPriceMonitor struct {
// contains filtered or unexported fields
}
GasPriceMonitor polls for gas price updates and updates its own view of the current gas price that can be used by others
func NewGasPriceMonitor ¶ added in v0.5.0
func NewGasPriceMonitor(gpo GasPriceOracle, pollingInterval time.Duration) *GasPriceMonitor
NewGasPriceMonitor returns a GasPriceMonitor
func (*GasPriceMonitor) GasPrice ¶ added in v0.5.0
func (gpm *GasPriceMonitor) GasPrice() *big.Int
GasPrice returns the current gas price
func (*GasPriceMonitor) Start ¶ added in v0.5.0
func (gpm *GasPriceMonitor) Start(ctx context.Context) (chan struct{}, error)
Start starts polling for gas price updates and returns a channel to receive notifications of gas price changes
func (*GasPriceMonitor) Stop ¶ added in v0.5.0
func (gpm *GasPriceMonitor) Stop() error
Stop stops polling for gas price updates
type GasPriceOracle ¶ added in v0.5.0
GasPriceOracle defines methods for fetching a suggested gas price for submitting transactions
type LivepeerEthClient ¶
type LivepeerEthClient interface {
Setup(password string, gasLimit uint64, gasPrice *big.Int) error
Account() accounts.Account
Backend() (Backend, error)
// Rounds
InitializeRound() (*types.Transaction, error)
CurrentRound() (*big.Int, error)
LastInitializedRound() (*big.Int, error)
BlockHashForRound(round *big.Int) ([32]byte, error)
CurrentRoundInitialized() (bool, error)
CurrentRoundLocked() (bool, error)
CurrentRoundStartBlock() (*big.Int, error)
// Token
Transfer(toAddr ethcommon.Address, amount *big.Int) (*types.Transaction, error)
Request() (*types.Transaction, error)
BalanceOf(ethcommon.Address) (*big.Int, error)
TotalSupply() (*big.Int, error)
// Service Registry
SetServiceURI(serviceURI string) (*types.Transaction, error)
GetServiceURI(addr ethcommon.Address) (string, error)
// Staking
Transcoder(blockRewardCut, feeShare *big.Int) (*types.Transaction, error)
Reward() (*types.Transaction, error)
Bond(amount *big.Int, toAddr ethcommon.Address) (*types.Transaction, error)
Rebond(unbondingLockID *big.Int) (*types.Transaction, error)
RebondFromUnbonded(toAddr ethcommon.Address, unbondingLockID *big.Int) (*types.Transaction, error)
Unbond(amount *big.Int) (*types.Transaction, error)
WithdrawStake(unbondingLockID *big.Int) (*types.Transaction, error)
WithdrawFees() (*types.Transaction, error)
ClaimEarnings(endRound *big.Int) error
GetTranscoder(addr ethcommon.Address) (*lpTypes.Transcoder, error)
GetDelegator(addr ethcommon.Address) (*lpTypes.Delegator, error)
GetDelegatorUnbondingLock(addr ethcommon.Address, unbondingLockId *big.Int) (*lpTypes.UnbondingLock, error)
GetTranscoderEarningsPoolForRound(addr ethcommon.Address, round *big.Int) (*lpTypes.TokenPools, error)
RegisteredTranscoders() ([]*lpTypes.Transcoder, error)
IsActiveTranscoder() (bool, error)
GetTotalBonded() (*big.Int, error)
GetTranscoderPoolSize() (*big.Int, error)
// TicketBroker
FundDepositAndReserve(depositAmount, penaltyEscrowAmount *big.Int) (*types.Transaction, error)
FundDeposit(amount *big.Int) (*types.Transaction, error)
FundReserve(amount *big.Int) (*types.Transaction, error)
Unlock() (*types.Transaction, error)
CancelUnlock() (*types.Transaction, error)
Withdraw() (*types.Transaction, error)
RedeemWinningTicket(ticket *pm.Ticket, sig []byte, recipientRand *big.Int) (*types.Transaction, error)
IsUsedTicket(ticket *pm.Ticket) (bool, error)
GetSenderInfo(addr ethcommon.Address) (*pm.SenderInfo, error)
UnlockPeriod() (*big.Int, error)
ClaimedReserve(reserveHolder ethcommon.Address, claimant ethcommon.Address) (*big.Int, error)
// Parameters
GetTranscoderPoolMaxSize() (*big.Int, error)
RoundLength() (*big.Int, error)
RoundLockAmount() (*big.Int, error)
UnbondingPeriod() (uint64, error)
Inflation() (*big.Int, error)
InflationChange() (*big.Int, error)
TargetBondingRate() (*big.Int, error)
Paused() (bool, error)
// Helpers
ContractAddresses() map[string]ethcommon.Address
CheckTx(*types.Transaction) error
ReplaceTransaction(*types.Transaction, string, *big.Int) (*types.Transaction, error)
Sign([]byte) ([]byte, error)
GetGasInfo() (uint64, *big.Int)
SetGasInfo(uint64, *big.Int) error
}
type MockClient ¶ added in v0.5.0
type MockClient struct {
mock.Mock
// Embed StubClient to call its methods with MockClient
// as the receiver so that MockClient implements the LivepeerETHClient
// interface
*StubClient
}
func (*MockClient) Account ¶ added in v0.5.0
func (m *MockClient) Account() accounts.Account
func (*MockClient) CancelUnlock ¶ added in v0.5.0
func (m *MockClient) CancelUnlock() (*types.Transaction, error)
func (*MockClient) CheckTx ¶ added in v0.5.0
func (m *MockClient) CheckTx(tx *types.Transaction) error
func (*MockClient) CurrentRound ¶ added in v0.5.0
func (m *MockClient) CurrentRound() (*big.Int, error)
CurrentRound returns the current round number
func (*MockClient) CurrentRoundInitialized ¶ added in v0.5.0
func (m *MockClient) CurrentRoundInitialized() (bool, error)
CurrentRoundInitialized returns whether the current round is initialized
func (*MockClient) CurrentRoundStartBlock ¶ added in v0.5.0
func (m *MockClient) CurrentRoundStartBlock() (*big.Int, error)
CurrentRoundStartBlock returns the block number that the current round started in
func (*MockClient) FundDeposit ¶ added in v0.5.0
func (m *MockClient) FundDeposit(amount *big.Int) (*types.Transaction, error)
func (*MockClient) FundDepositAndReserve ¶ added in v0.5.0
func (m *MockClient) FundDepositAndReserve(depositAmount, reserveAmount *big.Int) (*types.Transaction, error)
func (*MockClient) GetSenderInfo ¶ added in v0.5.0
func (m *MockClient) GetSenderInfo(addr common.Address) (*pm.SenderInfo, error)
func (*MockClient) GetTranscoderPoolMaxSize ¶ added in v0.5.0
func (m *MockClient) GetTranscoderPoolMaxSize() (*big.Int, error)
GetTranscoderPoolMaxSize returns the max size of the active set
func (*MockClient) InitializeRound ¶ added in v0.5.0
func (m *MockClient) InitializeRound() (*types.Transaction, error)
InitializeRound submits a round initialization transaction
func (*MockClient) RegisteredTranscoders ¶ added in v0.5.0
func (m *MockClient) RegisteredTranscoders() ([]*lpTypes.Transcoder, error)
RegisteredTranscoders returns a list of registered transcoders
func (*MockClient) Unlock ¶ added in v0.5.0
func (m *MockClient) Unlock() (*types.Transaction, error)
func (*MockClient) UnlockPeriod ¶ added in v0.5.0
func (m *MockClient) UnlockPeriod() (*big.Int, error)
func (*MockClient) Withdraw ¶ added in v0.5.0
func (m *MockClient) Withdraw() (*types.Transaction, error)
type NonceManager ¶ added in v0.5.0
type NonceManager struct {
// contains filtered or unexported fields
}
NonceManager manages transaction nonces for multiple ETH addresses
func NewNonceManager ¶ added in v0.5.0
func NewNonceManager(remoteReader RemoteNonceReader) *NonceManager
NewNonceManager creates an instance of a NonceManager
func (*NonceManager) Lock ¶ added in v0.5.0
func (m *NonceManager) Lock(addr ethcommon.Address)
Lock locks the provided address. The caller should always call Lock before calling Next or Update
func (*NonceManager) Next ¶ added in v0.5.0
func (m *NonceManager) Next(addr ethcommon.Address) (uint64, error)
Next returns the next transaction nonce to be used for the provided address
func (*NonceManager) Unlock ¶ added in v0.5.0
func (m *NonceManager) Unlock(addr ethcommon.Address)
Unlock unlocks the provided address. The caller should always call Unlock after finishing calls to Next or Update
type RemoteNonceReader ¶ added in v0.5.0
type RemoteNonceReader interface {
PendingNonceAt(ctx context.Context, addr ethcommon.Address) (uint64, error)
}
RemoteNonceReader is an interface that describes an object capable of reading transaction nonces for ETH address from a remote source
type RoundInitializer ¶ added in v0.5.0
type RoundInitializer struct {
// contains filtered or unexported fields
}
RoundInitializer is a service that automatically initializes the current round. Each round is split into epochs with a length of epochBlocks. During each epoch a member of the upcoming active set is selected to initialize the round This selection process is purely a client side implementation that attempts to minimize on-chain transaction collisions, but collisions are still possible if initialization transactions are submitted by parties that are not using this selection process
func NewRoundInitializer ¶ added in v0.5.0
func NewRoundInitializer(client LivepeerEthClient, blkNumRdr BlockNumReader, blkHashRdr BlockHashReader, pollingInterval time.Duration) *RoundInitializer
NewRoundInitializer creates a RoundInitializer instance
func (*RoundInitializer) Start ¶ added in v0.5.0
func (r *RoundInitializer) Start()
Start kicks off a loop that checks if the round should be initialized
func (*RoundInitializer) Stop ¶ added in v0.5.0
func (r *RoundInitializer) Stop()
Stop signals the polling loop to exit gracefully
type StubClient ¶
type StubClient struct {
SubLogsCh chan types.Log
TranscoderAddress common.Address
BlockNum *big.Int
BlockHashToReturn common.Hash
ProcessHistoricalUnbondError error
Orchestrators []*lpTypes.Transcoder
RoundsErr error
SenderInfo *pm.SenderInfo
PoolSize *big.Int
ClaimedAmount *big.Int
ClaimedReserveError error
}
func (*StubClient) Account ¶
func (e *StubClient) Account() accounts.Account
func (*StubClient) Backend ¶
func (e *StubClient) Backend() (Backend, error)
func (*StubClient) BlockHashForRound ¶ added in v0.5.0
func (e *StubClient) BlockHashForRound(round *big.Int) ([32]byte, error)
func (*StubClient) Bond ¶
func (e *StubClient) Bond(amount *big.Int, toAddr common.Address) (*types.Transaction, error)
func (*StubClient) CancelUnlock ¶ added in v0.5.0
func (e *StubClient) CancelUnlock() (*types.Transaction, error)
func (*StubClient) CheckTx ¶ added in v0.3.3
func (c *StubClient) CheckTx(tx *types.Transaction) error
func (*StubClient) ClaimEarnings ¶ added in v0.3.3
func (e *StubClient) ClaimEarnings(endRound *big.Int) error
func (*StubClient) ClaimableReserve ¶ added in v0.5.0
func (*StubClient) ClaimedReserve ¶ added in v0.5.0
func (*StubClient) ContractAddresses ¶ added in v0.3.3
func (c *StubClient) ContractAddresses() map[string]common.Address
func (*StubClient) CurrentRound ¶ added in v0.3.3
func (e *StubClient) CurrentRound() (*big.Int, error)
func (*StubClient) CurrentRoundInitialized ¶
func (e *StubClient) CurrentRoundInitialized() (bool, error)
func (*StubClient) CurrentRoundLocked ¶ added in v0.3.3
func (e *StubClient) CurrentRoundLocked() (bool, error)
func (*StubClient) CurrentRoundStartBlock ¶ added in v0.5.0
func (e *StubClient) CurrentRoundStartBlock() (*big.Int, error)
func (*StubClient) FundDeposit ¶ added in v0.5.0
func (e *StubClient) FundDeposit(amount *big.Int) (*types.Transaction, error)
func (*StubClient) FundDepositAndReserve ¶ added in v0.5.0
func (e *StubClient) FundDepositAndReserve(depositAmount, reserveAmount *big.Int) (*types.Transaction, error)
TicketBroker
func (*StubClient) FundReserve ¶ added in v0.5.0
func (e *StubClient) FundReserve(amount *big.Int) (*types.Transaction, error)
func (*StubClient) GetDelegator ¶ added in v0.3.3
func (*StubClient) GetDelegatorUnbondingLock ¶ added in v0.3.3
func (e *StubClient) GetDelegatorUnbondingLock(addr common.Address, unbondingLockId *big.Int) (*lpTypes.UnbondingLock, error)
func (*StubClient) GetGasInfo ¶ added in v0.3.3
func (c *StubClient) GetGasInfo() (uint64, *big.Int)
func (*StubClient) GetSenderInfo ¶ added in v0.5.0
func (e *StubClient) GetSenderInfo(addr ethcommon.Address) (*pm.SenderInfo, error)
func (*StubClient) GetServiceURI ¶ added in v0.3.3
func (e *StubClient) GetServiceURI(addr common.Address) (string, error)
func (*StubClient) GetTotalBonded ¶ added in v0.3.3
func (e *StubClient) GetTotalBonded() (*big.Int, error)
func (*StubClient) GetTranscoder ¶ added in v0.3.3
func (e *StubClient) GetTranscoder(addr common.Address) (*lpTypes.Transcoder, error)
func (*StubClient) GetTranscoderEarningsPoolForRound ¶ added in v0.3.3
func (e *StubClient) GetTranscoderEarningsPoolForRound(addr common.Address, round *big.Int) (*lpTypes.TokenPools, error)
func (*StubClient) GetTranscoderPoolMaxSize ¶ added in v0.5.0
func (c *StubClient) GetTranscoderPoolMaxSize() (*big.Int, error)
Parameters
func (*StubClient) GetTranscoderPoolSize ¶ added in v0.5.0
func (e *StubClient) GetTranscoderPoolSize() (*big.Int, error)
func (*StubClient) InflationChange ¶ added in v0.3.3
func (c *StubClient) InflationChange() (*big.Int, error)
func (*StubClient) InitializeRound ¶
func (e *StubClient) InitializeRound() (*types.Transaction, error)
func (*StubClient) IsActiveTranscoder ¶
func (e *StubClient) IsActiveTranscoder() (bool, error)
func (*StubClient) IsUsedTicket ¶ added in v0.5.0
func (e *StubClient) IsUsedTicket(ticket *pm.Ticket) (bool, error)
func (*StubClient) LastInitializedRound ¶ added in v0.3.3
func (e *StubClient) LastInitializedRound() (*big.Int, error)
func (*StubClient) Paused ¶ added in v0.3.3
func (e *StubClient) Paused() (bool, error)
func (*StubClient) Rebond ¶ added in v0.3.3
func (e *StubClient) Rebond(*big.Int) (*types.Transaction, error)
func (*StubClient) RebondFromUnbonded ¶ added in v0.3.3
func (e *StubClient) RebondFromUnbonded(common.Address, *big.Int) (*types.Transaction, error)
func (*StubClient) RedeemWinningTicket ¶ added in v0.5.0
func (e *StubClient) RedeemWinningTicket(ticket *pm.Ticket, sig []byte, recipientRand *big.Int) (*types.Transaction, error)
func (*StubClient) RegisteredTranscoders ¶ added in v0.3.3
func (e *StubClient) RegisteredTranscoders() ([]*lpTypes.Transcoder, error)
func (*StubClient) ReplaceTransaction ¶ added in v0.3.3
func (c *StubClient) ReplaceTransaction(tx *types.Transaction, method string, gasPrice *big.Int) (*types.Transaction, error)
func (*StubClient) Request ¶ added in v0.3.3
func (e *StubClient) Request() (*types.Transaction, error)
func (*StubClient) Reward ¶
func (e *StubClient) Reward() (*types.Transaction, error)
func (*StubClient) RoundLength ¶ added in v0.3.3
func (c *StubClient) RoundLength() (*big.Int, error)
func (*StubClient) RoundLockAmount ¶ added in v0.3.3
func (c *StubClient) RoundLockAmount() (*big.Int, error)
func (*StubClient) SetGasInfo ¶ added in v0.3.3
func (c *StubClient) SetGasInfo(uint64, *big.Int) error
func (*StubClient) SetServiceURI ¶ added in v0.3.3
func (e *StubClient) SetServiceURI(serviceURI string) (*types.Transaction, error)
func (*StubClient) TargetBondingRate ¶ added in v0.3.3
func (c *StubClient) TargetBondingRate() (*big.Int, error)
func (*StubClient) TotalSupply ¶ added in v0.3.3
func (e *StubClient) TotalSupply() (*big.Int, error)
func (*StubClient) Transcoder ¶
func (e *StubClient) Transcoder(blockRewardCut, feeShare *big.Int) (*types.Transaction, error)
func (*StubClient) Transfer ¶
func (e *StubClient) Transfer(toAddr common.Address, amount *big.Int) (*types.Transaction, error)
func (*StubClient) Unbond ¶
func (e *StubClient) Unbond(*big.Int) (*types.Transaction, error)
func (*StubClient) UnbondingPeriod ¶ added in v0.3.3
func (c *StubClient) UnbondingPeriod() (uint64, error)
func (*StubClient) Unlock ¶ added in v0.5.0
func (e *StubClient) Unlock() (*types.Transaction, error)
func (*StubClient) UnlockPeriod ¶ added in v0.5.0
func (e *StubClient) UnlockPeriod() (*big.Int, error)
func (*StubClient) Withdraw ¶ added in v0.3.3
func (e *StubClient) Withdraw() (*types.Transaction, error)
func (*StubClient) WithdrawFees ¶ added in v0.3.3
func (e *StubClient) WithdrawFees() (*types.Transaction, error)
func (*StubClient) WithdrawStake ¶ added in v0.3.3
func (e *StubClient) WithdrawStake(*big.Int) (*types.Transaction, error)