Documentation
¶
Index ¶
- type WrappedClient
- func (ec *WrappedClient) CallContract(ctx context.Context, msg sero.CallMsg, blockNumber *big.Int) ([]byte, error)
- func (ec *WrappedClient) Close()
- func (ec *WrappedClient) CodeAt(ctx context.Context, account common.Address, blockNumber *big.Int) ([]byte, error)
- func (ec *WrappedClient) CommitTx(ctx context.Context, arg *txtool.GTx) error
- func (ec *WrappedClient) CyToContractAddress(ctx context.Context, cy string) (common.Address, error)
- func (ec *WrappedClient) EstimateGas(ctx context.Context, msg sero.CallMsg) (uint64, error)
- func (ec *WrappedClient) FilterLogs(ctx context.Context, q sero.FilterQuery) ([]types.Log, error)
- func (ec *WrappedClient) GenContractTx(ctx context.Context, msg sero.CallMsg) (*txtool.GTxParam, error)
- func (ec *WrappedClient) GetFullAdress(ctx context.Context, contractAddr common.ContractAddress) (common.Address, error)
- func (ec *WrappedClient) PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error)
- func (ec *WrappedClient) SubscribeFilterLogs(ctx context.Context, q sero.FilterQuery, ch chan<- types.Log) (sero.Subscription, error)
- func (ec *WrappedClient) SuggestGasPrice(ctx context.Context) (*big.Int, error)
- func (ec *WrappedClient) TransactionByHash(ctx context.Context, hash common.Hash) (tx *types.Transaction, isPending bool, err error)
- func (ec *WrappedClient) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WrappedClient ¶
type WrappedClient struct { SeroClint *seroclient.Client SeroRPCClient *rpc.Client AccountRPCClient *rpc.Client }
func Dial ¶
func Dial(geroUrl, acountUrl string) (*WrappedClient, error)
func DialContext ¶
func DialContext(ctx context.Context, geroUrl, acountUrl string) (*WrappedClient, error)
func NewClient ¶
func NewClient(seroRPCClint *rpc.Client, accountRPCClient *rpc.Client) *WrappedClient
NewClient creates a client that uses the given RPC client.
func (*WrappedClient) CallContract ¶
func (*WrappedClient) Close ¶
func (ec *WrappedClient) Close()
func (*WrappedClient) CyToContractAddress ¶
func (*WrappedClient) EstimateGas ¶
func (ec *WrappedClient) EstimateGas(ctx context.Context, msg sero.CallMsg) (uint64, error)
EstimateGas tries to estimate the gas needed to execute a specific transaction based on the current pending state of the backend blockchain. There is no guarantee that this is the true gas limit requirement as other transactions may be added or removed by miners, but it should provide a basis for setting a reasonable default.
func (*WrappedClient) FilterLogs ¶
func (*WrappedClient) GenContractTx ¶
func (*WrappedClient) GetFullAdress ¶
func (ec *WrappedClient) GetFullAdress(ctx context.Context, contractAddr common.ContractAddress) (common.Address, error)
func (*WrappedClient) PendingCodeAt ¶
PendingCodeAt returns the contract code of the given account in the pending state.
func (*WrappedClient) SubscribeFilterLogs ¶
func (*WrappedClient) SuggestGasPrice ¶
SuggestGasPrice retrieves the currently suggested gas price to allow a timely execution of a transaction.
func (*WrappedClient) TransactionByHash ¶
func (ec *WrappedClient) TransactionByHash(ctx context.Context, hash common.Hash) (tx *types.Transaction, isPending bool, err error)
func (*WrappedClient) TransactionReceipt ¶
Click to show internal directories.
Click to hide internal directories.