Skip to content

Commit

Permalink
Merge pull request #202 from open-dollar/sepolia
Browse files Browse the repository at this point in the history
Sepolia update
  • Loading branch information
daopunk authored Nov 1, 2023
2 parents a8ffcbf + dbe36ab commit 65218f8
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARB_MAINNET_RPC=
ARB_MAINNET_DEPLOYER_PK=

ARB_GOERLI_RPC=
ARB_GOERLI_DEPLOYER_PK=
ARB_SEPOLIA_RPC=
ARB_SEPOLIA_DEPLOYER_PK=

ARB_ETHERSCAN_API_KEY=

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ src = 'test'
[rpc_endpoints]
mainnet = "${MAINNET_RPC}"
goerli = "${GOERLI_RPC}"
sepolia = "${SEPOLIA_RPC}"
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@
"build": "forge build",
"coverage": "forge coverage",
"deploy:anvil": "bash -c 'source .env && forge script DeployAnvil --with-gas-price 2000000000 -vvvvv --rpc-url $ANVIL_RPC --private-key $ANVIL_ONE --broadcast --ffi'",
"deploy:goerli": "bash -c 'source .env && forge script DeployGoerli --with-gas-price 2000000000 -vvvvv --rpc-url $GOERLI_RPC --private-key $GOERLI_DEPLOYER_PK --broadcast --verify --etherscan-api-key $ETHERSCAN_API_KEY'",
"deploy:goerli:ffi": "bash -c 'source .env && forge script DeployGoerli --with-gas-price 2000000000 -vvvvv --rpc-url $GOERLI_RPC --private-key $GOERLI_DEPLOYER_PK --broadcast --verify --etherscan-api-key $ETHERSCAN_API_KEY --ffi'",
"deploy:sepolia": "bash -c 'source .env && forge script DeployGoerli --with-gas-price 2000000000 -vvvvv --rpc-url $SEPOLIA_RPC --private-key $GOERLI_DEPLOYER_PK --broadcast --verify --etherscan-api-key $ETHERSCAN_API_KEY'",
"deploy:sepolia:ffi": "bash -c 'source .env && forge script DeployGoerli --with-gas-price 2000000000 -vvvvv --rpc-url $SEPOLIA_RPC --private-key $GOERLI_DEPLOYER_PK --broadcast --verify --etherscan-api-key $ETHERSCAN_API_KEY --ffi'",
"deploy:mainnet": "bash -c 'source .env && forge script DeployMainnet --rpc-url $MAINNET_RPC --broadcast --private-key $MAINNET_DEPLOYER_PK --verify --etherscan-api-key $ETHERSCAN_API_KEY'",
"deploy:mainnet:ffi": "bash -c 'source .env && forge script DeployMainnet --rpc-url $MAINNET_RPC --broadcast --private-key $MAINNET_DEPLOYER_PK --verify --etherscan-api-key $ETHERSCAN_API_KEY --ffi'",
"postinstall": "forge install",
"lint:check": "yarn lint:sol && forge fmt --check",
"lint:fix": "sort-package-json && forge fmt && yarn lint:sol --fix",
"lint:sol": "cross-env solhint 'src/**/*.sol' 'test/**/*.sol'",
"prepare": "husky install",
"script:goerli": "bash -c 'source .env && forge script GoerliScript --with-gas-price 2000000000 -vvvvv --rpc-url $GOERLI_RPC --broadcast --private-key $GOERLI_GOVERNOR_PK --verify --etherscan-api-key $ETHERSCAN_API_KEY'",
"script:goerli:delegate": "bash -c 'source .env && forge script GoerliDelegate --with-gas-price 2000000000 -vvvvv --rpc-url $GOERLI_RPC --broadcast --private-key $GOERLI_GOVERNOR_PK --verify --etherscan-api-key $ETHERSCAN_API_KEY'",
"simulate-deploy:goerli:ffi": "bash -c 'source .env && forge script DeployGoerli --with-gas-price 2000000000 -vvvvv --rpc-url $GOERLI_RPC --private-key $GOERLI_DEPLOYER_PK --ffi'",
"script:sepolia": "bash -c 'source .env && forge script GoerliScript --with-gas-price 2000000000 -vvvvv --rpc-url $SEPOLIA_RPC --broadcast --private-key $GOERLI_GOVERNOR_PK --verify --etherscan-api-key $ETHERSCAN_API_KEY'",
"script:sepolia:delegate": "bash -c 'source .env && forge script GoerliDelegate --with-gas-price 2000000000 -vvvvv --rpc-url $SEPOLIA_RPC --broadcast --private-key $GOERLI_GOVERNOR_PK --verify --etherscan-api-key $ETHERSCAN_API_KEY'",
"simulate-deploy:sepolia:ffi": "bash -c 'source .env && forge script DeployGoerli --with-gas-price 2000000000 -vvvvv --rpc-url $SEPOLIA_RPC --private-key $GOERLI_DEPLOYER_PK --ffi'",
"simulate-deploy:mainnet:ffi": "bash -c 'source .env && forge script DeployMainnet --rpc-url $MAINNET_RPC --private-key $MAINNET_DEPLOYER_PK --ffi'",
"test": "FOUNDRY_FUZZ_RUNS=128 FOUNDRY_FUZZ_MAX_TEST_REJECTS=1000000 forge test -vvv --ffi",
"test:e2e": "forge test --match-contract E2E -vvv --ffi",
Expand Down
11 changes: 6 additions & 5 deletions script/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ abstract contract Deploy is Common, Script {
// mainnet: revoke deployer, authorize governor
_revokeAllTo(governor);
} else {
// goerli || anvil: revoke deployer, authorize [H, P, governor]
// sepolia || anvil: revoke deployer, authorize [H, P, governor]
_delegateAllTo(H);
_delegateAllTo(P);
_revokeAllTo(governor);
Expand Down Expand Up @@ -165,7 +165,7 @@ contract DeployGoerli is GoerliParams, Deploy {

function setUp() public virtual {
_deployerPk = uint256(vm.envBytes32('GOERLI_DEPLOYER_PK'));
chainId = 421_613;
chainId = 421_614;
}

function mintAirdrop() public virtual override {
Expand All @@ -186,9 +186,10 @@ contract DeployGoerli is GoerliParams, Deploy {
collateral[RETH] = new MintableERC20('Rocket Pool ETH', 'rETH', 3);
collateral[MAGIC] = new MintableERC20('Magic', 'MAGIC', 0);

// to USD
chainlinkEthUSDPriceFeed =
chainlinkRelayerFactory.deployChainlinkRelayer(GOERLI_CHAINLINK_ETH_USD_FEED, ORACLE_INTERVAL_TEST);
// to USD - Sepolia does not have Chainlink feeds now
// chainlinkEthUSDPriceFeed =
// chainlinkRelayerFactory.deployChainlinkRelayer(GOERLI_CHAINLINK_ETH_USD_FEED, ORACLE_INTERVAL_TEST);
chainlinkEthUSDPriceFeed = new OracleForTestnet(1815e18);

// to ETH
OracleForTestnet _arbETHPriceFeed = new OracleForTestnet(GOERLI_ARB_ETH_PRICE_FEED);
Expand Down
6 changes: 3 additions & 3 deletions script/GoerliScript.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ import '@script/Registry.s.sol';
contract GoerliScript is GoerliDeployment, Common, Script {
function setUp() public virtual {
_governorPK = uint256(vm.envBytes32('GOERLI_GOVERNOR_PK'));
chainId = 421_613;
chainId = 421_614;
}

/**
* @notice This script is left as an example on how to use GoerliScript contract
* @dev This script is executed with `yarn script:goerli` command
* @dev This script is executed with `yarn script:sepolia` command
*/
function run() public {
_getEnvironmentParams();
Expand All @@ -40,7 +40,7 @@ contract GoerliScript is GoerliDeployment, Common, Script {
contract GoerliDelegate is GoerliDeployment, Common, Script {
function setUp() public virtual {
_governorPK = uint256(vm.envBytes32('GOERLI_GOVERNOR_PK'));
chainId = 421_613;
chainId = 421_614;
}

function run() public {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const fs = require("fs");
const path = require("path");

const filePath = path.join(__dirname, "../deployments/run-latest.json");
const filePath = path.join(__dirname, "../deployments/sepolia_421614/run-latest.json");

fs.readFile(filePath, "utf8", (err, data) => {
if (err) {
Expand Down
8 changes: 4 additions & 4 deletions test/e2e/Deploy.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ contract E2EDeploymentGoerliTest is DeployGoerli, CommonDeploymentTest {
uint256 FORK_BLOCK = 10_000_000;

function setUp() public override {
// vm.createSelectFork(vm.rpcUrl('goerli'), FORK_BLOCK);
uint256 forkId = vm.createFork(vm.rpcUrl('goerli'));
// vm.createSelectFork(vm.rpcUrl('sepolia'), FORK_BLOCK);
uint256 forkId = vm.createFork(vm.rpcUrl('sepolia'));
vm.selectFork(forkId);

// governor = address(69);
Expand All @@ -189,8 +189,8 @@ contract E2EDeploymentGoerliTest is DeployGoerli, CommonDeploymentTest {

contract GoerliDeploymentTest is GoerliDeployment, CommonDeploymentTest {
function setUp() public {
// vm.createSelectFork(vm.rpcUrl('goerli'), GOERLI_DEPLOYMENT_BLOCK);
uint256 forkId = vm.createFork(vm.rpcUrl('goerli'));
// vm.createSelectFork(vm.rpcUrl('sepolia'), GOERLI_DEPLOYMENT_BLOCK);
uint256 forkId = vm.createFork(vm.rpcUrl('sepolia'));
vm.selectFork(forkId);

_getEnvironmentParams();
Expand Down

0 comments on commit 65218f8

Please sign in to comment.