oracle

package
v0.0.0-...-ac8a210 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CALLFAILED               = "HackerRootCallFailed"
	REENTRANCY               = "HackerReentrancy"
	REPEATED                 = "HackerRepeatedCall"
	ETHERTRANSFER            = "HackerEtherTransfer"
	ETHERTRANSFERFAILED      = "HackerEtherTransferFailed"
	CALLETHERETRANSFERFAILED = "HackerCallEtherTransferFailed"
	GASLESSSEND              = "HackerGaslessSend"
	DELEGATE                 = "HackerDelegateCallInfo"
	EXCEPTIONDISORDER        = "HackerExceptionDisorder"
	SENDOP                   = "HackerSendOpInfo"
	CALLOP                   = "HackerCallOpInfo"
	CALLEXCEPTION            = "HackerCallException"
	UNKNOWCALL               = "HackerUnknownCall"
	STORAGECHANGE            = "HackerStorageChanged"
	TIMESTAMP                = "HackerTimestampOp"
	BLOCKHAHSH               = "HackerBlockHashOp"
	BLOCKNUMBER              = "HackerNumberOp"
	FREEZINGETHER            = "HackerFreezingEther"
)

Variables

View Source
var ErrOracleDoesntExist = errors.New("oracle doesn't exist")

Functions

func GetFunctionNameFromInput

func GetFunctionNameFromInput(input string) string

func GetOracleFromName

func GetOracleFromName(name common.OracleType) (interfaces.Oracle, error)

func GetOracles

func GetOracles(oracleNames []common.OracleType) []interfaces.Oracle

func NewEventsSnapshot

func NewEventsSnapshot(oracles []dto.OracleEvent) common.EventsSnapshot

Types

type DelegateOracle

type DelegateOracle struct{}

func (DelegateOracle) Detect

func (o DelegateOracle) Detect(snapshot common.EventsSnapshot) bool

func (DelegateOracle) Name

func (o DelegateOracle) Name() common.OracleType

type ExceptionDisorderOracle

type ExceptionDisorderOracle struct{}

func (ExceptionDisorderOracle) Detect

func (ExceptionDisorderOracle) Name

type GaslessSendOracle

type GaslessSendOracle struct{}

func (GaslessSendOracle) Detect

func (o GaslessSendOracle) Detect(snapshot common.EventsSnapshot) bool

func (GaslessSendOracle) Name

type NumberDependencyOracle

type NumberDependencyOracle struct{}

func (NumberDependencyOracle) Detect

func (o NumberDependencyOracle) Detect(snapshot common.EventsSnapshot) bool

func (NumberDependencyOracle) Name

type ReentrancyOracle

type ReentrancyOracle struct{}

func (ReentrancyOracle) Detect

func (o ReentrancyOracle) Detect(snapshot common.EventsSnapshot) bool

func (ReentrancyOracle) Name

type TimestampDependencyOracle

type TimestampDependencyOracle struct{}

func (TimestampDependencyOracle) Detect

func (TimestampDependencyOracle) Name

Jump to

Keyboard shortcuts

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