eth

package
v0.2.261 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeTransactionInputData added in v0.2.173

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

func GetContractABI added in v0.2.173

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

func GetContractABIFromFile added in v0.2.218

func GetContractABIFromFile(fileName string) (*abi.ABI, error)

func GetContractProxyABI added in v0.2.252

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

func GetEthClient

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

func GetPriceInEth added in v0.2.228

func GetPriceInEth(id string) (ethPrice float64, err error)

func GetTokenName added in v0.2.228

func GetTokenName(contract string) string

func GetTransactionLog added in v0.2.228

func GetTransactionLog(receipt *types.Receipt, contractABI *abi.ABI, name string) (eventMap map[string]interface{}, err error)

func GetTxSenderHash added in v0.2.173

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

func WeiToEther added in v0.2.173

func WeiToEther(wei *big.Int) float64

Types

type Chain added in v0.2.173

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

func (Chain) Api added in v0.2.173

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

func (Chain) Decimals added in v0.2.228

func (chain Chain) Decimals() float64

func (Chain) RpcProviderUrl added in v0.2.173

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

func (Chain) String added in v0.2.192

func (chain Chain) String() string

type Protocol added in v0.2.173

type Protocol int
const (
	Delta      Protocol = iota
	Sommelier  Protocol = iota
	LayerBank  Protocol = iota
	Pendle     Protocol = iota
	Venus      Protocol = iota
	ListaDAO   Protocol = iota
	YeiFinance Protocol = iota
)

func (Protocol) GetAbi added in v0.2.228

func (protocol Protocol) GetAbi() string

func (Protocol) String added in v0.2.173

func (protocol Protocol) String() string

type RawABIResponse added in v0.2.173

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

func GetContractRawABI added in v0.2.173

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