abi

package
v6.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2026 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Overview

Package abi details abis

Index

Constants

This section is empty.

Variables

View Source
var AbiNotFound = `[{"name":"AbiNotFound","type":"function"}]`

Functions

func CleanAbiCache

func CleanAbiCache(chain, path string) error

func ExtractSigs

func ExtractSigs(code string) []types.Function

func LoadAbi

func LoadAbi(conn *rpc.Connection, address base.Address, abiMap *SelectorSyncMap) error

LoadAbi tries to load ABI from any source (local file, cache, download from 3rd party)

func PathToAbisCache

func PathToAbisCache(chain, fileName string) string

func PathToKnownAbis

func PathToKnownAbis(fileName string) string

Types

type AddressSyncMap

type AddressSyncMap struct {
	sync.Map
}

func (*AddressSyncMap) Count

func (addrMap *AddressSyncMap) Count() int64

func (*AddressSyncMap) GetValue

func (addrMap *AddressSyncMap) GetValue(addr base.Address) bool

func (*AddressSyncMap) Keys

func (addrMap *AddressSyncMap) Keys() []base.Address

func (*AddressSyncMap) SetValue

func (addrMap *AddressSyncMap) SetValue(addr base.Address, set bool)

func (*AddressSyncMap) Values

func (addrMap *AddressSyncMap) Values() []bool

type SelectorSyncMap

type SelectorSyncMap struct {
	sync.Map
}

func (*SelectorSyncMap) Count

func (abiMap *SelectorSyncMap) Count() int64

func (*SelectorSyncMap) GetValue

func (abiMap *SelectorSyncMap) GetValue(encoding string) *types.Function

func (*SelectorSyncMap) Keys

func (abiMap *SelectorSyncMap) Keys() []string

func (*SelectorSyncMap) LoadKnownAbis

func (abiMap *SelectorSyncMap) LoadKnownAbis(chain string) (err error)

LoadKnownAbis loads known ABI files into abiMap, refreshing binary cache if needed

func (*SelectorSyncMap) SetValue

func (abiMap *SelectorSyncMap) SetValue(encoding string, function *types.Function)

func (*SelectorSyncMap) Values

func (abiMap *SelectorSyncMap) Values() []types.Function

Jump to

Keyboard shortcuts

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