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

feat: add base network #4

Merged
merged 3 commits into from
Aug 21, 2023
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ lib
.hardhat/contracts

# Deployment files
deployments/test.json
**deployments/test/*.json
**/tmp/*
!**/tmp/example.json
6 changes: 6 additions & 0 deletions deployments/base-goerli.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"authRequestBuilder": "0xD4339e6d873b584FFfeACceE4CcB8Bf31Cd96ebb",
"claimRequestBuilder": "0xF03dA119efEc165DbDc15D593aB455810C7fEd74",
"requestBuilder": "0x0bB5c193aa815F7815aB8e854A87E041519CD2ad",
"signatureBuilder": "0xc8F165a3B4CfB7CD2Ae92A582F17b0d7EB3BcE11"
}
6 changes: 6 additions & 0 deletions deployments/base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"authRequestBuilder": "0x8D090172DA53A21D27E7B651ab6E7D9334Ea0783",
"claimRequestBuilder": "0x1B05f16686396398F16f8916A032D738005126b7",
"requestBuilder": "0x40e208f4815Ce25b32BeEEC7415C6CA9424a898F",
"signatureBuilder": "0x1e7a99e06Ca2C1A63330eC2df8D4fC15EfDa4C55"
}
2 changes: 2 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ solc_version="0.8.19"
[rpc_endpoints]
arbitrum_one = "https://arb-mainnet.g.alchemy.com/v2/${ALCHEMY_API_KEY}"
arbitrum_goerli = "https://arb-goerli.g.alchemy.com/v2/${ALCHEMY_API_KEY}"
base = "https://mainnet.base.org"
base_goerli = "https://goerli.base.org"
goerli = "https://eth-goerli.g.alchemy.com/v2/${ALCHEMY_API_KEY}"
gnosis = "https://rpc.gnosischain.com"
localhost = "http://localhost:8545"
Expand Down
4 changes: 3 additions & 1 deletion script/BaseConfig.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,20 @@ contract BaseDeploymentConfig is Script {
_compareStrings(chainName, "polygon") ||
_compareStrings(chainName, "optimism") ||
_compareStrings(chainName, "arbitrum-one") ||
_compareStrings(chainName, "base") ||
_compareStrings(chainName, "testnet-goerli") ||
_compareStrings(chainName, "testnet-sepolia") ||
_compareStrings(chainName, "testnet-mumbai") ||
_compareStrings(chainName, "optimism-goerli") ||
_compareStrings(chainName, "arbitrum-goerli") ||
_compareStrings(chainName, "base-goerli") ||
_compareStrings(chainName, "scroll-testnet-goerli") ||
_compareStrings(chainName, "staging-goerli") ||
_compareStrings(chainName, "staging-mumbai") ||
_compareStrings(chainName, "test")
) {
config = _readDeploymentConfig(
string.concat(vm.projectRoot(), "/deployments/", chainName, "/run-latest.json")
string.concat(vm.projectRoot(), "/deployments/", chainName, ".json")
);
} else {
revert ChainNameNotFound(chainName);
Expand Down
6 changes: 1 addition & 5 deletions script/bash/save-deployments.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,12 @@ find "$source_folder" -type f -name "*.json" | while read -r json_file; do
subfolder_name=$(basename "$subfolder")
destination_folder="$destination_root/$subfolder_name"

# Create the destination folder after deleting the previous one if it exists
if [ -d "$destination_folder" ]; then rm -Rf $destination_folder; fi
mkdir "$destination_folder"

# Find the latest JSON file in the subfolder
latest_file=$(ls -t "$subfolder"/*.json | head -n 1)

if [ -n "$latest_file" ]; then
# Copy the latest JSON file to the destination folder to keep track of the latest deployment
cp "$latest_file" "$destination_folder"
cp "$latest_file" "$destination_root/$subfolder_name.json"
else
echo "No matching files found in $subfolder_name."
fi
Expand Down