ethrequest

package
v0.0.0-...-5882973 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ETHEstimateGas        = "eth_estimateGas"
	ETHSendRawTransaction = "eth_sendRawTransaction"
	ETHSign               = "eth_sign"
	ETHChainID            = "eth_chainId"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CeloService

type CeloService struct {
	// contains filtered or unexported fields
}

func NewCeloService

func NewCeloService(ctx context.Context, endpoint string) (*CeloService, error)

func (*CeloService) Backend

func (e *CeloService) Backend() bind.ContractBackend

func (*CeloService) BaseFee

func (e *CeloService) BaseFee() (*big.Int, error)

func (*CeloService) BlockTime

func (e *CeloService) BlockTime(number *big.Int) (uint64, error)

BlockTime returns the timestamp of the block at the given number

func (*CeloService) ChainID

func (e *CeloService) ChainID() (*big.Int, error)

func (*CeloService) Close

func (e *CeloService) Close()

func (*CeloService) CodeAt

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

func (*CeloService) Context

func (e *CeloService) Context() context.Context

func (*CeloService) EstimateGasLimit

func (e *CeloService) EstimateGasLimit(msg ethereum.CallMsg) (uint64, error)

func (*CeloService) EstimateGasPrice

func (e *CeloService) EstimateGasPrice() (*big.Int, error)

func (*CeloService) FilterLogs

func (e *CeloService) FilterLogs(q ethereum.FilterQuery) ([]types.Log, error)

func (*CeloService) LatestBlock

func (e *CeloService) LatestBlock() (*big.Int, error)

func (*CeloService) ListenForLogs

func (e *CeloService) ListenForLogs(ctx context.Context, q ethereum.FilterQuery, ch chan<- types.Log) error

func (*CeloService) MaxPriorityFeePerGas

func (e *CeloService) MaxPriorityFeePerGas() (*big.Int, error)

func (*CeloService) NewTx

func (e *CeloService) NewTx(nonce uint64, from, to common.Address, data []byte, extraGas bool) (*types.Transaction, error)

func (*CeloService) NonceAt

func (e *CeloService) NonceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (uint64, error)

func (*CeloService) SendTransaction

func (e *CeloService) SendTransaction(tx *types.Transaction) error

func (*CeloService) StorageAt

func (e *CeloService) StorageAt(addr common.Address, slot common.Hash) ([]byte, error)

func (*CeloService) WaitForTx

func (e *CeloService) WaitForTx(tx *types.Transaction, timeout int) error

type Community

type Community struct {
	EntryPointAddr common.Address

	AccountFactoryAddr common.Address
	AccountFactory     *simpleaccountfactory.Simpleaccountfactory

	ProfileAddr common.Address
	Profile     *profile.Profile
	// contains filtered or unexported fields
}

func NewCommunity

func NewCommunity(evm indexer.EVMRequester, entryPointAddr, accountFactoryAddr, profileAddr string) (*Community, error)

func (*Community) EntryPointNextNonce

func (c *Community) EntryPointNextNonce() (*big.Int, error)

EntryPointNextNonce returns the next nonce for the entry point address

func (*Community) GetAccount

func (c *Community) GetAccount(owner string) (*common.Address, error)

GetAccount returns the account at the given address

func (*Community) GetProfile

func (c *Community) GetProfile(owner string) (string, error)

GetAccount returns the profile for a given address

type EthBlock

type EthBlock struct {
	Number    string `json:"number"`
	Timestamp string `json:"timestamp"`
}

type EthService

type EthService struct {
	// contains filtered or unexported fields
}

func NewEthService

func NewEthService(ctx context.Context, endpoint string) (*EthService, error)

func (*EthService) Backend

func (e *EthService) Backend() bind.ContractBackend

func (*EthService) BaseFee

func (e *EthService) BaseFee() (*big.Int, error)

func (*EthService) BlockByNumber

func (e *EthService) BlockByNumber(number *big.Int) (*types.Block, error)

func (*EthService) BlockTime

func (e *EthService) BlockTime(number *big.Int) (uint64, error)

func (*EthService) ChainID

func (e *EthService) ChainID() (*big.Int, error)

func (*EthService) Close

func (e *EthService) Close()

func (*EthService) CodeAt

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

func (*EthService) Context

func (e *EthService) Context() context.Context

func (*EthService) EstimateContractGasPrice

