Documentation ¶
Index ¶
- Constants
- Variables
- func Contains[T comparable](s []T, target T) bool
- func ConvertHexadecimalToInt(hexadecimal string) (*big.Int, error)
- func ConvertStringArrayToInterfaceArray(arr []string) []interface{}
- func GetFirstStringKeyFromMap[V any](input map[string]V) string
- func GetLastStringKeyFromMap[V any](input map[string]V) string
- func GetUniqueSlice[T comparable](slice []T) []T
- func JoinOracleTypeList(types []OracleType) string
- func MergeSortedSlices(a []string, b []string) []string
- func MustConvertHexadecimalToInt(hexadecimal string) *big.Int
- func NewSet[T comparable](args ...T) *set[T]
- func Now() time.Time
- func RandomChoice[T any](slice []T) T
- func RandomSubSlice[T any](s []T) []T
- func SumOccurrencesOfStringList(targetGroup []string, source []string) uint64
- func Swap[T any](s []T, i, j int)
- type Block
- type BlockRange
- type CFG
- type CFGBlock
- type ConcurrentMap
- func (d *ConcurrentMap) Add(key IKey, value IValue)
- func (d *ConcurrentMap) Clear()
- func (d *ConcurrentMap) Exist(key IKey) bool
- func (d *ConcurrentMap) Get(key IKey) IValue
- func (d *ConcurrentMap) GetKeys() []IKey
- func (d *ConcurrentMap) GetValues() []IValue
- func (d *ConcurrentMap) Remove(key IKey) bool
- func (d *ConcurrentMap) Size() int
- type Contract
- type ContractStatus
- type DistanceMap
- type EventsSnapshot
- type Function
- type FuzzingType
- type IKey
- type IValue
- type Instruction
- type MethodType
- type OracleType
- type PowerScheduleStrategy
- type ReporterType
- type Seeds
- type TaskReport
- type TaskStatus
- type TimeSeriesData
- type TransactionStatus
- type TypeIdentifier
Constants ¶
View Source
const ONE_ETHER uint64 = 1000000000000000000
Variables ¶
View Source
var ( Uint8T = reflect.TypeOf(uint8(0)) Uint16T = reflect.TypeOf(uint16(0)) Uint32T = reflect.TypeOf(uint32(0)) Uint64T = reflect.TypeOf(uint64(0)) Int8T = reflect.TypeOf(int8(0)) Int16T = reflect.TypeOf(int16(0)) Int32T = reflect.TypeOf(int32(0)) Int64T = reflect.TypeOf(int64(0)) BigIntT = reflect.TypeOf(&big.Int{}) BoolT = reflect.TypeOf(false) StringT = reflect.TypeOf("") AddressT = reflect.TypeOf(common.Address{}) SliceT = func(typ reflect.Type) reflect.Type { return reflect.SliceOf(typ) } ArrayT = func(size int, typ reflect.Type) reflect.Type { return reflect.ArrayOf(size, typ) } FixedBytesT = func(size int) reflect.Type { return reflect.ArrayOf(size, reflect.TypeOf(byte(0))) } BytesT = reflect.SliceOf(reflect.TypeOf(byte(0))) )
View Source
var ErrInvalidHexadecimal = errors.New("the provided string is not a valid hexadecimal")
Functions ¶
func Contains ¶
func Contains[T comparable](s []T, target T) bool
func ConvertStringArrayToInterfaceArray ¶
func ConvertStringArrayToInterfaceArray(arr []string) []interface{}
func GetLastStringKeyFromMap ¶
func GetUniqueSlice ¶
func GetUniqueSlice[T comparable](slice []T) []T
func JoinOracleTypeList ¶
func JoinOracleTypeList(types []OracleType) string
func MergeSortedSlices ¶
func NewSet ¶
func NewSet[T comparable](args ...T) *set[T]
func RandomChoice ¶
func RandomChoice[T any](slice []T) T
func RandomSubSlice ¶
func RandomSubSlice[T any](s []T) []T
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 CFG ¶
type CFG struct { Graph map[string][]string `json:"graph"` Blocks map[string]CFGBlock `json:"blocks"` Instructions map[string]string `json:"instructions"` }
func (CFG) GetEdgesPCs ¶
func (CFG) GetReverseGraph ¶
type ConcurrentMap ¶
type ConcurrentMap struct {
// contains filtered or unexported fields
}
func (*ConcurrentMap) Add ¶
func (d *ConcurrentMap) Add(key IKey, value IValue)
func (*ConcurrentMap) Clear ¶
func (d *ConcurrentMap) Clear()
func (*ConcurrentMap) Exist ¶
func (d *ConcurrentMap) Exist(key IKey) bool
func (*ConcurrentMap) Get ¶
func (d *ConcurrentMap) Get(key IKey) IValue
func (*ConcurrentMap) GetKeys ¶
func (d *ConcurrentMap) GetKeys() []IKey
func (*ConcurrentMap) GetValues ¶
func (d *ConcurrentMap) GetValues() []IValue
func (*ConcurrentMap) Remove ¶
func (d *ConcurrentMap) Remove(key IKey) bool
func (*ConcurrentMap) Size ¶
func (d *ConcurrentMap) Size() int
type Contract ¶
type Contract struct { Name string AbiDefinition string DeploymentBytecode string RuntimeBytecode string Address string }
func NewContract ¶
type ContractStatus ¶
type ContractStatus string
const ( CONTRACT_CREATED ContractStatus = "created" CONTRACT_DEPLOYED ContractStatus = "deployed" )
type DistanceMap ¶
type EventsSnapshot ¶
type EventsSnapshot struct { CallFailed bool Reentrancy bool RepeatedCall bool EtherTransfer bool EtherTransferFailed bool CallEtherFailed bool GaslessSend bool Delegate bool ExceptionDisorder bool SendOp bool CallOp bool CallException bool UnknowCall bool StorageChanged bool Timestamp bool BlockHash bool BlockNumber bool }
type FuzzingType ¶
type FuzzingType string
const ( BLACKBOX_FUZZING FuzzingType = "blackbox" GREYBOX_FUZZING FuzzingType = "greybox" DIRECTED_GREYBOX_FUZZING FuzzingType = "directed_greybox" )
type Instruction ¶
type MethodType ¶
type MethodType string
const ( CONSTRUCTOR MethodType = "constructor" FALLBACK MethodType = "fallback" RECEIVE MethodType = "receive" METHOD MethodType = "method" )
type OracleType ¶
type OracleType string
const ( DELEGATE_ORACLE OracleType = "delegate" EXCEPTION_DISORDER_ORACLE OracleType = "exception-disorder" GASLESS_SEND_ORACLE OracleType = "gasless-send" NUMBER_DEPENDENCY_ORACLE OracleType = "number-dependency" REENTRANCY_ORACLE OracleType = "reentrancy" TIMESTAMP_DEPENDENCY_ORACLE OracleType = "timestamp-dependency" )
func SplitOracleTypeString ¶
func SplitOracleTypeString(input string) []OracleType
type PowerScheduleStrategy ¶
type PowerScheduleStrategy string
const ( DISTANCE_BASED_STRATEGY PowerScheduleStrategy = "distance_based" COVERAGE_BASED_STRATEGY PowerScheduleStrategy = "coverage_based" )
type ReporterType ¶
type ReporterType string
const ( CONSOLE_REPORTER ReporterType = "console" WEBHOOK_REPOTER ReporterType = "webhook" FILE_REPORTER ReporterType = "file" )
type Seeds ¶
type Seeds = map[TypeIdentifier][]string
type TaskReport ¶
type TaskReport struct { TaskId string `json:"taskId"` TimeElapsed time.Duration `json:"timeElapsed"` ContractName string `json:"contractName"` TotalInstructions uint64 `json:"totalInstructions"` Coverage uint64 `json:"coverage"` CoverageByTime TimeSeriesData `json:"coverageByTime"` MinDistance uint64 `json:"minDistance"` MinDistanceByTime TimeSeriesData `json:"minDistanceByTime"` DetectedWeaknesses []string `json:"detectedWeaknesses"` CriticalInstructionsHits uint64 `json:"criticalInstructionsHits"` AverageCoverage float64 `json:"averageCoverage"` Instructions map[string]string `json:"instructions"` InstructionHitsHeatMap map[string]uint64 `json:"instructionHitsHeatMap"` }
type TaskStatus ¶
type TaskStatus string
const ( TASK_RUNNING TaskStatus = "running" TASK_DONE TaskStatus = "done" TASK_REPORT TaskStatus = "report" )
type TimeSeriesData ¶
type TransactionStatus ¶
type TransactionStatus string
const ( TRANSACTION_CREATED TransactionStatus = "created" TRANSACTION_SEND_ERROR TransactionStatus = "send_error" TRANSACTION_RUNNING TransactionStatus = "running" TRANSACTION_DONE TransactionStatus = "done" TRANSACTION_TIMEOUT TransactionStatus = "timeout" )
type TypeIdentifier ¶
type TypeIdentifier string
Click to show internal directories.
Click to hide internal directories.