sero

package
v0.0.0-...-e30b66f Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

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 (ec *WrappedClient) CallContract(ctx context.Context, msg sero.CallMsg, blockNumber *big.Int) ([]byte, error)

func (*WrappedClient) Close

func (ec *WrappedClient) Close()

func (*WrappedClient) CodeAt

func (ec *WrappedClient) CodeAt(ctx context.Context, account common.Address, blockNumber *big.Int) ([]byte, error)

func (*WrappedClient) CommitTx

func (ec *WrappedClient) CommitTx(ctx context.Context, arg *txtool.GTx) error

func (*WrappedClient) CyToContractAddress

func (ec *WrappedClient) CyToContractAddress(ctx context.Context, cy string) (common.Address, error)

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 (ec *WrappedClient) FilterLogs(ctx context.Context, q sero.FilterQuery) ([]types.Log, error)

func (*WrappedClient) GenContractTx

func (ec *WrappedClient) GenContractTx(ctx context.Context, msg sero.CallMsg) (*txtool.GTxParam, error)

func (*WrappedClient) GetFullAdress

func (ec *WrappedClient) GetFullAdress(ctx context.Context, contractAddr common.ContractAddress) (common.Address, error)

func (*WrappedClient) PendingCodeAt

func (ec *WrappedClient) PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error)

PendingCodeAt returns the contract code of the given account in the pending state.

func (*WrappedClient) SubscribeFilterLogs

func (ec *WrappedClient) SubscribeFilterLogs(ctx context.Context, q sero.FilterQuery, ch chan<- types.Log) (sero.Subscription, error)

func (*WrappedClient) SuggestGasPrice

func (ec *WrappedClient) SuggestGasPrice(ctx context.Context) (*big.Int, error)

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

func (ec *WrappedClient) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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