Skip to content

Instantly share code, notes, and snippets.

View PraneshASP's full-sized avatar
Building

Pranesh A S PraneshASP

Building
View GitHub Profile
@PraneshASP
PraneshASP / Test.t.sol
Last active February 13, 2024 05:11
Using Mesc in foundry tests to avoid hardcoding urls.
// See Mesc Reference for setup: https://github.com/paradigmxyz/mesc/tree/main/cli#reference
contract TestSetup is Test {
function fetchRpcUrlFromMesc(string memory networkName) internal returns (string memory url) {
string[] memory inputs = new string[](3);
inputs[0] = "mesc";
inputs[1] = "url";
inputs[2] = networkName;