hevm-0.46.0: Ethereum virtual machine evaluator
Safe HaskellNone
LanguageHaskell2010

EVM.Solidity

Synopsis

Documentation

data JumpType Source #

Constructors

JumpInto 
JumpFrom 
JumpRegular 

Instances

Instances details
Eq JumpType Source # 
Instance details

Defined in EVM.Solidity

Ord JumpType Source # 
Instance details

Defined in EVM.Solidity

Show JumpType Source # 
Instance details

Defined in EVM.Solidity

Generic JumpType Source # 
Instance details

Defined in EVM.Solidity

Associated Types

type Rep JumpType :: Type -> Type #

Methods

from :: JumpType -> Rep JumpType x #

to :: Rep JumpType x -> JumpType #

type Rep JumpType Source # 
Instance details

Defined in EVM.Solidity

type Rep JumpType = D1 ('MetaData "JumpType" "EVM.Solidity" "hevm-0.46.0-inplace" 'False) (C1 ('MetaCons "JumpInto" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "JumpFrom" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "JumpRegular" 'PrefixI 'False) (U1 :: Type -> Type)))

data SolcContract Source #

Instances

Instances details
Eq SolcContract Source # 
Instance details

Defined in EVM.Solidity

Show SolcContract Source # 
Instance details

Defined in EVM.Solidity

Generic SolcContract Source # 
Instance details

Defined in EVM.Solidity

Associated Types

type Rep SolcContract :: Type -> Type #

type Rep SolcContract Source # 
Instance details

Defined in EVM.Solidity

data StorageItem Source #

Constructors

StorageItem 

Fields

Instances

Instances details
Eq StorageItem Source # 
Instance details

Defined in EVM.Solidity

Show StorageItem Source # 
Instance details

Defined in EVM.Solidity

data SourceCache Source #

Instances

Instances details
Eq SourceCache Source # 
Instance details

Defined in EVM.Solidity

Show SourceCache Source # 
Instance details

Defined in EVM.Solidity

Generic SourceCache Source # 
Instance details

Defined in EVM.Solidity

Associated Types

type Rep SourceCache :: Type -> Type #

Semigroup SourceCache Source # 
Instance details

Defined in EVM.Solidity

Monoid SourceCache Source # 
Instance details

Defined in EVM.Solidity

type Rep SourceCache Source # 
Instance details

Defined in EVM.Solidity

type Rep SourceCache = D1 ('MetaData "SourceCache" "EVM.Solidity" "hevm-0.46.0-inplace" 'False) (C1 ('MetaCons "SourceCache" 'PrefixI 'True) (S1 ('MetaSel ('Just "_sourceFiles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Map Int (Text, ByteString))) :*: (S1 ('MetaSel ('Just "_sourceLines") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Map Int (Vector ByteString))) :*: S1 ('MetaSel ('Just "_sourceAsts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Map Text Value)))))

data SrcMap Source #

Instances

Instances details
Eq SrcMap Source # 
Instance details

Defined in EVM.Solidity

Methods

(==) :: SrcMap -> SrcMap -> Bool #

(/=) :: SrcMap -> SrcMap -> Bool #

Ord SrcMap Source # 
Instance details

Defined in EVM.Solidity

Show SrcMap Source # 
Instance details

Defined in EVM.Solidity

Generic SrcMap Source # 
Instance details

Defined in EVM.Solidity

Associated Types

type Rep SrcMap :: Type -> Type #

Methods

from :: SrcMap -> Rep SrcMap x #

to :: Rep SrcMap x -> SrcMap #

type Rep SrcMap Source # 
Instance details

Defined in EVM.Solidity

type Rep SrcMap = D1 ('MetaData "SrcMap" "EVM.Solidity" "hevm-0.46.0-inplace" 'False) (C1 ('MetaCons "SM" 'PrefixI 'True) ((S1 ('MetaSel ('Just "srcMapOffset") 'SourceUnpack 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "srcMapLength") 'SourceUnpack 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "srcMapFile") 'SourceUnpack 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: (S1 ('MetaSel ('Just "srcMapJump") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 JumpType) :*: S1 ('MetaSel ('Just "srcMapModifierDepth") 'SourceUnpack 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))))

data CodeType Source #

Constructors

Creation 
Runtime 

Instances

Instances details
Eq CodeType Source # 
Instance details

Defined in EVM.Solidity

Ord CodeType Source # 
Instance details

Defined in EVM.Solidity

Show CodeType Source # 
Instance details

Defined in EVM.Solidity

data Method Source #

Instances

Instances details
Eq Method Source # 
Instance details

Defined in EVM.Solidity

Methods

(==) :: Method -> Method -> Bool #

(/=) :: Method -> Method -> Bool #

Ord Method Source # 
Instance details

Defined in EVM.Solidity

Show Method Source # 
Instance details

Defined in EVM.Solidity

Generic Method Source # 
Instance details

Defined in EVM.Solidity

Associated Types

type Rep Method :: Type -> Type #

Methods

from :: Method -> Rep Method x #

to :: Rep Method x -> Method #

type Rep Method Source # 
Instance details

Defined in EVM.Solidity

type Rep Method = D1 ('MetaData "Method" "EVM.Solidity" "hevm-0.46.0-inplace" 'False) (C1 ('MetaCons "Method" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_methodOutput") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [(Text, AbiType)]) :*: S1 ('MetaSel ('Just "_methodInputs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [(Text, AbiType)])) :*: (S1 ('MetaSel ('Just "_methodName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "_methodSignature") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

data SlotType Source #

Instances

Instances details
Eq SlotType Source # 
Instance details

Defined in EVM.Solidity

Read SlotType Source # 
Instance details

Defined in EVM.Solidity

Show SlotType Source # 
Instance details

Defined in EVM.Solidity

stripBytecodeMetadata :: ByteString -> ByteString Source #

When doing CREATE and passing constructor arguments, Solidity loads the argument data via the creation bytecode, since there is no "calldata" for CREATE.

This interferes with our ability to look up the current contract by codehash, so we must somehow strip away this extra suffix. Luckily we can detect the end of the actual bytecode by looking for the "metadata hash". (Not 100% correct, but works in practice.)

Actually, we strip away the entire BZZR suffix too, because as long as the codehash matches otherwise, we don't care if there is some difference there.

data Language Source #

Constructors

Solidity 
Yul 

Instances

Instances details
Show Language Source # 
Instance details

Defined in EVM.Solidity

astIdMap :: Foldable f => f Value -> Map Int Value Source #

Every node in the AST has an ID, and other nodes reference those IDs. This function recurses through the tree looking for objects with the "id" key and makes a big map from ID to value.