types

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OPCODES = map[string]*Opcode{}/* 143 elements not displayed */

)

Functions

This section is empty.

Types

type Argument

type Argument struct {
	TextArguments []string
	ABIArguments  []string
}

Data structure for easier handling of function parameters

type MouseContract

type MouseContract struct {
	Address   string
	Bytecode  string
	Storage   map[string]interface{}
	Functions []string
	Opcodes   []*Opcode
}

type MouseTx

type MouseTx struct {
	// The list of possible function signatures, after seaching a database
	PossibleSignatures []*Signature

	// The hexadecimal representation of the calldata???
	ByteSignature string

	// The text representation of the calldata, chunked by 2
	Calldata []string

	// The raw calldata, as a string
	RawCalldata string

	// The hash of the transaction
	Hash common.Hash

	// The cost of the transaction
	Cost *big.Int

	// The gas limit of the transaction
	GasLimit uint64

	// The gas price of the transaction
	GasPrice *big.Int

	// The nonce of the transaction
	Nonce uint64

	// Whether of not the transaction is protected (sent through a relay)
	Protected bool

	// The target address of the transaction
	To *common.Address

	// The value of the transaction
	Value *big.Int

	// The type of the transaction
	Type uint8

	// The code of the target address of the transaction
	TargetCode string

	// A custom representation of the target contract of the transaction
	Target MouseContract

	// Unimplemented
	ExecuteResult []byte

	// Unimplemented
	DecodedInputs []string

	//Unimplemented
	MouseOrigin string

	sync.Mutex
}

Data structure for easier handling of contract decompilation and transaction decoding

type Opcode

type Opcode struct {
	Instruction string
	Number      string
	Inputs      int64
	Outputs     int64
	Data        string
}

func MatchOpcode

func MatchOpcode(op string) *Opcode

func (*Opcode) GetInputs

func (o *Opcode) GetInputs() int64

func (*Opcode) GetOutputs

func (o *Opcode) GetOutputs() int64

func (*Opcode) String

func (o *Opcode) String() string

type Signature

type Signature struct {
	Name          string
	TextSignature string
	HexSignature  string
	Arguments     *Argument
}

Data structure for easier handling of function signatures

Jump to

Keyboard shortcuts

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