Skip to main content

StdLib

Functions

skip

function skip(
uint256 time
) public

Parameters

NameTypeDescription
timeuint256

rewind

function rewind(
uint256 time
) public

Parameters

NameTypeDescription
timeuint256

hoax

function hoax(
address who
) public

Parameters

NameTypeDescription
whoaddress

hoax

function hoax(
address who,
uint256 give
) public

Parameters

NameTypeDescription
whoaddress
giveuint256

hoax

function hoax(
address who,
address origin
) public

Parameters

NameTypeDescription
whoaddress
originaddress

hoax

function hoax(
address who,
address origin,
uint256 give
) public

Parameters

NameTypeDescription
whoaddress
originaddress
giveuint256

startHoax

function startHoax(
address who
) public

Parameters

NameTypeDescription
whoaddress

startHoax

function startHoax(
address who,
uint256 give
) public

Parameters

NameTypeDescription
whoaddress
giveuint256

startHoax

function startHoax(
address who,
address origin
) public

Parameters

NameTypeDescription
whoaddress
originaddress

startHoax

function startHoax(
address who,
address origin,
uint256 give
) public

Parameters

NameTypeDescription
whoaddress
originaddress
giveuint256

deployCode

function deployCode(
string what,
bytes args
) public returns (address addr)

Parameters

NameTypeDescription
whatstring
argsbytes

deployCode

function deployCode(
string what
) public returns (address addr)

Parameters

NameTypeDescription
whatstring

stdError

StdStorage

struct StdStorage {
mapping(address => mapping(bytes4 => mapping(bytes32 => uint256))) slots;
mapping(address => mapping(bytes4 => mapping(bytes32 => bool))) finds;
bytes32[] _keys;
bytes4 _sig;
uint256 _depth;
address _target;
bytes32 _set;
}

stdStorage

Functions

sigs

function sigs(
string sigStr
) internal returns (bytes4)

Parameters

NameTypeDescription
sigStrstring

find

function find(
struct StdStorage self
) internal returns (uint256)

find an arbitrary storage slot given a function sig, input data, address of the contract and a value to check against

Parameters

NameTypeDescription
selfstruct StdStorage

target

function target(
struct StdStorage self,
address _target
) internal returns (struct StdStorage)

Parameters

NameTypeDescription
selfstruct StdStorage
_targetaddress

sig

function sig(
struct StdStorage self,
bytes4 _sig
) internal returns (struct StdStorage)

Parameters

NameTypeDescription
selfstruct StdStorage
_sigbytes4

sig

function sig(
struct StdStorage self,
string _sig
) internal returns (struct StdStorage)

Parameters

NameTypeDescription
selfstruct StdStorage
_sigstring

with_key

function with_key(
struct StdStorage self,
address who
) internal returns (struct StdStorage)

Parameters

NameTypeDescription
selfstruct StdStorage
whoaddress

with_key

function with_key(
struct StdStorage self,
uint256 amt
) internal returns (struct StdStorage)

Parameters

NameTypeDescription
selfstruct StdStorage
amtuint256

with_key

function with_key(
struct StdStorage self,
bytes32 key
) internal returns (struct StdStorage)

Parameters

NameTypeDescription
selfstruct StdStorage
keybytes32

depth

function depth(
struct StdStorage self,
uint256 _depth
) internal returns (struct StdStorage)

Parameters

NameTypeDescription
selfstruct StdStorage
_depthuint256

checked_write

function checked_write(
struct StdStorage self,
address who
) internal

Parameters

NameTypeDescription
selfstruct StdStorage
whoaddress

checked_write

function checked_write(
struct StdStorage self,
uint256 amt
) internal

Parameters

NameTypeDescription
selfstruct StdStorage
amtuint256

checked_write

function checked_write(
struct StdStorage self,
bytes32 set
) internal

Parameters

NameTypeDescription
selfstruct StdStorage
setbytes32

bytesToBytes32

function bytesToBytes32(
bytes b,
uint256 offset
) public returns (bytes32)

Parameters

NameTypeDescription
bbytes
offsetuint256

flatten

function flatten(
bytes32[] b
) private returns (bytes)

Parameters

NameTypeDescription
bbytes32[]

Events

SlotFound

event SlotFound(
address who,
bytes4 fsig,
bytes32 keysHash,
uint256 slot
)

Parameters

NameTypeDescription
whoaddress
fsigbytes4
keysHashbytes32
slotuint256

WARNING_UninitedSlot

event WARNING_UninitedSlot(
address who,
uint256 slot
)

Parameters

NameTypeDescription
whoaddress
slotuint256

Custom Errors

NotFound

error NotFound(bytes4)

NotStorage

error NotStorage(bytes4)

PackedSlot

error PackedSlot(bytes32)