eth

package
v0.0.0-...-cd62ce9 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeTransactionInputData

func DecodeTransactionInputData(contractABI *abi.ABI,
	data []byte) (method *abi.Method, inputsMap map[string]interface{},
	err error)

func GetContractABI

func GetContractABI(contractAddress, apiKey string, chain Chain) (*abi.ABI,
	error)

func GetEthClient

func GetEthClient(log *logrus.Entry, chain Chain) (client *ethclient.Client,
	err error)

func GetTxSenderHash

func GetTxSenderHash(tx *types.Transaction) (txSenderHash string, err error)

func WeiToEther

func WeiToEther(wei *big.Int) float64

Types

type Chain

type Chain int
const (
	Avax     Chain = iota
	Arbitrum Chain = iota
	Mode     Chain = iota
	Manta    Chain = iota
)

func (Chain) Api

func (chain Chain) Api() (apiUrl string, err error)

func (Chain) RpcProviderUrl

func (chain Chain) RpcProviderUrl() (rpcProviderUrl string, err error)

func (Chain) String

func (chain Chain) String() string

type Protocol

type Protocol int
const (
	Delta     Protocol = iota
	Sommelier Protocol = iota
	LayerBank Protocol = iota
)

func (Protocol) String

func (protocol Protocol) String() string

type RawABIResponse

type RawABIResponse struct {
	Status  *string `json:"status"`
	Message *string `json:"message"`
	Result  *string `json:"result"`
}

func GetContractRawABI

func GetContractRawABI(address string, apiKey string,
	chain Chain) (rawABIResponse *RawABIResponse, err error)

Jump to

Keyboard shortcuts

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