diff --git a/.gitignore b/.gitignore index c0b72bb..5cc712b 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ lib .hardhat/contracts # Deployment files +deployments/test.json **deployments/test/*.json **/tmp/* !**/tmp/example.json diff --git a/deployments/base-goerli.json b/deployments/base-goerli.json new file mode 100644 index 0000000..caec925 --- /dev/null +++ b/deployments/base-goerli.json @@ -0,0 +1,6 @@ +{ + "authRequestBuilder": "0xD4339e6d873b584FFfeACceE4CcB8Bf31Cd96ebb", + "claimRequestBuilder": "0xF03dA119efEc165DbDc15D593aB455810C7fEd74", + "requestBuilder": "0x0bB5c193aa815F7815aB8e854A87E041519CD2ad", + "signatureBuilder": "0xc8F165a3B4CfB7CD2Ae92A582F17b0d7EB3BcE11" +} \ No newline at end of file diff --git a/deployments/base.json b/deployments/base.json new file mode 100644 index 0000000..ab52036 --- /dev/null +++ b/deployments/base.json @@ -0,0 +1,6 @@ +{ + "authRequestBuilder": "0x8D090172DA53A21D27E7B651ab6E7D9334Ea0783", + "claimRequestBuilder": "0x1B05f16686396398F16f8916A032D738005126b7", + "requestBuilder": "0x40e208f4815Ce25b32BeEEC7415C6CA9424a898F", + "signatureBuilder": "0x1e7a99e06Ca2C1A63330eC2df8D4fC15EfDa4C55" +} diff --git a/foundry.toml b/foundry.toml index e04919c..c94bbbf 100644 --- a/foundry.toml +++ b/foundry.toml @@ -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" diff --git a/script/BaseConfig.sol b/script/BaseConfig.sol index fbd7526..c7cbc61 100644 --- a/script/BaseConfig.sol +++ b/script/BaseConfig.sol @@ -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); diff --git a/script/bash/save-deployments.sh b/script/bash/save-deployments.sh index 52bf4ab..007c555 100755 --- a/script/bash/save-deployments.sh +++ b/script/bash/save-deployments.sh @@ -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