Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added configurations to prepare for mainnet deployments #29

Merged
merged 1 commit into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ ETHERSCAN_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
POLYGONSCAN_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# RPC endpoint API keys
API_KEY_RPC_MUMBAI=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
API_KEY_RPC_MAINNET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
API_KEY_RPC_SEPOLIA=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
API_KEY_RPC_POLYGON=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
API_KEY_RPC_MUMBAI=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# Block explorer API keys
API_KEY_POLYGONSCAN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Expand Down
9 changes: 7 additions & 2 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,14 @@ remappings = [
fs_permissions = [{ access = 'read', path = './scripts/config/' }]

[etherscan]
mumbai = { key = "${API_KEY_POLYGONSCAN}" }
mainnet = { key = "$API_KEY_ETHERSCAN" }
sepolia = { key = "${API_KEY_ETHERSCAN}" }
polygon = { key = "${API_KEY_POLYGONSCAN}" }
mumbai = { key = "${API_KEY_POLYGONSCAN}" }


[rpc_endpoints]
mumbai = "https://polygon-mumbai.g.alchemy.com/v2/${API_KEY_RPC_MUMBAI}"
mainnet = "https://eth-mainnet.g.alchemy.com/v2/${API_KEY_RPC_MAINNET}"
sepolia = "https://eth-sepolia.g.alchemy.com/v2/${API_KEY_RPC_SEPOLIA}"
polygon = "https://polygon-mainnet.g.alchemy.com/v2/${API_KEY_RPC_POLYGON}"
mumbai = "https://polygon-mumbai.g.alchemy.com/v2/${API_KEY_RPC_MUMBAI}"
9 changes: 7 additions & 2 deletions scripts/base/BaseDeploy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ contract BaseDeploy is Deployer {
console2.log("");
console2.log("Chain: %s", chain);
console2.log("Deployer: %s", deployer);
console2.log("Server signer %s", config.serverSideSigner());
console2.log("Version: %s.%s", config.majorVersion(), config.minorVersion());
console2.log("");
}
Expand Down Expand Up @@ -640,7 +641,9 @@ contract BaseDeploy is Deployer {

console2.log("Total asset whitelist entries changes: %s", assets.length);
console2.log("");
} else {
}

if (assets.length == 0 && whitelist.length != 0) {
revert("No changes to the whitelist were specified.");
}
}
Expand Down Expand Up @@ -698,7 +701,9 @@ contract BaseDeploy is Deployer {

console2.log("Total payment whitelist entries changes: %s", assets.length);
console2.log("");
} else {
}

if (assets.length == 0 && whitelist.length != 0) {
revert("No changes to the whitelist were specified.");
}
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/base/Config.sol
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ contract Config is Script {
conduitKey = _parseBytes32("$.conduitKey");

// load the whitelists
_parseAssetWhitelistArray("$.assetWhitelist[*]~");
_parsePaymentWhitelistArray("$.paymentWhitelist[*]~");
_parseAssetWhitelistArray("$.assetWhitelist");
_parsePaymentWhitelistArray("$.paymentWhitelist");
}

function assetWhitelist() external view returns (AssetWhitelist[] memory) {
Expand Down
25 changes: 25 additions & 0 deletions scripts/config/mainnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"majorVersion": 1,
"minorVersion": 0,
"safeSingleton": "0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552",
"safeProxyFactory": "0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2",
"serverSideSigner": "0x000000195c8902cd111fd87627A38cE0cbA22B94",
"create2Deployer": "0x0000000000000000000000000000000000000000",
"kernel": "0x0000000000000000000000000000000000000000",
"storeModuleProxy": "0x0000000000000000000000000000000000000000",
"storeModuleImpl": "0x0000000000000000000000000000000000000000",
"escrwModuleProxy": "0x0000000000000000000000000000000000000000",
"escrwModuleImpl": "0x0000000000000000000000000000000000000000",
"createPolicy": "0x0000000000000000000000000000000000000000",
"stopPolicy": "0x0000000000000000000000000000000000000000",
"factoryPolicy": "0x0000000000000000000000000000000000000000",
"adminPolicy": "0x0000000000000000000000000000000000000000",
"guardPolicy": "0x0000000000000000000000000000000000000000",
"fallbackPolicy": "0x0000000000000000000000000000000000000000",
"seaport": "0x0000000000000000000000000000000000000000",
"conduitController": "0x0000000000000000000000000000000000000000",
"conduit": "0x0000000000000000000000000000000000000000",
"conduitKey": "0x0000000000000000000000000000000000000000000000000000000000000000",
"assetWhitelist": [],
"paymentWhitelist": []
}
25 changes: 25 additions & 0 deletions scripts/config/polygon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"majorVersion": 1,
"minorVersion": 0,
"safeSingleton": "0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552",
"safeProxyFactory": "0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2",
"serverSideSigner": "0x000000195c8902cd111fd87627A38cE0cbA22B94",
"create2Deployer": "0x0000000000000000000000000000000000000000",
"kernel": "0x0000000000000000000000000000000000000000",
"storeModuleProxy": "0x0000000000000000000000000000000000000000",
"storeModuleImpl": "0x0000000000000000000000000000000000000000",
"escrwModuleProxy": "0x0000000000000000000000000000000000000000",
"escrwModuleImpl": "0x0000000000000000000000000000000000000000",
"createPolicy": "0x0000000000000000000000000000000000000000",
"stopPolicy": "0x0000000000000000000000000000000000000000",
"factoryPolicy": "0x0000000000000000000000000000000000000000",
"adminPolicy": "0x0000000000000000000000000000000000000000",
"guardPolicy": "0x0000000000000000000000000000000000000000",
"fallbackPolicy": "0x0000000000000000000000000000000000000000",
"seaport": "0x0000000000000000000000000000000000000000",
"conduitController": "0x0000000000000000000000000000000000000000",
"conduit": "0x0000000000000000000000000000000000000000",
"conduitKey": "0x0000000000000000000000000000000000000000000000000000000000000000",
"assetWhitelist": [],
"paymentWhitelist": []
}