diff --git a/example.env b/example.env index ee2fc7e..297d1a5 100644 --- a/example.env +++ b/example.env @@ -7,4 +7,5 @@ GNOSISSCAN_KEY= POLYGONSCAN_KEY= OPTIMISM_KEY= ARBISCAN_KEY= +BASESCAN_KEY= FOUNDRY_PROFILE= \ No newline at end of file diff --git a/foundry.toml b/foundry.toml index a8aa75e..30a985a 100644 --- a/foundry.toml +++ b/foundry.toml @@ -52,6 +52,7 @@ wrap_comments = true [rpc_endpoints] arbitrum = "https://arbitrum-mainnet.infura.io/v3/${INFURA_KEY}" +base = "https://base-mainnet.infura.io/v3/${INFURA_KEY}" celo = "${CELO_RPC}" gnosis = "${GC_RPC}" local = "http://localhost:8545" @@ -62,6 +63,7 @@ sepolia = "https://sepolia.infura.io/v3/${INFURA_KEY}" [etherscan] arbitrum = { key = "${ARBISCAN_KEY}", url = "https://api.arbiscan.io/api" } +base = { key = "${BASESCAN_KEY}", url = "https://api.basescan.org/api" } celo = { key = "${CELOSCAN_KEY}", url = "https://api.celoscan.com/api" } gnosis = { key = "${GNOSISSCAN_KEY}", url = "https://api.gnosisscan.io/api" } mainnet = { key = "${ETHERSCAN_KEY}", url = "https://api.etherscan.io/api" } diff --git a/script/Deploy.s.sol b/script/Deploy.s.sol index aeeb681..0261594 100644 --- a/script/Deploy.s.sol +++ b/script/Deploy.s.sol @@ -10,7 +10,7 @@ contract Deploy is Script { // default values bool internal _verbose = true; - string internal _version = "0.2.0"; // increment this with each new deployment + string internal _version = "0.3.0"; // increment this with each new deployment /// @dev Override default values, if desired function prepare(bool verbose, string memory version) public { @@ -50,24 +50,6 @@ contract Deploy is Script { } } -/// @dev Deploy pre-compiled ir-optimized bytecode to a non-deterministic address -contract DeployPrecompiled is Deploy { - /// @dev Update SALT and default values in Deploy contract - - function run() public override { - vm.startBroadcast(deployer()); - - bytes memory args = abi.encode( /* insert constructor args here */ ); - - /// @dev Load and deploy pre-compiled ir-optimized bytecode. - implementation = AllowlistEligibility(deployCode("optimized-out/Module.sol/Module.json", args)); - - vm.stopBroadcast(); - - _log("Precompiled "); - } -} - /* FORGE CLI COMMANDS ## A. Simulate the deployment locally @@ -77,10 +59,9 @@ forge script script/Deploy.s.sol -f mainnet forge script script/Deploy.s.sol -f mainnet --broadcast --verify ## C. Fix verification issues (replace values in curly braces with the actual values) -forge verify-contract --chain-id 1 --num-of-optimizations 1000000 --watch --constructor-args $(cast abi-encode \ - "constructor({args})" "{arg1}" "{arg2}" "{argN}" ) \ - --compiler-version v0.8.19 {deploymentAddress} \ - src/{Counter}.sol:{Counter} --etherscan-api-key $ETHERSCAN_KEY +forge verify-contract --chain-id 11155111 --num-of-optimizations 1000000 --watch --constructor-args $(cast abi-encode \ + "constructor(string)" "0.3.0" ) --compiler-version v0.8.19 0x80336fb7b6B653686eBe71d2c3ee685b70108B8f \ + src/AllowlistEligibility.sol:AllowlistEligibility --etherscan-api-key $ETHERSCAN_KEY ## D. To verify ir-optimized contracts on etherscan... 1. Run (C) with the following additional flag: `--show-standard-json-input > etherscan.json`