evmdis

package
v0.0.0-...-9abc7a9 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ERC20Iface = []string{
	"totalSupply()",
	"balanceOf(address)",
	"allowance(address,address)",
	"transfer(address,uint256)",
	"approve(address,uint256)",
	"transferFrom(address,address,uint256)",
}
View Source
var ERC721Iface = []string{
	"balanceOf(address)",
	"ownerOf(uint256)",
	"safeTransferFrom(address,address,uint256)",
	"safeTransferFrom(address,address,uint256,bytes)",
	"transferFrom(address,address,uint256)",
	"approve(address,uint256)",
	"setApprovalForAll(address,bool)",
	"getApproved(uint256)",
	"isApprovedForAll(address,address)",
}

Functions

This section is empty.

Types

type Disassembler

type Disassembler struct {
}

func NewDisassembler

func NewDisassembler() *Disassembler

func (*Disassembler) Disassemble

func (d *Disassembler) Disassemble(code string) (*Results, error)

Disassemble disassembles the given bytecode and returns the disassembled code as lines. It will return results even if the bytecode is invalid, for cases like ENS, where the geth's asm package fails to disassemble the bytecode, but it the results still are sufficient to determine that the ENS contract supports ERC721.

type Results

type Results struct {
	CompiledLen     int
	Lines           []evmops.Line
	FoundSignatures map[string]struct{}
}

func (*Results) Implements

func (r *Results) Implements(iface []string) bool

func (*Results) String

func (r *Results) String() string

Jump to

Keyboard shortcuts

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