-
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.
build: add deployment simple skeleton
- Loading branch information
1 parent
69111b8
commit ecede4a
Showing
3 changed files
with
63 additions
and
12 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
This file was deleted.
Oops, something went wrong.
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,60 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.8.13; | ||
|
||
import {Script, console2} from "forge-std/Script.sol"; | ||
import {LyraSelfPayingForwarder} from "src/gelato/LyraSelfPayingForwarder.sol"; | ||
import {LyraSponsoredForwarder} from "src/gelato/LyraSponsoredForwarder.sol"; | ||
|
||
|
||
contract Deploy is Script { | ||
function setUp() public {} | ||
|
||
struct DeploymentConfig { | ||
address trustedForwarder; | ||
address usdcLocal; | ||
address usdcRemote; | ||
address bridge; | ||
address socketVault; | ||
} | ||
|
||
function run() public { | ||
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); | ||
vm.startBroadcast(deployerPrivateKey); | ||
|
||
address deployer = vm.addr(deployerPrivateKey); | ||
console2.log("Start deploying core contracts! deployer: ", deployer); | ||
|
||
DeploymentConfig memory config = _getConfig(); | ||
|
||
// deploy LyraSponsoredForwarder | ||
LyraSponsoredForwarder sponsoredForwarder = new LyraSponsoredForwarder( | ||
config.trustedForwarder, | ||
config.usdcLocal, | ||
config.usdcRemote, | ||
config.bridge, | ||
config.socketVault | ||
); | ||
|
||
console2.log("LyraSponsoredForwarder deployed at: ", address(sponsoredForwarder)); | ||
|
||
|
||
vm.stopBroadcast(); | ||
} | ||
|
||
function _getConfig() internal returns (DeploymentConfig memory) { | ||
|
||
uint opgoerli = 420; | ||
|
||
if (block.chainid == opgoerli) { | ||
return DeploymentConfig({ | ||
trustedForwarder: 0xd8253782c45a12053594b9deB72d8e8aB2Fca54c, | ||
usdcLocal: 0xe05606174bac4A6364B31bd0eCA4bf4dD368f8C6, // official USDC op goerli | ||
usdcRemote: 0x0000000000000000000000000000000000000000, // | ||
bridge: 0x0000000000000000000000000000000000000000, // not testing l1 standard bridge on goerli | ||
socketVault: 0x0000000000000000000000000000000000000000 // todo: add socket vault | ||
}); | ||
} | ||
|
||
revert("Need config set! Please set config in script/Deploy.s.sol"); | ||
} | ||
} |