Documentation
¶
Overview ¶
Package sdk is a generated GoMock package.
Index ¶
- type AccountManager
- func (m *AccountManager) Create(passphrase string) (address types.Address, err error)
- func (m *AccountManager) CreateEthCompatible(passphrase string) (address types.Address, err error)
- func (m *AccountManager) Delete(address types.Address, passphrase string) error
- func (m *AccountManager) Export(address types.Address, passphrase string) (string, error)
- func (m *AccountManager) GetDefault() (*types.Address, error)
- func (m *AccountManager) Import(keyFile, passphrase, newPassphrase string) (address types.Address, err error)
- func (m *AccountManager) ImportKey(keyString string, passphrase string) (address types.Address, err error)
- func (m *AccountManager) List() []types.Address
- func (m *AccountManager) Lock(address types.Address) error
- func (m *AccountManager) Sign(tx types.UnsignedTransaction, passphrase string) (v byte, r, s []byte, err error)
- func (m *AccountManager) SignAndEcodeTransactionWithPassphrase(tx types.UnsignedTransaction, passphrase string) ([]byte, error)
- func (m *AccountManager) SignTransaction(tx types.UnsignedTransaction) ([]byte, error)
- func (m *AccountManager) SignTransactionWithPassphrase(tx types.UnsignedTransaction, passphrase string) (types.SignedTransaction, error)
- func (m *AccountManager) TimedUnlock(address types.Address, passphrase string, timeout time.Duration) error
- func (m *AccountManager) TimedUnlockDefault(passphrase string, timeout time.Duration) error
- func (m *AccountManager) Unlock(address types.Address, passphrase string) error
- func (m *AccountManager) UnlockDefault(passphrase string) error
- func (m *AccountManager) Update(address types.Address, passphrase, newPassphrase string) error
- type AccountManagerOperator
- type Client
- func (client *Client) ApplyUnsignedTransactionDefault(tx *types.UnsignedTransaction) error
- func (client *Client) BatchCallRPC(b []rpc.BatchElem) error
- func (client *Client) BatchGetBlockConfirmationRisk(blockhashes []types.Hash) (map[types.Hash]*big.Float, error)
- func (client *Client) BatchGetBlockSummarys(blockhashes []types.Hash) (map[types.Hash]*types.BlockSummary, error)
- func (client *Client) BatchGetRawBlockConfirmationRisk(blockhashes []types.Hash) (map[types.Hash]*big.Int, error)
- func (client *Client) BatchGetTxByHashes(txhashes []types.Hash) (map[types.Hash]*types.Transaction, error)
- func (client *Client) Call(request types.CallRequest, epoch *types.Epoch) (result hexutil.Bytes, err error)
- func (client *Client) CallRPC(result interface{}, method string, args ...interface{}) error
- func (client *Client) CheckBalanceAgainstTransaction(accountAddress types.Address, contractAddress types.Address, ...) (response types.CheckBalanceAgainstTransactionResponse, err error)
- func (client *Client) Close()
- func (client *Client) CreateUnsignedTransaction(from types.Address, to types.Address, amount *hexutil.Big, data []byte) (types.UnsignedTransaction, error)
- func (client *Client) DeployContract(option *types.ContractDeployOption, abiJSON []byte, bytecode []byte, ...) *ContractDeployResult
- func (client *Client) EstimateGasAndCollateral(request types.CallRequest, epoch ...*types.Epoch) (estimat types.Estimate, err error)
- func (client *Client) GetAccountInfo(account types.Address, epoch ...*types.Epoch) (accountInfo types.AccountInfo, err error)
- func (client *Client) GetAccumulateInterestRate(epoch ...*types.Epoch) (intersetRate *hexutil.Big, err error)
- func (client *Client) GetAdmin(contractAddress types.Address, epoch ...*types.Epoch) (admin *types.Address, err error)
- func (client *Client) GetBalance(address types.Address, epoch ...*types.Epoch) (balance *hexutil.Big, err error)
- func (client *Client) GetBestBlockHash() (hash types.Hash, err error)
- func (client *Client) GetBlockByEpoch(epoch *types.Epoch) (block *types.Block, err error)
- func (client *Client) GetBlockByHash(blockHash types.Hash) (block *types.Block, err error)
- func (client *Client) GetBlockByHashWithPivotAssumption(blockHash types.Hash, pivotHash types.Hash, epoch hexutil.Uint64) (block types.Block, err error)
- func (client *Client) GetBlockConfirmationRisk(blockHash types.Hash) (*big.Float, error)
- func (client *Client) GetBlockRewardInfo(epoch types.Epoch) (rewardInfo []types.RewardInfo, err error)
- func (client *Client) GetBlockSummaryByEpoch(epoch *types.Epoch) (blockSummary *types.BlockSummary, err error)
- func (client *Client) GetBlockSummaryByHash(blockHash types.Hash) (blockSummary *types.BlockSummary, err error)
- func (client *Client) GetBlockTrace(blockHash types.Hash) (trace *types.LocalizedBlockTrace, err error)
- func (client *Client) GetBlocksByEpoch(epoch *types.Epoch) (blockHashes []types.Hash, err error)
- func (client *Client) GetClientVersion() (clientVersion string, err error)
- func (client *Client) GetCode(address types.Address, epoch ...*types.Epoch) (code hexutil.Bytes, err error)
- func (client *Client) GetCollateralForStorage(account types.Address, epoch ...*types.Epoch) (storage *hexutil.Big, err error)
- func (client *Client) GetContract(abiJSON []byte, deployedAt *types.Address) (*Contract, error)
- func (client *Client) GetDepositList(address types.Address, epoch ...*types.Epoch) (depositInfos []types.DepositInfo, err error)
- func (client *Client) GetEpochNumber(epoch ...*types.Epoch) (epochNumber *hexutil.Big, err error)
- func (client *Client) GetGasPrice() (gasPrice *hexutil.Big, err error)
- func (client *Client) GetInterestRate(epoch ...*types.Epoch) (intersetRate *hexutil.Big, err error)
- func (client *Client) GetLogs(filter types.LogFilter) (logs []types.Log, err error)
- func (client *Client) GetNetworkID() (uint32, error)
- func (client *Client) GetNextNonce(address types.Address, epoch ...*types.Epoch) (nonce *hexutil.Big, err error)
- func (client *Client) GetNodeURL() string
- func (client *Client) GetRawBlockConfirmationRisk(blockhash types.Hash) (risk *hexutil.Big, err error)
- func (client *Client) GetSkippedBlocksByEpoch(epoch *types.Epoch) (blockHashs []types.Hash, err error)
- func (client *Client) GetSponsorInfo(contractAddress types.Address, epoch ...*types.Epoch) (sponsor types.SponsorInfo, err error)
- func (client *Client) GetStakingBalance(account types.Address, epoch ...*types.Epoch) (balance *hexutil.Big, err error)
- func (client *Client) GetStatus() (status types.Status, err error)
- func (client *Client) GetStorageAt(address types.Address, position types.Hash, epoch ...*types.Epoch) (storageEntries hexutil.Bytes, err error)
- func (client *Client) GetStorageRoot(address types.Address, epoch ...*types.Epoch) (storageRoot *types.StorageRoot, err error)
- func (client *Client) GetSupplyInfo(epoch ...*types.Epoch) (info types.TokenSupplyInfo, err error)
- func (client *Client) GetTransactionByHash(txHash types.Hash) (tx *types.Transaction, err error)
- func (client *Client) GetTransactionReceipt(txHash types.Hash) (receipt *types.TransactionReceipt, err error)
- func (client *Client) GetVoteList(address types.Address, epoch ...*types.Epoch) (voteStakeInfos []types.VoteStakeInfo, err error)
- func (client *Client) MustNewAddress(base32OrHex string) types.Address
- func (client *Client) NewAddress(base32OrHex string) (types.Address, error)
- func (client *Client) SendRawTransaction(rawData []byte) (types.Hash, error)
- func (client *Client) SendTransaction(tx types.UnsignedTransaction) (types.Hash, error)
- func (client *Client) SetAccountManager(accountManager AccountManagerOperator)
- func (client *Client) SignEncodedTransactionAndSend(encodedTx []byte, v byte, r, s []byte) (*types.Transaction, error)
- func (client *Client) SubscribeEpochs(channel chan types.WebsocketEpochResponse) (*rpc.ClientSubscription, error)
- func (client *Client) SubscribeLogs(logChannel chan types.Log, chainReorgChannel chan types.ChainReorg, ...) (*rpc.ClientSubscription, error)
- func (client *Client) SubscribeNewHeads(channel chan types.BlockHeader) (*rpc.ClientSubscription, error)
- func (client *Client) WaitForTransationBePacked(txhash types.Hash, duration time.Duration) (*types.Transaction, error)
- func (client *Client) WaitForTransationReceipt(txhash types.Hash, duration time.Duration) (*types.TransactionReceipt, error)
- type ClientOperator
- type ClientOption
- type Contract
- func (contract *Contract) Call(option *types.ContractMethodCallOption, resultPtr interface{}, method string, ...) error
- func (contract *Contract) DecodeEvent(out interface{}, event string, log types.Log) error
- func (contract *Contract) GetData(method string, args ...interface{}) ([]byte, error)
- func (contract *Contract) SendTransaction(option *types.ContractMethodSendOption, method string, args ...interface{}) (types.Hash, error)
- type ContractDeployResult
- type Contractor
- type HTTPRequester
- type MockAccountManagerOperator
- func (m *MockAccountManagerOperator) Create(passphrase string) (types.Address, error)
- func (m *MockAccountManagerOperator) Delete(address types.Address, passphrase string) error
- func (m *MockAccountManagerOperator) EXPECT() *MockAccountManagerOperatorMockRecorder
- func (m *MockAccountManagerOperator) GetDefault() (*types.Address, error)
- func (m *MockAccountManagerOperator) Import(keyFile, passphrase, newPassphrase string) (types.Address, error)
- func (m *MockAccountManagerOperator) List() []types.Address
- func (m *MockAccountManagerOperator) Lock(address types.Address) error
- func (m *MockAccountManagerOperator) Sign(tx types.UnsignedTransaction, passphrase string) (byte, []byte, []byte, error)
- func (m *MockAccountManagerOperator) SignAndEcodeTransactionWithPassphrase(tx types.UnsignedTransaction, passphrase string) ([]byte, error)
- func (m *MockAccountManagerOperator) SignTransaction(tx types.UnsignedTransaction) ([]byte, error)
- func (m *MockAccountManagerOperator) SignTransactionWithPassphrase(tx types.UnsignedTransaction, passphrase string) (*types.SignedTransaction, error)
- func (m *MockAccountManagerOperator) TimedUnlock(address types.Address, passphrase string, timeout time.Duration) error
- func (m *MockAccountManagerOperator) TimedUnlockDefault(passphrase string, timeout time.Duration) error
- func (m *MockAccountManagerOperator) Unlock(address types.Address, passphrase string) error
- func (m *MockAccountManagerOperator) UnlockDefault(passphrase string) error
- func (m *MockAccountManagerOperator) Update(address types.Address, passphrase, newPassphrase string) error
- type MockAccountManagerOperatorMockRecorder
- func (mr *MockAccountManagerOperatorMockRecorder) Create(passphrase interface{}) *gomock.Call
- func (mr *MockAccountManagerOperatorMockRecorder) Delete(address, passphrase interface{}) *gomock.Call
- func (mr *MockAccountManagerOperatorMockRecorder) GetDefault() *gomock.Call
- func (mr *MockAccountManagerOperatorMockRecorder) Import(keyFile, passphrase, newPassphrase interface{}) *gomock.Call
- func (mr *MockAccountManagerOperatorMockRecorder) List() *gomock.Call
- func (mr *MockAccountManagerOperatorMockRecorder) Lock(address interface{}) *gomock.Call
- func (mr *MockAccountManagerOperatorMockRecorder) Sign(tx, passphrase interface{}) *gomock.Call
- func (mr *MockAccountManagerOperatorMockRecorder) SignAndEcodeTransactionWithPassphrase(tx, passphrase interface{}) *gomock.Call
- func (mr *MockAccountManagerOperatorMockRecorder) SignTransaction(tx interface{}) *gomock.Call
- func (mr *MockAccountManagerOperatorMockRecorder) SignTransactionWithPassphrase(tx, passphrase interface{}) *gomock.Call
- func (mr *MockAccountManagerOperatorMockRecorder) TimedUnlock(address, passphrase, timeout interface{}) *gomock.Call
- func (mr *MockAccountManagerOperatorMockRecorder) TimedUnlockDefault(passphrase, timeout interface{}) *gomock.Call
- func (mr *MockAccountManagerOperatorMockRecorder) Unlock(address, passphrase interface{}) *gomock.Call
- func (mr *MockAccountManagerOperatorMockRecorder) UnlockDefault(passphrase interface{}) *gomock.Call
- func (mr *MockAccountManagerOperatorMockRecorder) Update(address, passphrase, newPassphrase interface{}) *gomock.Call
- type MockClientOperator
- func (m *MockClientOperator) ApplyUnsignedTransactionDefault(tx *types.UnsignedTransaction) error
- func (m *MockClientOperator) BatchCallRPC(b []rpc.BatchElem) error
- func (m *MockClientOperator) BatchGetBlockConfirmationRisk(blockhashes []types.Hash) (map[types.Hash]*big.Float, error)
- func (m *MockClientOperator) BatchGetBlockSummarys(blockhashes []types.Hash) (map[types.Hash]*types.BlockSummary, error)
- func (m *MockClientOperator) BatchGetRawBlockConfirmationRisk(blockhashes []types.Hash) (map[types.Hash]*big.Int, error)
- func (m *MockClientOperator) BatchGetTxByHashes(txhashes []types.Hash) (map[types.Hash]*types.Transaction, error)
- func (m *MockClientOperator) Call(request types.CallRequest, epoch *types.Epoch) (*string, error)
- func (m *MockClientOperator) CallRPC(result interface{}, method string, args ...interface{}) error
- func (m *MockClientOperator) Close()
- func (m *MockClientOperator) CreateUnsignedTransaction(from, to types.Address, amount *hexutil.Big, data []byte) (*types.UnsignedTransaction, error)
- func (m *MockClientOperator) Debug(method string, args ...interface{}) (interface{}, error)
- func (m *MockClientOperator) DeployContract(option *types.ContractDeployOption, abiJSON, bytecode []byte, ...) *ContractDeployResult
- func (m *MockClientOperator) EXPECT() *MockClientOperatorMockRecorder
- func (m *MockClientOperator) EstimateGasAndCollateral(request types.CallRequest) (*types.Estimate, error)
- func (m *MockClientOperator) GetBalance(address types.Address, epoch ...*types.Epoch) (*big.Int, error)
- func (m *MockClientOperator) GetBestBlockHash() (types.Hash, error)
- func (m *MockClientOperator) GetBlockByEpoch(epoch *types.Epoch) (*types.Block, error)
- func (m *MockClientOperator) GetBlockByHash(blockHash types.Hash) (*types.Block, error)
- func (m *MockClientOperator) GetBlockConfirmationRisk(blockHash types.Hash) (*big.Float, error)
- func (m *MockClientOperator) GetBlockSummaryByEpoch(epoch *types.Epoch) (*types.BlockSummary, error)
- func (m *MockClientOperator) GetBlockSummaryByHash(blockHash types.Hash) (*types.BlockSummary, error)
- func (m *MockClientOperator) GetBlocksByEpoch(epoch *types.Epoch) ([]types.Hash, error)
- func (m *MockClientOperator) GetCode(address types.Address, epoch ...*types.Epoch) (string, error)
- func (m *MockClientOperator) GetContract(abiJSON []byte, deployedAt *types.Address) (*Contract, error)
- func (m *MockClientOperator) GetEpochNumber(epoch ...*types.Epoch) (*big.Int, error)
- func (m *MockClientOperator) GetGasPrice() (*big.Int, error)
- func (m *MockClientOperator) GetLogs(filter types.LogFilter) ([]types.Log, error)
- func (m *MockClientOperator) GetNodeURL() string
- func (m *MockClientOperator) GetRawBlockConfirmationRisk(blockhash types.Hash) (*big.Int, error)
- func (m *MockClientOperator) GetTransactionByHash(txHash types.Hash) (*types.Transaction, error)
- func (m *MockClientOperator) GetTransactionReceipt(txHash types.Hash) (*types.TransactionReceipt, error)
- func (m *MockClientOperator) SendRawTransaction(rawData []byte) (types.Hash, error)
- func (m *MockClientOperator) SendTransaction(tx *types.UnsignedTransaction) (types.Hash, error)
- func (m *MockClientOperator) SetAccountManager(accountManager AccountManagerOperator)
- func (m *MockClientOperator) SignEncodedTransactionAndSend(encodedTx []byte, v byte, r, s []byte) (*types.Transaction, error)
- type MockClientOperatorMockRecorder
- func (mr *MockClientOperatorMockRecorder) ApplyUnsignedTransactionDefault(tx interface{}) *gomock.Call
- func (mr *MockClientOperatorMockRecorder) BatchCallRPC(b interface{}) *gomock.Call
- func (mr *MockClientOperatorMockRecorder) BatchGetBlockConfirmationRisk(blockhashes interface{}) *gomock.Call
- func (mr *MockClientOperatorMockRecorder) BatchGetBlockSummarys(blockhashes interface{}) *gomock.Call
- func (mr *MockClientOperatorMockRecorder) BatchGetRawBlockConfirmationRisk(blockhashes interface{}) *gomock.Call
- func (mr *MockClientOperatorMockRecorder) BatchGetTxByHashes(txhashes interface{}) *gomock.Call
- func (mr *MockClientOperatorMockRecorder) Call(request, epoch interface{}) *gomock.Call
- func (mr *MockClientOperatorMockRecorder) CallRPC(result, method interface{}, args ...interface{}) *gomock.Call
- func (mr *MockClientOperatorMockRecorder) Close() *gomock.Call
- func (mr *MockClientOperatorMockRecorder) CreateUnsignedTransaction(from, to, amount, data interface{}) *gomock.Call
- func (mr *MockClientOperatorMockRecorder) Debug(method interface{}, args ...interface{}) *gomock.Call
- func (mr *MockClientOperatorMockRecorder) DeployContract(option, abiJSON, bytecode interface{}, constroctorParams ...interface{}) *gomock.Call
- func (mr *MockClientOperatorMockRecorder) EstimateGasAndCollateral(request interface{}) *gomock.Call
- func (mr *MockClientOperatorMockRecorder) GetBalance(address interface{}, epoch ...interface{}) *gomock.Call
- func (mr *MockClientOperatorMockRecorder) GetBestBlockHash() *gomock.Call
- func (mr *MockClientOperatorMockRecorder) GetBlockByEpoch(epoch interface{}) *gomock.Call
- func (mr *MockClientOperatorMockRecorder) GetBlockByHash(blockHash interface{}) *gomock.Call
- func (mr *MockClientOperatorMockRecorder) GetBlockConfirmationRisk(blockHash interface{}) *gomock.Call
- func (mr *MockClientOperatorMockRecorder) GetBlockSummaryByEpoch(epoch interface{}) *gomock.Call
- func (mr *MockClientOperatorMockRecorder) GetBlockSummaryByHash(blockHash interface{}) *gomock.Call
- func (mr *MockClientOperatorMockRecorder) GetBlocksByEpoch(epoch interface{}) *gomock.Call
- func (mr *MockClientOperatorMockRecorder) GetCode(address interface{}, epoch ...interface{}) *gomock.Call
- func (mr *MockClientOperatorMockRecorder) GetContract(abiJSON, deployedAt interface{}) *gomock.Call
- func (mr *MockClientOperatorMockRecorder) GetEpochNumber(epoch ...interface{}) *gomock.Call
- func (mr *MockClientOperatorMockRecorder) GetGasPrice() *gomock.Call
- func (mr *MockClientOperatorMockRecorder) GetLogs(filter interface{}) *gomock.Call
- func (mr *MockClientOperatorMockRecorder) GetNodeURL() *gomock.Call
- func (mr *MockClientOperatorMockRecorder) GetRawBlockConfirmationRisk(blockhash interface{}) *gomock.Call
- func (mr *MockClientOperatorMockRecorder) GetTransactionByHash(txHash interface{}) *gomock.Call
- func (mr *MockClientOperatorMockRecorder) GetTransactionReceipt(txHash interface{}) *gomock.Call
- func (mr *MockClientOperatorMockRecorder) SendRawTransaction(rawData interface{}) *gomock.Call
- func (mr *MockClientOperatorMockRecorder) SendTransaction(tx interface{}) *gomock.Call
- func (mr *MockClientOperatorMockRecorder) SetAccountManager(accountManager interface{}) *gomock.Call
- func (mr *MockClientOperatorMockRecorder) SignEncodedTransactionAndSend(encodedTx, v, r, s interface{}) *gomock.Call
- type MockContractor
- func (m *MockContractor) Call(option *types.ContractMethodCallOption, resultPtr interface{}, method string, ...) error
- func (m *MockContractor) DecodeEvent(out interface{}, event string, log types.Log) error
- func (m *MockContractor) EXPECT() *MockContractorMockRecorder
- func (m *MockContractor) GetData(method string, args ...interface{}) ([]byte, error)
- func (m *MockContractor) SendTransaction(option *types.ContractMethodSendOption, method string, args ...interface{}) (*types.Hash, error)
- type MockContractorMockRecorder
- func (mr *MockContractorMockRecorder) Call(option, resultPtr, method interface{}, args ...interface{}) *gomock.Call
- func (mr *MockContractorMockRecorder) DecodeEvent(out, event, log interface{}) *gomock.Call
- func (mr *MockContractorMockRecorder) GetData(method interface{}, args ...interface{}) *gomock.Call
- func (mr *MockContractorMockRecorder) SendTransaction(option, method interface{}, args ...interface{}) *gomock.Call
- type MockHTTPRequester
- type MockHTTPRequesterMockRecorder
- type MockrpcRequester
- type MockrpcRequesterMockRecorder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountManager ¶
type AccountManager struct {
// contains filtered or unexported fields
}
AccountManager manages Conflux accounts.
func NewAccountManager ¶
func NewAccountManager(keydir string, networkID uint32) *AccountManager
NewAccountManager creates an instance of AccountManager based on the keystore directory "keydir".
func (*AccountManager) Create ¶
func (m *AccountManager) Create(passphrase string) (address types.Address, err error)
Create creates a new account and puts the keystore file into keystore directory
func (*AccountManager) CreateEthCompatible ¶ added in v0.1.1
func (m *AccountManager) CreateEthCompatible(passphrase string) (address types.Address, err error)
CreateEthCompatible creates a new account compatible with eth and puts the keystore file into keystore directory
func (*AccountManager) Delete ¶
func (m *AccountManager) Delete(address types.Address, passphrase string) error
Delete deletes the specified account and remove the keystore file from keystore directory.
func (*AccountManager) GetDefault ¶
func (m *AccountManager) GetDefault() (*types.Address, error)
GetDefault return first account in keystore directory
func (*AccountManager) Import ¶
func (m *AccountManager) Import(keyFile, passphrase, newPassphrase string) (address types.Address, err error)
Import imports account from external key file to keystore directory. Returns error if the account already exists.
func (*AccountManager) ImportKey ¶ added in v0.1.1
func (m *AccountManager) ImportKey(keyString string, passphrase string) (address types.Address, err error)
ImportKey import account from private key hex string and save to keystore directory
func (*AccountManager) List ¶
func (m *AccountManager) List() []types.Address
List lists all accounts in keystore directory.
func (*AccountManager) Lock ¶
func (m *AccountManager) Lock(address types.Address) error
Lock locks the specified account.
func (*AccountManager) Sign ¶
func (m *AccountManager) Sign(tx types.UnsignedTransaction, passphrase string) (v byte, r, s []byte, err error)
Sign signs tx by passphrase and returns the signature
func (*AccountManager) SignAndEcodeTransactionWithPassphrase ¶
func (m *AccountManager) SignAndEcodeTransactionWithPassphrase(tx types.UnsignedTransaction, passphrase string) ([]byte, error)
SignAndEcodeTransactionWithPassphrase signs tx with given passphrase and return its RLP encoded data.
func (*AccountManager) SignTransaction ¶
func (m *AccountManager) SignTransaction(tx types.UnsignedTransaction) ([]byte, error)
SignTransaction signs tx and returns its RLP encoded data.
func (*AccountManager) SignTransactionWithPassphrase ¶
func (m *AccountManager) SignTransactionWithPassphrase(tx types.UnsignedTransaction, passphrase string) (types.SignedTransaction, error)
SignTransactionWithPassphrase signs tx with given passphrase and returns a transction with signature
func (*AccountManager) TimedUnlock ¶
func (m *AccountManager) TimedUnlock(address types.Address, passphrase string, timeout time.Duration) error
TimedUnlock unlocks the specified account for a period of time.
func (*AccountManager) TimedUnlockDefault ¶
func (m *AccountManager) TimedUnlockDefault(passphrase string, timeout time.Duration) error
TimedUnlockDefault unlocks the specified account for a period of time.
func (*AccountManager) Unlock ¶
func (m *AccountManager) Unlock(address types.Address, passphrase string) error
Unlock unlocks the specified account indefinitely.
func (*AccountManager) UnlockDefault ¶
func (m *AccountManager) UnlockDefault(passphrase string) error
UnlockDefault unlocks the default account indefinitely.
type AccountManagerOperator ¶ added in v0.1.1
type AccountManagerOperator interface { Create(passphrase string) (types.Address, error) Import(keyFile, passphrase, newPassphrase string) (types.Address, error) Delete(address types.Address, passphrase string) error Update(address types.Address, passphrase, newPassphrase string) error List() []types.Address GetDefault() (*types.Address, error) Unlock(address types.Address, passphrase string) error UnlockDefault(passphrase string) error TimedUnlock(address types.Address, passphrase string, timeout time.Duration) error TimedUnlockDefault(passphrase string, timeout time.Duration) error Lock(address types.Address) error SignTransaction(tx types.UnsignedTransaction) ([]byte, error) SignAndEcodeTransactionWithPassphrase(tx types.UnsignedTransaction, passphrase string) ([]byte, error) SignTransactionWithPassphrase(tx types.UnsignedTransaction, passphrase string) (types.SignedTransaction, error) Sign(tx types.UnsignedTransaction, passphrase string) (v byte, r, s []byte, err error) }
AccountManagerOperator is interface of operate actions on account manager
type Client ¶
type Client struct { AccountManager AccountManagerOperator // contains filtered or unexported fields }
Client represents a client to interact with Conflux blockchain.
func NewClient ¶
func NewClient(nodeURL string, option ...ClientOption) (*Client, error)
NewClient creates an instance of Client with specified conflux node url, it will creat account manager if option.KeystorePath not empty.
func NewClientWithRPCRequester ¶ added in v0.1.1
NewClientWithRPCRequester creates client with specified rpcRequester
func (*Client) ApplyUnsignedTransactionDefault ¶
func (client *Client) ApplyUnsignedTransactionDefault(tx *types.UnsignedTransaction) error
ApplyUnsignedTransactionDefault set empty fields to value fetched from conflux node.
func (*Client) BatchCallRPC ¶ added in v0.1.1
BatchCallRPC sends all given requests as a single batch and waits for the server to return a response for all of them.
In contrast to Call, BatchCall only returns I/O errors. Any error specific to a request is reported through the Error field of the corresponding BatchElem.
Note that batch calls may not be executed atomically on the server side.
func (*Client) BatchGetBlockConfirmationRisk ¶ added in v0.1.1
func (client *Client) BatchGetBlockConfirmationRisk(blockhashes []types.Hash) (map[types.Hash]*big.Float, error)
BatchGetBlockConfirmationRisk acquires confirmation risk informations in bulk by blockhashes
func (*Client) BatchGetBlockSummarys ¶ added in v0.1.1
func (client *Client) BatchGetBlockSummarys(blockhashes []types.Hash) (map[types.Hash]*types.BlockSummary, error)
BatchGetBlockSummarys requests block summary informations in bulk by blockhashes
func (*Client) BatchGetRawBlockConfirmationRisk ¶ added in v0.1.1
func (client *Client) BatchGetRawBlockConfirmationRisk(blockhashes []types.Hash) (map[types.Hash]*big.Int, error)
BatchGetRawBlockConfirmationRisk requests raw confirmation risk informations in bulk by blockhashes
func (*Client) BatchGetTxByHashes ¶ added in v0.1.1
func (client *Client) BatchGetTxByHashes(txhashes []types.Hash) (map[types.Hash]*types.Transaction, error)
BatchGetTxByHashes requests transaction informations in bulk by txhashes
func (*Client) Call ¶
func (client *Client) Call(request types.CallRequest, epoch *types.Epoch) (result hexutil.Bytes, err error)
Call executes a message call transaction "request" at specified epoch, which is directly executed in the VM of the node, but never mined into the block chain and returns the contract execution result.
func (*Client) CallRPC ¶
CallRPC performs a JSON-RPC call with the given arguments and unmarshals into result if no error occurred.
The result must be a pointer so that package json can unmarshal into it. You can also pass nil, in which case the result is ignored.
func (*Client) CheckBalanceAgainstTransaction ¶ added in v0.1.1
func (client *Client) CheckBalanceAgainstTransaction(accountAddress types.Address, contractAddress types.Address, gasLimit *hexutil.Big, gasPrice *hexutil.Big, storageLimit *hexutil.Big, epoch ...*types.Epoch) (response types.CheckBalanceAgainstTransactionResponse, err error)
CheckBalanceAgainstTransaction checks if user balance is enough for the transaction.
func (*Client) Close ¶
func (client *Client) Close()
Close closes the client, aborting any in-flight requests.
func (*Client) CreateUnsignedTransaction ¶
func (client *Client) CreateUnsignedTransaction(from types.Address, to types.Address, amount *hexutil.Big, data []byte) (types.UnsignedTransaction, error)
CreateUnsignedTransaction creates an unsigned transaction by parameters, and the other fields will be set to values fetched from conflux node.
func (*Client) DeployContract ¶
func (client *Client) DeployContract(option *types.ContractDeployOption, abiJSON []byte, bytecode []byte, constroctorParams ...interface{}) *ContractDeployResult
DeployContract deploys a contract by abiJSON, bytecode and consturctor params. It returns a ContractDeployState instance which contains 3 channels for notifying when state changed.
func (*Client) EstimateGasAndCollateral ¶
func (client *Client) EstimateGasAndCollateral(request types.CallRequest, epoch ...*types.Epoch) (estimat types.Estimate, err error)
EstimateGasAndCollateral excutes a message call "request" and returns the amount of the gas used and storage for collateral
func (*Client) GetAccountInfo ¶ added in v0.1.1
func (client *Client) GetAccountInfo(account types.Address, epoch ...*types.Epoch) (accountInfo types.AccountInfo, err error)
GetAccountInfo returns account related states of the given account
func (*Client) GetAccumulateInterestRate ¶ added in v0.1.1
func (client *Client) GetAccumulateInterestRate(epoch ...*types.Epoch) (intersetRate *hexutil.Big, err error)
GetAccumulateInterestRate returns accumulate interest rate of the given epoch
func (*Client) GetAdmin ¶ added in v0.1.1
func (client *Client) GetAdmin(contractAddress types.Address, epoch ...*types.Epoch) (admin *types.Address, err error)
GetAdmin returns admin of the given contract, it will return nil if contract not exist
func (*Client) GetBalance ¶
func (client *Client) GetBalance(address types.Address, epoch ...*types.Epoch) (balance *hexutil.Big, err error)
GetBalance returns the balance of specified address at epoch.
func (*Client) GetBestBlockHash ¶
GetBestBlockHash returns the current best block hash.
func (*Client) GetBlockByEpoch ¶
GetBlockByEpoch returns the block of specified epoch. If the epoch is invalid, return the concrete error.
func (*Client) GetBlockByHash ¶
GetBlockByHash returns the block of specified blockHash If the block is not found, return nil.
func (*Client) GetBlockByHashWithPivotAssumption ¶ added in v0.1.1
func (client *Client) GetBlockByHashWithPivotAssumption(blockHash types.Hash, pivotHash types.Hash, epoch hexutil.Uint64) (block types.Block, err error)
GetBlockByHashWithPivotAssumption returns block with given hash and pivot chain assumption.
func (*Client) GetBlockConfirmationRisk ¶ added in v0.1.1
GetBlockConfirmationRisk indicates the probability that the pivot block of the epoch where the block is located becomes a normal block.
it's (raw confirmation risk coefficient/ (2^256-1))
func (*Client) GetBlockRewardInfo ¶ added in v0.1.1
func (client *Client) GetBlockRewardInfo(epoch types.Epoch) (rewardInfo []types.RewardInfo, err error)
GetBlockRewardInfo returns block reward information in an epoch
func (*Client) GetBlockSummaryByEpoch ¶
func (client *Client) GetBlockSummaryByEpoch(epoch *types.Epoch) (blockSummary *types.BlockSummary, err error)
GetBlockSummaryByEpoch returns the block summary of specified epoch. If the epoch is invalid, return the concrete error.
func (*Client) GetBlockSummaryByHash ¶
func (client *Client) GetBlockSummaryByHash(blockHash types.Hash) (blockSummary *types.BlockSummary, err error)
GetBlockSummaryByHash returns the block summary of specified blockHash If the block is not found, return nil.
func (*Client) GetBlockTrace ¶ added in v0.4.10
func (client *Client) GetBlockTrace(blockHash types.Hash) (trace *types.LocalizedBlockTrace, err error)
GetBlockTrace returns all traces produced at given block.
func (*Client) GetBlocksByEpoch ¶
GetBlocksByEpoch returns the blocks hash in the specified epoch.
func (*Client) GetClientVersion ¶ added in v0.1.1
GetClientVersion returns the client version as a string
func (*Client) GetCode ¶
func (client *Client) GetCode(address types.Address, epoch ...*types.Epoch) (code hexutil.Bytes, err error)
GetCode returns the bytecode in HEX format of specified address at epoch.
func (*Client) GetCollateralForStorage ¶ added in v0.1.1
func (client *Client) GetCollateralForStorage(account types.Address, epoch ...*types.Epoch) (storage *hexutil.Big, err error)
GetCollateralForStorage returns balance of the given account.
func (*Client) GetContract ¶
GetContract creates a contract instance according to abi json and it's deployed address
func (*Client) GetDepositList ¶ added in v0.1.1
func (client *Client) GetDepositList(address types.Address, epoch ...*types.Epoch) (depositInfos []types.DepositInfo, err error)
GetDepositList returns deposit list of the given account.
func (*Client) GetEpochNumber ¶
GetEpochNumber returns the highest or specified epoch number.
func (*Client) GetGasPrice ¶
GetGasPrice returns the recent mean gas price.
func (*Client) GetInterestRate ¶ added in v0.1.1
GetInterestRate returns interest rate of the given epoch
func (*Client) GetNetworkID ¶ added in v0.1.1
GetNetworkID returns networkID of connecting conflux node
func (*Client) GetNextNonce ¶
func (client *Client) GetNextNonce(address types.Address, epoch ...*types.Epoch) (nonce *hexutil.Big, err error)
GetNextNonce returns the next transaction nonce of address
func (*Client) GetNodeURL ¶ added in v0.1.1
GetNodeURL returns node url
func (*Client) GetRawBlockConfirmationRisk ¶ added in v0.1.1
func (client *Client) GetRawBlockConfirmationRisk(blockhash types.Hash) (risk *hexutil.Big, err error)
GetRawBlockConfirmationRisk indicates the risk coefficient that the pivot block of the epoch where the block is located becomes a normal block. It will return nil if block not exist
func (*Client) GetSkippedBlocksByEpoch ¶ added in v0.1.1
func (client *Client) GetSkippedBlocksByEpoch(epoch *types.Epoch) (blockHashs []types.Hash, err error)
GetSkippedBlocksByEpoch returns skipped block hashes of given epoch
func (*Client) GetSponsorInfo ¶ added in v0.1.1
func (client *Client) GetSponsorInfo(contractAddress types.Address, epoch ...*types.Epoch) (sponsor types.SponsorInfo, err error)
GetSponsorInfo returns sponsor information of the given contract
func (*Client) GetStakingBalance ¶ added in v0.1.1
func (client *Client) GetStakingBalance(account types.Address, epoch ...*types.Epoch) (balance *hexutil.Big, err error)
GetStakingBalance returns balance of the given account.
func (*Client) GetStorageAt ¶ added in v0.1.1
func (client *Client) GetStorageAt(address types.Address, position types.Hash, epoch ...*types.Epoch) (storageEntries hexutil.Bytes, err error)
GetStorageAt returns storage entries from a given contract.
func (*Client) GetStorageRoot ¶ added in v0.1.1
func (client *Client) GetStorageRoot(address types.Address, epoch ...*types.Epoch) (storageRoot *types.StorageRoot, err error)
GetStorageRoot returns storage root of given address
func (*Client) GetSupplyInfo ¶ added in v0.1.1
GetSupplyInfo Return information about total token supply.
func (*Client) GetTransactionByHash ¶
GetTransactionByHash returns transaction for the specified txHash. If the transaction is not found, return nil.
func (*Client) GetTransactionReceipt ¶
func (client *Client) GetTransactionReceipt(txHash types.Hash) (receipt *types.TransactionReceipt, err error)
GetTransactionReceipt returns the receipt of specified transaction hash. If no receipt is found, return nil.
func (*Client) GetVoteList ¶ added in v0.1.1
func (client *Client) GetVoteList(address types.Address, epoch ...*types.Epoch) (voteStakeInfos []types.VoteStakeInfo, err error)
GetVoteList returns vote list of the given account.
func (*Client) MustNewAddress ¶ added in v0.1.1
MustNewAddress create conflux address by base32 string or hex40 string, if base32OrHex is base32 and networkID is setted it will check if networkID match. it will painc if error occured.
func (*Client) NewAddress ¶ added in v0.1.1
NewAddress create conflux address by base32 string or hex40 string, if base32OrHex is base32 and networkID is setted it will check if networkID match.
func (*Client) SendRawTransaction ¶
SendRawTransaction sends signed transaction and returns its hash.
func (*Client) SendTransaction ¶
SendTransaction signs and sends transaction to conflux node and returns the transaction hash.
func (*Client) SetAccountManager ¶
func (client *Client) SetAccountManager(accountManager AccountManagerOperator)
SetAccountManager sets account manager for sign transaction
func (*Client) SignEncodedTransactionAndSend ¶
func (client *Client) SignEncodedTransactionAndSend(encodedTx []byte, v byte, r, s []byte) (*types.Transaction, error)
SignEncodedTransactionAndSend signs RLP encoded transaction "encodedTx" by signature "r,s,v" and sends it to node, and returns responsed transaction.
func (*Client) SubscribeEpochs ¶ added in v0.1.1
func (client *Client) SubscribeEpochs(channel chan types.WebsocketEpochResponse) (*rpc.ClientSubscription, error)
SubscribeEpochs subscribes consensus results: the total order of blocks, as expressed by a sequence of epochs.
func (*Client) SubscribeLogs ¶ added in v0.1.1
func (client *Client) SubscribeLogs(logChannel chan types.Log, chainReorgChannel chan types.ChainReorg, filter types.LogFilter) (*rpc.ClientSubscription, error)
SubscribeLogs subscribes all logs matching a certain filter, in order.
func (*Client) SubscribeNewHeads ¶ added in v0.1.1
func (client *Client) SubscribeNewHeads(channel chan types.BlockHeader) (*rpc.ClientSubscription, error)
SubscribeNewHeads subscribes all new block headers participating in the consensus.
func (*Client) WaitForTransationBePacked ¶ added in v0.1.1
func (client *Client) WaitForTransationBePacked(txhash types.Hash, duration time.Duration) (*types.Transaction, error)
WaitForTransationBePacked returns transaction when it is packed
func (*Client) WaitForTransationReceipt ¶ added in v0.1.1
func (client *Client) WaitForTransationReceipt(txhash types.Hash, duration time.Duration) (*types.TransactionReceipt, error)
WaitForTransationReceipt waits for transaction receipt valid
type ClientOperator ¶
type ClientOperator interface { NewAddress(base32OrHex string) (types.Address, error) MustNewAddress(base32OrHex string) types.Address GetGasPrice() (*hexutil.Big, error) GetNextNonce(address types.Address, epoch ...*types.Epoch) (*hexutil.Big, error) GetStatus() (types.Status, error) GetNetworkID() (uint32, error) GetEpochNumber(epoch ...*types.Epoch) (*hexutil.Big, error) GetBalance(address types.Address, epoch ...*types.Epoch) (*hexutil.Big, error) GetCode(address types.Address, epoch ...*types.Epoch) (hexutil.Bytes, error) GetBlockSummaryByHash(blockHash types.Hash) (*types.BlockSummary, error) GetBlockByHash(blockHash types.Hash) (*types.Block, error) GetBlockSummaryByEpoch(epoch *types.Epoch) (*types.BlockSummary, error) GetBlockByEpoch(epoch *types.Epoch) (*types.Block, error) GetBestBlockHash() (types.Hash, error) GetRawBlockConfirmationRisk(blockhash types.Hash) (*hexutil.Big, error) GetBlockConfirmationRisk(blockHash types.Hash) (*big.Float, error) SendRawTransaction(rawData []byte) (types.Hash, error) SendTransaction(tx types.UnsignedTransaction) (types.Hash, error) SetAccountManager(accountManager AccountManagerOperator) SignEncodedTransactionAndSend(encodedTx []byte, v byte, r, s []byte) (*types.Transaction, error) Call(request types.CallRequest, epoch *types.Epoch) (hexutil.Bytes, error) CallRPC(result interface{}, method string, args ...interface{}) error BatchCallRPC(b []rpc.BatchElem) error GetLogs(filter types.LogFilter) ([]types.Log, error) GetTransactionByHash(txHash types.Hash) (*types.Transaction, error) EstimateGasAndCollateral(request types.CallRequest, epoch ...*types.Epoch) (types.Estimate, error) GetBlocksByEpoch(epoch *types.Epoch) ([]types.Hash, error) GetTransactionReceipt(txHash types.Hash) (*types.TransactionReceipt, error) CreateUnsignedTransaction(from types.Address, to types.Address, amount *hexutil.Big, data []byte) (types.UnsignedTransaction, error) ApplyUnsignedTransactionDefault(tx *types.UnsignedTransaction) error Close() GetContract(abiJSON []byte, deployedAt *types.Address) (*Contract, error) // DeployContract(abiJSON string, bytecode []byte, option *types.ContractDeployOption, timeout time.Duration, callback func(deployedContract Contractor, hash *types.Hash, err error)) <-chan struct{} DeployContract(option *types.ContractDeployOption, abiJSON []byte, bytecode []byte, constroctorParams ...interface{}) *ContractDeployResult BatchGetTxByHashes(txhashes []types.Hash) (map[types.Hash]*types.Transaction, error) BatchGetBlockConfirmationRisk(blockhashes []types.Hash) (map[types.Hash]*big.Float, error) BatchGetRawBlockConfirmationRisk(blockhashes []types.Hash) (map[types.Hash]*big.Int, error) BatchGetBlockSummarys(blockhashes []types.Hash) (map[types.Hash]*types.BlockSummary, error) GetNodeURL() string GetAdmin(contractAddress types.Address, epoch ...*types.Epoch) (admin *types.Address, err error) GetSponsorInfo(contractAddress types.Address, epoch ...*types.Epoch) (sponsor types.SponsorInfo, err error) GetStakingBalance(account types.Address, epoch ...*types.Epoch) (balance *hexutil.Big, err error) GetCollateralForStorage(account types.Address, epoch ...*types.Epoch) (storage *hexutil.Big, err error) GetStorageAt(address types.Address, position types.Hash, epoch ...*types.Epoch) (storageEntries hexutil.Bytes, err error) GetStorageRoot(address types.Address, epoch ...*types.Epoch) (storageRoot *types.StorageRoot, err error) GetBlockByHashWithPivotAssumption(blockHash types.Hash, pivotHash types.Hash, epoch hexutil.Uint64) (block types.Block, err error) CheckBalanceAgainstTransaction(accountAddress types.Address, contractAddress types.Address, gasLimit *hexutil.Big, gasPrice *hexutil.Big, storageLimit *hexutil.Big, epoch ...*types.Epoch) (response types.CheckBalanceAgainstTransactionResponse, err error) GetSkippedBlocksByEpoch(epoch *types.Epoch) (blockHashs []types.Hash, err error) GetAccountInfo(account types.Address, epoch ...*types.Epoch) (accountInfo types.AccountInfo, err error) GetInterestRate(epoch ...*types.Epoch) (intersetRate *hexutil.Big, err error) GetAccumulateInterestRate(epoch ...*types.Epoch) (intersetRate *hexutil.Big, err error) GetBlockRewardInfo(epoch types.Epoch) (rewardInfo []types.RewardInfo, err error) GetClientVersion() (clientVersion string, err error) WaitForTransationBePacked(txhash types.Hash, duration time.Duration) (*types.Transaction, error) WaitForTransationReceipt(txhash types.Hash, duration time.Duration) (*types.TransactionReceipt, error) GetDepositList(address types.Address, epoch ...*types.Epoch) ([]types.DepositInfo, error) GetVoteList(address types.Address, epoch ...*types.Epoch) ([]types.VoteStakeInfo, error) GetBlockTrace(blockHash types.Hash) (*types.LocalizedBlockTrace, error) }
ClientOperator is interface of operate actions on client
type ClientOption ¶ added in v0.1.1
ClientOption for set keystore path and flags for retry
type Contract ¶
type Contract struct { ABI abi.ABI Client ClientOperator Address *types.Address }
Contract represents a smart contract. You can conveniently create contract by Client.GetContract or Client.DeployContract.
func NewContract ¶ added in v0.1.1
NewContract creates contract by abi and deployed address
func (*Contract) Call ¶
func (contract *Contract) Call(option *types.ContractMethodCallOption, resultPtr interface{}, method string, args ...interface{}) error
Call calls to the contract method with args and fills the excuted result to the "resultPtr".
the resultPtr should be a pointer of the method output struct type.
please refer https://github.com/Conflux-Chain/go-conflux-sdk/blob/master/README.md to get the mappings of solidity types to go types
func (*Contract) DecodeEvent ¶ added in v0.1.1
DecodeEvent unpacks a retrieved log into the provided output structure.
please refer https://github.com/Conflux-Chain/go-conflux-sdk/blob/master/README.md to get the mappings of solidity types to go types
func (*Contract) GetData ¶
GetData packs the given method name to conform the ABI of the contract. Method call's data will consist of method_id, args0, arg1, ... argN. Method id consists of 4 bytes and arguments are all 32 bytes. Method ids are created from the first 4 bytes of the hash of the methods string signature. (signature = baz(uint32,string32))
please refer https://github.com/Conflux-Chain/go-conflux-sdk/blob/master/README.md to get the mappings of solidity types to go types
func (*Contract) SendTransaction ¶
func (contract *Contract) SendTransaction(option *types.ContractMethodSendOption, method string, args ...interface{}) (types.Hash, error)
SendTransaction sends a transaction to the contract method with args and returns its transaction hash
please refer https://github.com/Conflux-Chain/go-conflux-sdk/blob/master/README.md to get the mappings of solidity types to go types
type ContractDeployResult ¶ added in v0.1.1
type ContractDeployResult struct { //DoneChannel channel for notifying when contract deployed done DoneChannel <-chan struct{} TransactionHash *types.Hash Error error DeployedContract *Contract }
ContractDeployResult for state change notification when deploying contract
type Contractor ¶
type Contractor interface { GetData(method string, args ...interface{}) ([]byte, error) Call(option *types.ContractMethodCallOption, resultPtr interface{}, method string, args ...interface{}) error SendTransaction(option *types.ContractMethodSendOption, method string, args ...interface{}) (types.Hash, error) DecodeEvent(out interface{}, event string, log types.Log) error }
Contractor is interface of contract operator
type HTTPRequester ¶
HTTPRequester is interface for emitting a http requester
type MockAccountManagerOperator ¶ added in v0.3.2
type MockAccountManagerOperator struct {
// contains filtered or unexported fields
}
MockAccountManagerOperator is a mock of AccountManagerOperator interface
func NewMockAccountManagerOperator ¶ added in v0.3.2
func NewMockAccountManagerOperator(ctrl *gomock.Controller) *MockAccountManagerOperator
NewMockAccountManagerOperator creates a new mock instance
func (*MockAccountManagerOperator) Create ¶ added in v0.3.2
func (m *MockAccountManagerOperator) Create(passphrase string) (types.Address, error)
Create mocks base method
func (*MockAccountManagerOperator) Delete ¶ added in v0.3.2
func (m *MockAccountManagerOperator) Delete(address types.Address, passphrase string) error
Delete mocks base method
func (*MockAccountManagerOperator) EXPECT ¶ added in v0.3.2
func (m *MockAccountManagerOperator) EXPECT() *MockAccountManagerOperatorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockAccountManagerOperator) GetDefault ¶ added in v0.3.2
func (m *MockAccountManagerOperator) GetDefault() (*types.Address, error)
GetDefault mocks base method
func (*MockAccountManagerOperator) Import ¶ added in v0.3.2
func (m *MockAccountManagerOperator) Import(keyFile, passphrase, newPassphrase string) (types.Address, error)
Import mocks base method
func (*MockAccountManagerOperator) List ¶ added in v0.3.2
func (m *MockAccountManagerOperator) List() []types.Address
List mocks base method
func (*MockAccountManagerOperator) Lock ¶ added in v0.3.2
func (m *MockAccountManagerOperator) Lock(address types.Address) error
Lock mocks base method
func (*MockAccountManagerOperator) Sign ¶ added in v0.3.2
func (m *MockAccountManagerOperator) Sign(tx types.UnsignedTransaction, passphrase string) (byte, []byte, []byte, error)
Sign mocks base method
func (*MockAccountManagerOperator) SignAndEcodeTransactionWithPassphrase ¶ added in v0.3.2
func (m *MockAccountManagerOperator) SignAndEcodeTransactionWithPassphrase(tx types.UnsignedTransaction, passphrase string) ([]byte, error)
SignAndEcodeTransactionWithPassphrase mocks base method
func (*MockAccountManagerOperator) SignTransaction ¶ added in v0.3.2
func (m *MockAccountManagerOperator) SignTransaction(tx types.UnsignedTransaction) ([]byte, error)
SignTransaction mocks base method
func (*MockAccountManagerOperator) SignTransactionWithPassphrase ¶ added in v0.3.2
func (m *MockAccountManagerOperator) SignTransactionWithPassphrase(tx types.UnsignedTransaction, passphrase string) (*types.SignedTransaction, error)
SignTransactionWithPassphrase mocks base method
func (*MockAccountManagerOperator) TimedUnlock ¶ added in v0.3.2
func (m *MockAccountManagerOperator) TimedUnlock(address types.Address, passphrase string, timeout time.Duration) error
TimedUnlock mocks base method
func (*MockAccountManagerOperator) TimedUnlockDefault ¶ added in v0.3.2
func (m *MockAccountManagerOperator) TimedUnlockDefault(passphrase string, timeout time.Duration) error
TimedUnlockDefault mocks base method
func (*MockAccountManagerOperator) Unlock ¶ added in v0.3.2
func (m *MockAccountManagerOperator) Unlock(address types.Address, passphrase string) error
Unlock mocks base method
func (*MockAccountManagerOperator) UnlockDefault ¶ added in v0.3.2
func (m *MockAccountManagerOperator) UnlockDefault(passphrase string) error
UnlockDefault mocks base method
type MockAccountManagerOperatorMockRecorder ¶ added in v0.3.2
type MockAccountManagerOperatorMockRecorder struct {
// contains filtered or unexported fields
}
MockAccountManagerOperatorMockRecorder is the mock recorder for MockAccountManagerOperator
func (*MockAccountManagerOperatorMockRecorder) Create ¶ added in v0.3.2
func (mr *MockAccountManagerOperatorMockRecorder) Create(passphrase interface{}) *gomock.Call
Create indicates an expected call of Create
func (*MockAccountManagerOperatorMockRecorder) Delete ¶ added in v0.3.2
func (mr *MockAccountManagerOperatorMockRecorder) Delete(address, passphrase interface{}) *gomock.Call
Delete indicates an expected call of Delete
func (*MockAccountManagerOperatorMockRecorder) GetDefault ¶ added in v0.3.2
func (mr *MockAccountManagerOperatorMockRecorder) GetDefault() *gomock.Call
GetDefault indicates an expected call of GetDefault
func (*MockAccountManagerOperatorMockRecorder) Import ¶ added in v0.3.2
func (mr *MockAccountManagerOperatorMockRecorder) Import(keyFile, passphrase, newPassphrase interface{}) *gomock.Call
Import indicates an expected call of Import
func (*MockAccountManagerOperatorMockRecorder) List ¶ added in v0.3.2
func (mr *MockAccountManagerOperatorMockRecorder) List() *gomock.Call
List indicates an expected call of List
func (*MockAccountManagerOperatorMockRecorder) Lock ¶ added in v0.3.2
func (mr *MockAccountManagerOperatorMockRecorder) Lock(address interface{}) *gomock.Call
Lock indicates an expected call of Lock
func (*MockAccountManagerOperatorMockRecorder) Sign ¶ added in v0.3.2
func (mr *MockAccountManagerOperatorMockRecorder) Sign(tx, passphrase interface{}) *gomock.Call
Sign indicates an expected call of Sign
func (*MockAccountManagerOperatorMockRecorder) SignAndEcodeTransactionWithPassphrase ¶ added in v0.3.2
func (mr *MockAccountManagerOperatorMockRecorder) SignAndEcodeTransactionWithPassphrase(tx, passphrase interface{}) *gomock.Call
SignAndEcodeTransactionWithPassphrase indicates an expected call of SignAndEcodeTransactionWithPassphrase
func (*MockAccountManagerOperatorMockRecorder) SignTransaction ¶ added in v0.3.2
func (mr *MockAccountManagerOperatorMockRecorder) SignTransaction(tx interface{}) *gomock.Call
SignTransaction indicates an expected call of SignTransaction
func (*MockAccountManagerOperatorMockRecorder) SignTransactionWithPassphrase ¶ added in v0.3.2
func (mr *MockAccountManagerOperatorMockRecorder) SignTransactionWithPassphrase(tx, passphrase interface{}) *gomock.Call
SignTransactionWithPassphrase indicates an expected call of SignTransactionWithPassphrase
func (*MockAccountManagerOperatorMockRecorder) TimedUnlock ¶ added in v0.3.2
func (mr *MockAccountManagerOperatorMockRecorder) TimedUnlock(address, passphrase, timeout interface{}) *gomock.Call
TimedUnlock indicates an expected call of TimedUnlock
func (*MockAccountManagerOperatorMockRecorder) TimedUnlockDefault ¶ added in v0.3.2
func (mr *MockAccountManagerOperatorMockRecorder) TimedUnlockDefault(passphrase, timeout interface{}) *gomock.Call
TimedUnlockDefault indicates an expected call of TimedUnlockDefault
func (*MockAccountManagerOperatorMockRecorder) Unlock ¶ added in v0.3.2
func (mr *MockAccountManagerOperatorMockRecorder) Unlock(address, passphrase interface{}) *gomock.Call
Unlock indicates an expected call of Unlock
func (*MockAccountManagerOperatorMockRecorder) UnlockDefault ¶ added in v0.3.2
func (mr *MockAccountManagerOperatorMockRecorder) UnlockDefault(passphrase interface{}) *gomock.Call
UnlockDefault indicates an expected call of UnlockDefault
func (*MockAccountManagerOperatorMockRecorder) Update ¶ added in v0.3.2
func (mr *MockAccountManagerOperatorMockRecorder) Update(address, passphrase, newPassphrase interface{}) *gomock.Call
Update indicates an expected call of Update
type MockClientOperator ¶ added in v0.3.2
type MockClientOperator struct {
// contains filtered or unexported fields
}
MockClientOperator is a mock of ClientOperator interface
func NewMockClientOperator ¶ added in v0.3.2
func NewMockClientOperator(ctrl *gomock.Controller) *MockClientOperator
NewMockClientOperator creates a new mock instance
func (*MockClientOperator) ApplyUnsignedTransactionDefault ¶ added in v0.3.2
func (m *MockClientOperator) ApplyUnsignedTransactionDefault(tx *types.UnsignedTransaction) error
ApplyUnsignedTransactionDefault mocks base method
func (*MockClientOperator) BatchCallRPC ¶ added in v0.3.2
func (m *MockClientOperator) BatchCallRPC(b []rpc.BatchElem) error
BatchCallRPC mocks base method
func (*MockClientOperator) BatchGetBlockConfirmationRisk ¶ added in v0.3.2
func (m *MockClientOperator) BatchGetBlockConfirmationRisk(blockhashes []types.Hash) (map[types.Hash]*big.Float, error)
BatchGetBlockConfirmationRisk mocks base method
func (*MockClientOperator) BatchGetBlockSummarys ¶ added in v0.3.2
func (m *MockClientOperator) BatchGetBlockSummarys(blockhashes []types.Hash) (map[types.Hash]*types.BlockSummary, error)
BatchGetBlockSummarys mocks base method
func (*MockClientOperator) BatchGetRawBlockConfirmationRisk ¶ added in v0.3.2
func (m *MockClientOperator) BatchGetRawBlockConfirmationRisk(blockhashes []types.Hash) (map[types.Hash]*big.Int, error)
BatchGetRawBlockConfirmationRisk mocks base method
func (*MockClientOperator) BatchGetTxByHashes ¶ added in v0.3.2
func (m *MockClientOperator) BatchGetTxByHashes(txhashes []types.Hash) (map[types.Hash]*types.Transaction, error)
BatchGetTxByHashes mocks base method
func (*MockClientOperator) Call ¶ added in v0.3.2
func (m *MockClientOperator) Call(request types.CallRequest, epoch *types.Epoch) (*string, error)
Call mocks base method
func (*MockClientOperator) CallRPC ¶ added in v0.3.2
func (m *MockClientOperator) CallRPC(result interface{}, method string, args ...interface{}) error
CallRPC mocks base method
func (*MockClientOperator) Close ¶ added in v0.3.2
func (m *MockClientOperator) Close()
Close mocks base method
func (*MockClientOperator) CreateUnsignedTransaction ¶ added in v0.3.2
func (m *MockClientOperator) CreateUnsignedTransaction(from, to types.Address, amount *hexutil.Big, data []byte) (*types.UnsignedTransaction, error)
CreateUnsignedTransaction mocks base method
func (*MockClientOperator) Debug ¶ added in v0.3.2
func (m *MockClientOperator) Debug(method string, args ...interface{}) (interface{}, error)
Debug mocks base method
func (*MockClientOperator) DeployContract ¶ added in v0.3.2
func (m *MockClientOperator) DeployContract(option *types.ContractDeployOption, abiJSON, bytecode []byte, constroctorParams ...interface{}) *ContractDeployResult
DeployContract mocks base method
func (*MockClientOperator) EXPECT ¶ added in v0.3.2
func (m *MockClientOperator) EXPECT() *MockClientOperatorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockClientOperator) EstimateGasAndCollateral ¶ added in v0.3.2
func (m *MockClientOperator) EstimateGasAndCollateral(request types.CallRequest) (*types.Estimate, error)
EstimateGasAndCollateral mocks base method
func (*MockClientOperator) GetBalance ¶ added in v0.3.2
func (m *MockClientOperator) GetBalance(address types.Address, epoch ...*types.Epoch) (*big.Int, error)
GetBalance mocks base method
func (*MockClientOperator) GetBestBlockHash ¶ added in v0.3.2
func (m *MockClientOperator) GetBestBlockHash() (types.Hash, error)
GetBestBlockHash mocks base method
func (*MockClientOperator) GetBlockByEpoch ¶ added in v0.3.2
GetBlockByEpoch mocks base method
func (*MockClientOperator) GetBlockByHash ¶ added in v0.3.2
GetBlockByHash mocks base method
func (*MockClientOperator) GetBlockConfirmationRisk ¶ added in v0.3.2
GetBlockConfirmationRisk mocks base method
func (*MockClientOperator) GetBlockSummaryByEpoch ¶ added in v0.3.2
func (m *MockClientOperator) GetBlockSummaryByEpoch(epoch *types.Epoch) (*types.BlockSummary, error)
GetBlockSummaryByEpoch mocks base method
func (*MockClientOperator) GetBlockSummaryByHash ¶ added in v0.3.2
func (m *MockClientOperator) GetBlockSummaryByHash(blockHash types.Hash) (*types.BlockSummary, error)
GetBlockSummaryByHash mocks base method
func (*MockClientOperator) GetBlocksByEpoch ¶ added in v0.3.2
GetBlocksByEpoch mocks base method
func (*MockClientOperator) GetContract ¶ added in v0.3.2
func (m *MockClientOperator) GetContract(abiJSON []byte, deployedAt *types.Address) (*Contract, error)
GetContract mocks base method
func (*MockClientOperator) GetEpochNumber ¶ added in v0.3.2
GetEpochNumber mocks base method
func (*MockClientOperator) GetGasPrice ¶ added in v0.3.2
func (m *MockClientOperator) GetGasPrice() (*big.Int, error)
GetGasPrice mocks base method
func (*MockClientOperator) GetNodeURL ¶ added in v0.3.2
func (m *MockClientOperator) GetNodeURL() string
GetNodeURL mocks base method
func (*MockClientOperator) GetRawBlockConfirmationRisk ¶ added in v0.3.2
GetRawBlockConfirmationRisk mocks base method
func (*MockClientOperator) GetTransactionByHash ¶ added in v0.3.2
func (m *MockClientOperator) GetTransactionByHash(txHash types.Hash) (*types.Transaction, error)
GetTransactionByHash mocks base method
func (*MockClientOperator) GetTransactionReceipt ¶ added in v0.3.2
func (m *MockClientOperator) GetTransactionReceipt(txHash types.Hash) (*types.TransactionReceipt, error)
GetTransactionReceipt mocks base method
func (*MockClientOperator) SendRawTransaction ¶ added in v0.3.2
func (m *MockClientOperator) SendRawTransaction(rawData []byte) (types.Hash, error)
SendRawTransaction mocks base method
func (*MockClientOperator) SendTransaction ¶ added in v0.3.2
func (m *MockClientOperator) SendTransaction(tx *types.UnsignedTransaction) (types.Hash, error)
SendTransaction mocks base method
func (*MockClientOperator) SetAccountManager ¶ added in v0.3.2
func (m *MockClientOperator) SetAccountManager(accountManager AccountManagerOperator)
SetAccountManager mocks base method
func (*MockClientOperator) SignEncodedTransactionAndSend ¶ added in v0.3.2
func (m *MockClientOperator) SignEncodedTransactionAndSend(encodedTx []byte, v byte, r, s []byte) (*types.Transaction, error)
SignEncodedTransactionAndSend mocks base method
type MockClientOperatorMockRecorder ¶ added in v0.3.2
type MockClientOperatorMockRecorder struct {
// contains filtered or unexported fields
}
MockClientOperatorMockRecorder is the mock recorder for MockClientOperator
func (*MockClientOperatorMockRecorder) ApplyUnsignedTransactionDefault ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) ApplyUnsignedTransactionDefault(tx interface{}) *gomock.Call
ApplyUnsignedTransactionDefault indicates an expected call of ApplyUnsignedTransactionDefault
func (*MockClientOperatorMockRecorder) BatchCallRPC ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) BatchCallRPC(b interface{}) *gomock.Call
BatchCallRPC indicates an expected call of BatchCallRPC
func (*MockClientOperatorMockRecorder) BatchGetBlockConfirmationRisk ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) BatchGetBlockConfirmationRisk(blockhashes interface{}) *gomock.Call
BatchGetBlockConfirmationRisk indicates an expected call of BatchGetBlockConfirmationRisk
func (*MockClientOperatorMockRecorder) BatchGetBlockSummarys ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) BatchGetBlockSummarys(blockhashes interface{}) *gomock.Call
BatchGetBlockSummarys indicates an expected call of BatchGetBlockSummarys
func (*MockClientOperatorMockRecorder) BatchGetRawBlockConfirmationRisk ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) BatchGetRawBlockConfirmationRisk(blockhashes interface{}) *gomock.Call
BatchGetRawBlockConfirmationRisk indicates an expected call of BatchGetRawBlockConfirmationRisk
func (*MockClientOperatorMockRecorder) BatchGetTxByHashes ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) BatchGetTxByHashes(txhashes interface{}) *gomock.Call
BatchGetTxByHashes indicates an expected call of BatchGetTxByHashes
func (*MockClientOperatorMockRecorder) Call ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) Call(request, epoch interface{}) *gomock.Call
Call indicates an expected call of Call
func (*MockClientOperatorMockRecorder) CallRPC ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) CallRPC(result, method interface{}, args ...interface{}) *gomock.Call
CallRPC indicates an expected call of CallRPC
func (*MockClientOperatorMockRecorder) Close ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockClientOperatorMockRecorder) CreateUnsignedTransaction ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) CreateUnsignedTransaction(from, to, amount, data interface{}) *gomock.Call
CreateUnsignedTransaction indicates an expected call of CreateUnsignedTransaction
func (*MockClientOperatorMockRecorder) Debug ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) Debug(method interface{}, args ...interface{}) *gomock.Call
Debug indicates an expected call of Debug
func (*MockClientOperatorMockRecorder) DeployContract ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) DeployContract(option, abiJSON, bytecode interface{}, constroctorParams ...interface{}) *gomock.Call
DeployContract indicates an expected call of DeployContract
func (*MockClientOperatorMockRecorder) EstimateGasAndCollateral ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) EstimateGasAndCollateral(request interface{}) *gomock.Call
EstimateGasAndCollateral indicates an expected call of EstimateGasAndCollateral
func (*MockClientOperatorMockRecorder) GetBalance ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) GetBalance(address interface{}, epoch ...interface{}) *gomock.Call
GetBalance indicates an expected call of GetBalance
func (*MockClientOperatorMockRecorder) GetBestBlockHash ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) GetBestBlockHash() *gomock.Call
GetBestBlockHash indicates an expected call of GetBestBlockHash
func (*MockClientOperatorMockRecorder) GetBlockByEpoch ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) GetBlockByEpoch(epoch interface{}) *gomock.Call
GetBlockByEpoch indicates an expected call of GetBlockByEpoch
func (*MockClientOperatorMockRecorder) GetBlockByHash ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) GetBlockByHash(blockHash interface{}) *gomock.Call
GetBlockByHash indicates an expected call of GetBlockByHash
func (*MockClientOperatorMockRecorder) GetBlockConfirmationRisk ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) GetBlockConfirmationRisk(blockHash interface{}) *gomock.Call
GetBlockConfirmationRisk indicates an expected call of GetBlockConfirmationRisk
func (*MockClientOperatorMockRecorder) GetBlockSummaryByEpoch ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) GetBlockSummaryByEpoch(epoch interface{}) *gomock.Call
GetBlockSummaryByEpoch indicates an expected call of GetBlockSummaryByEpoch
func (*MockClientOperatorMockRecorder) GetBlockSummaryByHash ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) GetBlockSummaryByHash(blockHash interface{}) *gomock.Call
GetBlockSummaryByHash indicates an expected call of GetBlockSummaryByHash
func (*MockClientOperatorMockRecorder) GetBlocksByEpoch ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) GetBlocksByEpoch(epoch interface{}) *gomock.Call
GetBlocksByEpoch indicates an expected call of GetBlocksByEpoch
func (*MockClientOperatorMockRecorder) GetCode ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) GetCode(address interface{}, epoch ...interface{}) *gomock.Call
GetCode indicates an expected call of GetCode
func (*MockClientOperatorMockRecorder) GetContract ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) GetContract(abiJSON, deployedAt interface{}) *gomock.Call
GetContract indicates an expected call of GetContract
func (*MockClientOperatorMockRecorder) GetEpochNumber ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) GetEpochNumber(epoch ...interface{}) *gomock.Call
GetEpochNumber indicates an expected call of GetEpochNumber
func (*MockClientOperatorMockRecorder) GetGasPrice ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) GetGasPrice() *gomock.Call
GetGasPrice indicates an expected call of GetGasPrice
func (*MockClientOperatorMockRecorder) GetLogs ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) GetLogs(filter interface{}) *gomock.Call
GetLogs indicates an expected call of GetLogs
func (*MockClientOperatorMockRecorder) GetNodeURL ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) GetNodeURL() *gomock.Call
GetNodeURL indicates an expected call of GetNodeURL
func (*MockClientOperatorMockRecorder) GetRawBlockConfirmationRisk ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) GetRawBlockConfirmationRisk(blockhash interface{}) *gomock.Call
GetRawBlockConfirmationRisk indicates an expected call of GetRawBlockConfirmationRisk
func (*MockClientOperatorMockRecorder) GetTransactionByHash ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) GetTransactionByHash(txHash interface{}) *gomock.Call
GetTransactionByHash indicates an expected call of GetTransactionByHash
func (*MockClientOperatorMockRecorder) GetTransactionReceipt ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) GetTransactionReceipt(txHash interface{}) *gomock.Call
GetTransactionReceipt indicates an expected call of GetTransactionReceipt
func (*MockClientOperatorMockRecorder) SendRawTransaction ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) SendRawTransaction(rawData interface{}) *gomock.Call
SendRawTransaction indicates an expected call of SendRawTransaction
func (*MockClientOperatorMockRecorder) SendTransaction ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) SendTransaction(tx interface{}) *gomock.Call
SendTransaction indicates an expected call of SendTransaction
func (*MockClientOperatorMockRecorder) SetAccountManager ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) SetAccountManager(accountManager interface{}) *gomock.Call
SetAccountManager indicates an expected call of SetAccountManager
func (*MockClientOperatorMockRecorder) SignEncodedTransactionAndSend ¶ added in v0.3.2
func (mr *MockClientOperatorMockRecorder) SignEncodedTransactionAndSend(encodedTx, v, r, s interface{}) *gomock.Call
SignEncodedTransactionAndSend indicates an expected call of SignEncodedTransactionAndSend
type MockContractor ¶ added in v0.3.2
type MockContractor struct {
// contains filtered or unexported fields
}
MockContractor is a mock of Contractor interface
func NewMockContractor ¶ added in v0.3.2
func NewMockContractor(ctrl *gomock.Controller) *MockContractor
NewMockContractor creates a new mock instance
func (*MockContractor) Call ¶ added in v0.3.2
func (m *MockContractor) Call(option *types.ContractMethodCallOption, resultPtr interface{}, method string, args ...interface{}) error
Call mocks base method
func (*MockContractor) DecodeEvent ¶ added in v0.3.2
func (m *MockContractor) DecodeEvent(out interface{}, event string, log types.Log) error
DecodeEvent mocks base method
func (*MockContractor) EXPECT ¶ added in v0.3.2
func (m *MockContractor) EXPECT() *MockContractorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockContractor) GetData ¶ added in v0.3.2
func (m *MockContractor) GetData(method string, args ...interface{}) ([]byte, error)
GetData mocks base method
func (*MockContractor) SendTransaction ¶ added in v0.3.2
func (m *MockContractor) SendTransaction(option *types.ContractMethodSendOption, method string, args ...interface{}) (*types.Hash, error)
SendTransaction mocks base method
type MockContractorMockRecorder ¶ added in v0.3.2
type MockContractorMockRecorder struct {
// contains filtered or unexported fields
}
MockContractorMockRecorder is the mock recorder for MockContractor
func (*MockContractorMockRecorder) Call ¶ added in v0.3.2
func (mr *MockContractorMockRecorder) Call(option, resultPtr, method interface{}, args ...interface{}) *gomock.Call
Call indicates an expected call of Call
func (*MockContractorMockRecorder) DecodeEvent ¶ added in v0.3.2
func (mr *MockContractorMockRecorder) DecodeEvent(out, event, log interface{}) *gomock.Call
DecodeEvent indicates an expected call of DecodeEvent
func (*MockContractorMockRecorder) GetData ¶ added in v0.3.2
func (mr *MockContractorMockRecorder) GetData(method interface{}, args ...interface{}) *gomock.Call
GetData indicates an expected call of GetData
func (*MockContractorMockRecorder) SendTransaction ¶ added in v0.3.2
func (mr *MockContractorMockRecorder) SendTransaction(option, method interface{}, args ...interface{}) *gomock.Call
SendTransaction indicates an expected call of SendTransaction
type MockHTTPRequester ¶ added in v0.3.2
type MockHTTPRequester struct {
// contains filtered or unexported fields
}
MockHTTPRequester is a mock of HTTPRequester interface
func NewMockHTTPRequester ¶ added in v0.3.2
func NewMockHTTPRequester(ctrl *gomock.Controller) *MockHTTPRequester
NewMockHTTPRequester creates a new mock instance
func (*MockHTTPRequester) EXPECT ¶ added in v0.3.2
func (m *MockHTTPRequester) EXPECT() *MockHTTPRequesterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockHTTPRequesterMockRecorder ¶ added in v0.3.2
type MockHTTPRequesterMockRecorder struct {
// contains filtered or unexported fields
}
MockHTTPRequesterMockRecorder is the mock recorder for MockHTTPRequester
func (*MockHTTPRequesterMockRecorder) Get ¶ added in v0.3.2
func (mr *MockHTTPRequesterMockRecorder) Get(url interface{}) *gomock.Call
Get indicates an expected call of Get
type MockrpcRequester ¶ added in v0.3.2
type MockrpcRequester struct {
// contains filtered or unexported fields
}
MockrpcRequester is a mock of rpcRequester interface
func NewMockrpcRequester ¶ added in v0.3.2
func NewMockrpcRequester(ctrl *gomock.Controller) *MockrpcRequester
NewMockrpcRequester creates a new mock instance
func (*MockrpcRequester) BatchCall ¶ added in v0.3.2
func (m *MockrpcRequester) BatchCall(b []rpc.BatchElem) error
BatchCall mocks base method
func (*MockrpcRequester) Call ¶ added in v0.3.2
func (m *MockrpcRequester) Call(resultPtr interface{}, method string, args ...interface{}) error
Call mocks base method
func (*MockrpcRequester) Close ¶ added in v0.3.2
func (m *MockrpcRequester) Close()
Close mocks base method
func (*MockrpcRequester) EXPECT ¶ added in v0.3.2
func (m *MockrpcRequester) EXPECT() *MockrpcRequesterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockrpcRequesterMockRecorder ¶ added in v0.3.2
type MockrpcRequesterMockRecorder struct {
// contains filtered or unexported fields
}
MockrpcRequesterMockRecorder is the mock recorder for MockrpcRequester
func (*MockrpcRequesterMockRecorder) BatchCall ¶ added in v0.3.2
func (mr *MockrpcRequesterMockRecorder) BatchCall(b interface{}) *gomock.Call
BatchCall indicates an expected call of BatchCall
func (*MockrpcRequesterMockRecorder) Call ¶ added in v0.3.2
func (mr *MockrpcRequesterMockRecorder) Call(resultPtr, method interface{}, args ...interface{}) *gomock.Call
Call indicates an expected call of Call
func (*MockrpcRequesterMockRecorder) Close ¶ added in v0.3.2
func (mr *MockrpcRequesterMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
contract_meta
|
|
example
|
|
Package rpc implements bi-directional JSON-RPC 2.0 on multiple transports.
|
Package rpc implements bi-directional JSON-RPC 2.0 on multiple transports. |