Documentation ¶
Index ¶
- Variables
- func CalcGasCost(gasLimit uint64, gasPrice *big.Int) *big.Int
- func CalculateInterfaceId(contractABI string) []byte
- func Call(ctx context.Context, c *rpc.Client, contract string, method abi.Method) (any, error)
- func CallWithInput(ctx context.Context, c *rpc.Client, contract, methodName string, abiO *abi.ABI, ...) (any, error)
- func CodeAt(ctx context.Context, c *rpc.Client, contract string) (string, error)
- func CreateTransaction(ctx context.Context, client *ethclient.Client, sender, to string, ...) (*types.Transaction, error)
- func DecodeABI(abiStr string) (*abi.ABI, error)
- func IsERC721()
- func IsValidAddress(addr interface{}) bool
- func IsZeroAddress(addr interface{}) bool
- func ParseStorageLayout(ctx context.Context, c *rpc.Client, contract, storage, abiStr string) (any, error)
- func ParseVyPerStorage(ctx context.Context, c *rpc.Client, contract, abiStr string, ...) ([]types.ContractVariable, error)
- func ParseVyPerStorageLayout(ctx context.Context, c *rpc.Client, contract, storage, abiStr string) (any, error)
- func PublicKeyBytesToAddress(publicKey []byte) common.Address
- func StorageAt(ctx context.Context, c *rpc.Client, contract string, slot common.Hash) ([]byte, error)
- func ToDecimal(val any, decimals int) decimal.Decimal
- func ToWei(value any, decimals int) *big.Int
- func Withdraw(ctx context.Context, c *rpc.Client, from, to string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
BscForkClient, _ = rpc.DialContext(context.Background(), "https://rpc.phalcon.blocksec.com/rpc_25d3496386cd49d79e0055b9708af0a6")
ETHClient, _ = rpc.DialContext(context.Background(), "https://eth-mainnet.g.alchemy.com/v2/qUt8liQq0Kh5rGm9VGGfLfSNLFuONhm3")
BscClient, _ = rpc.DialContext(context.Background(), "https://binance.llamarpc.com")
ArbitrumClient, _ = rpc.DialContext(context.Background(), "https://arb-mainnet.g.alchemy.com/v2/vJawUvyo1NE02qYepEe2n_AtjrX_gF5q")
BaseClient, _ = rpc.DialContext(context.Background(), "https://base-mainnet.g.alchemy.com/v2/7XuVI7nNb8mJFfDc_HlEOiFPVNz4lKAz")
MerlinClient, _ = rpc.DialContext(context.Background(), "https://rpc.merlinchain.io/api")
Sender = common.HexToAddress("0xba46dd807DD7A5bBe2eE80b6D0516A088223C574")
)
Functions ¶
func CalcGasCost ¶
CalcGasCost calculate gas cost given gas limit (units) and gas price (wei)
func CalculateInterfaceId ¶
func CallWithInput ¶
func CreateTransaction ¶
func IsValidAddress ¶
func IsValidAddress(addr interface{}) bool
IsValidAddress validate hex address
func IsZeroAddress ¶
func IsZeroAddress(addr interface{}) bool
IsZeroAddress validate if it's a 0 address
func ParseStorageLayout ¶
func ParseVyPerStorage ¶
func ParseVyPerStorageLayout ¶
func PublicKeyBytesToAddress ¶
PublicKeyBytesToAddress zero address return if key is invalid
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.