Skip to main content

MCHelpers

Git Source

🛠️ Helper ♻️ Reset Current Context 🤲 Set Storage Reader

Functions

reset


♻️ Reset Current Context

function reset(MCDevKit storage mc) internal returns (MCDevKit storage);

setStorageReader


🤲 Set Storage Reader

function setStorageReader(MCDevKit storage mc, Dictionary_1 memory dictionary, bytes4 selector, address implementation)
internal
returns (MCDevKit storage);

setStorageReader

function setStorageReader(MCDevKit storage mc, string memory bundleName, bytes4 selector, address implementation)
internal
returns (MCDevKit storage);

setStorageReader

function setStorageReader(MCDevKit storage mc, bytes4 selector, address implementation)
internal
returns (MCDevKit storage);

loadPrivateKey

ForgeHelper Wrapper

🔧 Env File

function loadPrivateKey(MCDevKit storage, string memory envKey) internal view returns (uint256);

loadAddressFromEnv

function loadAddressFromEnv(MCDevKit storage, string memory envKey) internal view returns (address);

injectCode


📍 Address Operation

function injectCode(MCDevKit storage, address target, bytes memory runtimeBytecode) internal;

injectDictionary

function injectDictionary(MCDevKit storage, address proxy, address dictionary) internal;

getAddress

function getAddress(MCDevKit storage, address target, bytes32 slot) internal view returns (address);

getDictionaryAddress

function getDictionaryAddress(MCDevKit storage, address proxy) internal view returns (address);

assumeAddressIsNotReserved

function assumeAddressIsNotReserved(MCDevKit storage, address addr) internal pure;

msgSender


📓 Context

function msgSender(MCDevKit storage) internal returns (address);

assignLabel


🏷️ Label

function assignLabel(MCDevKit storage, address addr, string memory name) internal returns (address);

getLabel

function getLabel(MCDevKit storage, address addr) internal view returns (string memory);

pauseBroadcast


📡 Broadcast

function pauseBroadcast(MCDevKit storage) internal;

resumeBroadcast

function resumeBroadcast(MCDevKit storage, bool isBroadcasting, address currentSender) internal;

expectRevert


🛠️ Forge Extender

function expectRevert(MCDevKit storage, string memory message) internal;