func (e *EthService) EstimateContractGasPrice(data []byte) (uint64, error)

func (*EthService) EstimateFullGas

func (e *EthService) EstimateFullGas(from common.Address, tx *types.Transaction) (uint64, error)

func (*EthService) EstimateGas

func (e *EthService) EstimateGas(from, to string, value uint64) (uint64, error)

func (*EthService) EstimateGasLimit

func (e *EthService) EstimateGasLimit(msg ethereum.CallMsg) (uint64, error)

func (*EthService) EstimateGasPrice

func (e *EthService) EstimateGasPrice() (*big.Int, error)

func (*EthService) FilterLogs

func (e *EthService) FilterLogs(q ethereum.FilterQuery) ([]types.Log, error)

func (*EthService) GetCode

func (e *EthService) GetCode(address common.Address) ([]byte, error)

func (*EthService) LatestBlock

func (e *EthService) LatestBlock() (*big.Int, error)

func (*EthService) ListenForLogs

func (e *EthService) ListenForLogs(ctx context.Context, q ethereum.FilterQuery, ch chan<- types.Log) error

func (*EthService) MaxPriorityFeePerGas

func (e *EthService) MaxPriorityFeePerGas() (*big.Int, error)

func (*EthService) NewTx

func (e *EthService) NewTx(nonce uint64, from, to common.Address, data []byte, extraGas bool) (*types.Transaction, error)

func (*EthService) NextNonce

func (e *EthService) NextNonce(address string) (uint64, error)

func (*EthService) NonceAt

func (e *EthService) NonceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (uint64, error)

func (*EthService) SendRawTransaction

func (e *EthService) SendRawTransaction(tx string) ([]byte, error)

func (*EthService) SendTransaction

func (e *EthService) SendTransaction(tx *types.Transaction) error

func (*EthService) Sign

func (e *EthService) Sign(addr string, message string) (string, error)

func (*EthService) StorageAt

func (e *EthService) StorageAt(addr common.Address, slot common.Hash) ([]byte, error)

func (*EthService) TransactionByHash

func (e *EthService) TransactionByHash(hash common.Hash) (tx *types.Transaction, isPending bool, err error)

func (*EthService) WaitForTx

func (e *EthService) WaitForTx(tx *types.Transaction, timeout int) error

type OPService

type OPService struct {
	// contains filtered or unexported fields
}

func NewOpService

func NewOpService(ctx context.Context, endpoint string) (*OPService, error)

func (*OPService) Backend

func (e *OPService) Backend() bind.ContractBackend

func (*OPService) BaseFee

func (e *OPService) BaseFee() (*big.Int, error)

func (*OPService) BlockTime

func (e *OPService) BlockTime(number *big.Int) (uint64, error)

func (*OPService) ChainID

func (e *OPService) ChainID() (*big.Int, error)

func (*OPService) Close

func (e *OPService) Close()

func (*OPService) CodeAt

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

func (*OPService) Context

func (e *OPService) Context() context.Context

func (*OPService) EstimateGasLimit

func (e *OPService) EstimateGasLimit(msg ethereum.CallMsg) (uint64, error)

func (*OPService) EstimateGasPrice

func (e *OPService) EstimateGasPrice() (*big.Int, error)

func (*OPService) FilterLogs

func (e *OPService) FilterLogs(q ethereum.FilterQuery) ([]types.Log, error)

func (*OPService) LatestBlock

func (e *OPService) LatestBlock() (*big.Int, error)

func (*OPService) ListenForLogs

func (e *OPService) ListenForLogs(ctx context.Context, q ethereum.FilterQuery, ch chan<- types.Log) error

func (*OPService) MaxPriorityFeePerGas

func (e *OPService) MaxPriorityFeePerGas() (*big.Int, error)

func (*OPService) NewTx

func (e *OPService) NewTx(nonce uint64, from, to common.Address, data []byte, extraGas bool) (*types.Transaction, error)

func (*OPService) NonceAt

func (e *OPService) NonceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (uint64, error)

func (*OPService) SendTransaction

func (e *OPService) SendTransaction(tx *types.Transaction) error

func (*OPService) StorageAt

func (e *OPService) StorageAt(addr common.Address, slot common.Hash) ([]byte, error)

func (*OPService) WaitForTx

func (e *OPService) WaitForTx(tx *types.Transaction, timeout int) error

Jump to

Keyboard shortcuts

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