generated from defi-wonderland/solidity-foundry-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
102 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
## For e2e tests and deployment scripts | ||
MAINNET_RPC= | ||
MAINNET_DEPLOYER_PK= | ||
|
||
GOERLI_RPC= | ||
GOERLI_DEPLOYER_PK= | ||
OPTIMISM_RPC= | ||
OPTIMISM_GOERLI_RPC= | ||
|
||
## For deployment scripts | ||
DEPLOYER_MAINNNET_PRIVATE_KEY= | ||
DEPLOYER_GOERLI_PRIVATE_KEY= | ||
DEPLOYER_OPTIMISM_PRIVATE_KEY= | ||
DEPLOYER_OPTIMISM_GOERLI_PRIVATE_KEY= | ||
STORAGE_MIRROR_ADDRESS= | ||
|
||
ETHERSCAN_API_KEY= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity =0.8.19; | ||
|
||
import {DeployHomeChain, DeployVars} from 'scripts/DeployHomeChain.s.sol'; | ||
|
||
// We threat Goerli as the Home Chain in this case | ||
contract DeployGoerli is DeployHomeChain { | ||
address public deployer = vm.rememberKey(vm.envUint('DEPLOYER_GOERLI_PRIVATE_KEY')); | ||
|
||
function run() external { | ||
vm.startBroadcast(deployer); | ||
|
||
DeployVars memory _deployVars = DeployVars(deployer); | ||
|
||
// Deploy protocol | ||
_deploy(_deployVars); | ||
|
||
vm.stopBroadcast(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity =0.8.19; | ||
|
||
import {DeployHomeChain, DeployVars} from 'scripts/DeployHomeChain.s.sol'; | ||
|
||
// We threat Mainnet as the Home Chain in this case | ||
contract DeployMainnet is DeployHomeChain { | ||
address public deployer = vm.rememberKey(vm.envUint('DEPLOYER_MAINNNET_PRIVATE_KEY')); | ||
|
||
function run() external { | ||
vm.startBroadcast(deployer); | ||
|
||
DeployVars memory _deployVars = DeployVars(deployer); | ||
|
||
// Deploy protocol | ||
_deploy(_deployVars); | ||
|
||
vm.stopBroadcast(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity =0.8.19; | ||
|
||
import {DeployNonHomeChain, DeployVars} from 'scripts/DeployNonHomeChain.s.sol'; | ||
|
||
// We threat Goerli as the Home Chain in this case | ||
contract DeployOptimism is DeployNonHomeChain { | ||
address public deployer = vm.rememberKey(vm.envUint('DEPLOYER_OPTIMISM_PRIVATE_KEY')); | ||
address public storageMirrorAddress = vm.envAddress('STORAGE_MIRROR_ADDRESS'); | ||
|
||
function run() external { | ||
vm.startBroadcast(deployer); | ||
|
||
DeployVars memory _deployVars = DeployVars(deployer, storageMirrorAddress); | ||
|
||
// Deploy protocol | ||
_deploy(_deployVars); | ||
|
||
vm.stopBroadcast(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity =0.8.19; | ||
|
||
import {DeployNonHomeChain, DeployVars} from 'scripts/DeployNonHomeChain.s.sol'; | ||
|
||
// We threat Goerli as the Home Chain in this case | ||
contract DeployOptimismGoerli is DeployNonHomeChain { | ||
address public deployer = vm.rememberKey(vm.envUint('DEPLOYER_OPTIMISM_PRIVATE_KEY')); | ||
address public storageMirrorAddress = vm.envAddress('STORAGE_MIRROR_ADDRESS'); | ||
|
||
function run() external { | ||
vm.startBroadcast(deployer); | ||
|
||
DeployVars memory _deployVars = DeployVars(deployer, storageMirrorAddress); | ||
// Deploy protocol | ||
_deploy(_deployVars); | ||
|
||
vm.stopBroadcast(); | ||
} | ||
} |