abi

package
v0.0.0-...-2de43c5 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 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 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)

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