common

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

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

Go to latest
Published: Mar 2, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const RESULT_JSON_PATH = "result.json"

Variables

This section is empty.

Functions

func GenerateJsonFileFromContractInfoSlice

func GenerateJsonFileFromContractInfoSlice(contractSlice []ContractInfo)

func ReadCsvFile

func ReadCsvFile(pathFile string) [][]string

Types

type Block

type Block struct {
	PC               string                 `json:"pc"`
	Range            BlockRange             `json:"range"`
	Predecessors     []string               `json:"predecessors"`
	Successors       []string               `json:"successors"`
	EntryStack       []string               `json:"entryStack"`
	StackPops        uint64                 `json:"stackPops"`
	StackAdditions   []string               `json:"stackAdditions"`
	ExitStack        []string               `json:"exitStack"`
	Instructions     map[string]Instruction `json:"instructions"`
	InstructionOrder []string               `json:"instructionOrder"`
}

type BlockRange

type BlockRange struct {
	From string `json:"from"`
	To   string `json:"to"`
}

type Contract

type Contract struct {
	Name          string
	AbiDefinition string
	CompiledCode  string
	Address       string
}

func NewContract

func NewContract(name, abiDefinition, compiledCode string) *Contract

type ContractInfo

type ContractInfo struct {
	Name                         string         `json:"name"`
	Weaknesses                   []string       `json:"weaknesses"`
	Link                         string         `json:"link"`
	NumberOfBlocks               int            `json:"numberOfBlocks"`
	NumberOfBranches             int            `json:"numberOfBranches"`
	NumberOfCriticalInstructions map[string]int `json:"numberOfCriticalInstructions"`
}

type Function

type Function struct {
	Signature  string   `json:"signature"`
	EntryBlock string   `json:"entryBlock"`
	ExitBlock  string   `json:"exitBlock"`
	Body       []string `json:"body"`
}

type Instruction

type Instruction struct {
	Op      string   `json:"op"`
	Args    []string `json:"args"`
	StackOp string   `json:"stackOp"`
}

Jump to

Keyboard shortcuts

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