evmclient

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: GPL-3.0 Imports: 24 Imported by: 2

Documentation

Index

Constants

View Source
const (
	SetAbiterList string = "SetArbiterList(uint256)"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonTransaction

type CommonTransaction interface {
	// Hash returns the transaction hash.
	Hash() common.Hash
	// Returns signed transaction by provided private key
	RawWithSignature(key *ecdsa.PrivateKey, chainID *big.Int) ([]byte, error)
}

type EVMClient

type EVMClient struct {
	*ethclient.Client
	// contains filtered or unexported fields
}

func NewEVMClient

func NewEVMClient(engine engine.ESCEngine) *EVMClient

func (*EVMClient) CallContract

func (c *EVMClient) CallContract(ctx context.Context, callArgs map[string]interface{}, blockNumber *big.Int) ([]byte, error)

func (*EVMClient) Configurate

func (c *EVMClient) Configurate(generalConfig *config.GeneralChainConfig, accountPath, password string) error

func (*EVMClient) CurrentBlock

func (c *EVMClient) CurrentBlock() (*types.Block, error)

func (*EVMClient) Engine

func (c *EVMClient) Engine() engine.ESCEngine

func (*EVMClient) EstimateGasLimit

func (c *EVMClient) EstimateGasLimit(ctx context.Context, msg ethereum.CallMsg) (uint64, error)

func (*EVMClient) FetchUpdateArbitersLogs

func (c *EVMClient) FetchUpdateArbitersLogs(ctx context.Context, contractAddress common.Address, startBlock *big.Int, endBlock *big.Int) ([]*relayer.SetArbiterListMsg, error)

func (*EVMClient) GasPrice

func (c *EVMClient) GasPrice() (*big.Int, error)

func (*EVMClient) GetClientAddress

func (c *EVMClient) GetClientAddress() common.Address

func (*EVMClient) GetConfig

func (c *EVMClient) GetConfig() *config.GeneralChainConfig

func (*EVMClient) GetNonce

func (c *EVMClient) GetNonce() (*big.Int, error)

func (*EVMClient) IsContractAddress

func (c *EVMClient) IsContractAddress(address string) bool

func (*EVMClient) LatestBlock

func (c *EVMClient) LatestBlock() (*big.Int, error)

LatestBlock returns the latest block from the current chain

func (*EVMClient) LockNonce

func (c *EVMClient) LockNonce()

func (*EVMClient) PendingCallContract

func (c *EVMClient) PendingCallContract(ctx context.Context, callArgs map[string]interface{}) ([]byte, error)

func (*EVMClient) PendingTransaction

func (c *EVMClient) PendingTransaction() ([]ethapi.RPCTransaction, error)

LatestBlock returns the latest block from the current chain

func (*EVMClient) SafeEstimateGasPrice

func (c *EVMClient) SafeEstimateGasPrice(ctx context.Context) (*big.Int, error)

func (*EVMClient) SendRawTransaction

func (c *EVMClient) SendRawTransaction(ctx context.Context, tx []byte) error

SendRawTransaction accepts rlp-encode of signed transaction and sends it via RPC call

func (*EVMClient) SignAndSendTransaction

func (c *EVMClient) SignAndSendTransaction(ctx context.Context, tx CommonTransaction) (common.Hash, error)

func (*EVMClient) UnlockNonce

func (c *EVMClient) UnlockNonce()

Jump to

Keyboard shortcuts

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