hevm-0.49.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.49.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

type Rep SolcContract = D1 ('MetaData "SolcContract" "EVM.Solidity" "hevm-0.49.0-inplace" 'False) (C1 ('MetaCons "SolcContract" 'PrefixI 'True) (((S1 ('MetaSel ('Just "_runtimeCodehash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 W256) :*: (S1 ('MetaSel ('Just "_creationCodehash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 W256) :*: S1 ('MetaSel ('Just "_runtimeCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ByteString))) :*: (S1 ('MetaSel ('Just "_creationCode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ByteString) :*: (S1 ('MetaSel ('Just "_contractName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "_constructorInputs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [(Text, AbiType)])))) :*: ((S1 ('MetaSel ('Just "_abiMap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Map Word32 Method)) :*: (S1 ('MetaSel ('Just "_eventMap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Map W256 Event)) :*: S1 ('MetaSel ('Just "_errorMap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Map W256 SolError)))) :*: ((S1 ('MetaSel ('Just "_immutableReferences") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Map W256 [Reference])) :*: S1 ('MetaSel ('Just "_storageLayout") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Map Text StorageItem)))) :*: (S1 ('MetaSel ('Just "_runtimeSrcmap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Seq SrcMap)) :*: S1 ('MetaSel ('Just "_creationSrcmap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Seq SrcMap)))))))

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.49.0-inplace" 'False) (C1 ('MetaCons "SourceCache" 'PrefixI 'True) (S1 ('MetaSel ('Just "_sourceFiles") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [(Text, ByteString)]) :*: (S1 ('MetaSel ('Just "_sourceLines") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [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.49.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

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

data Reference Source #

Constructors

Reference 

Fields

Instances

Instances details
Eq Reference Source # 
Instance details

Defined in EVM.Solidity

Show Reference Source # 
Instance details

Defined in EVM.Solidity

FromJSON Reference Source # 
Instance details

Defined in EVM.Solidity

data Mutability Source #

Constructors

Pure

specified to not read blockchain state

View

specified to not modify the blockchain state

NonPayable

function does not accept Ether - the default

Payable

function accepts Ether

Instances

Instances details
Eq Mutability Source # 
Instance details

Defined in EVM.Solidity

Ord Mutability Source # 
Instance details

Defined in EVM.Solidity

Show Mutability Source # 
Instance details

Defined in EVM.Solidity

Generic Mutability Source # 
Instance details

Defined in EVM.Solidity

Associated Types

type Rep Mutability :: Type -> Type #

type Rep Mutability Source # 
Instance details

Defined in EVM.Solidity

type Rep Mutability = D1 ('MetaData "Mutability" "EVM.Solidity" "hevm-0.49.0-inplace" 'False) ((C1 ('MetaCons "Pure" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "View" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "NonPayable" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Payable" 'PrefixI 'False) (U1 :: Type -> Type)))

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.