generated from FraxFinance/frax-template
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
846929b
commit 509fd3e
Showing
3 changed files
with
75 additions
and
1 deletion.
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 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,37 @@ | ||
// SPDX-License-Identifier: ISC | ||
pragma solidity ^0.8.19; | ||
|
||
import { BaseScript } from "frax-std/BaseScript.sol"; | ||
import { console } from "frax-std/FraxTest.sol"; | ||
import { EthereumNativeBridgeComposer } from "../contracts/composers/EthereumNativeBridgeComposer.sol"; | ||
import { EthereumLZSenderAMO } from "../contracts/amos/EthereumLZSenderAMO.sol"; | ||
import { FraxProxy } from "../contracts/FraxProxy.sol"; | ||
|
||
// Run this with source .env && forge script --broadcast --rpc-url $MAINNET_URL DeployFraxtalL.s.sol | ||
contract DeployFraxtalL is BaseScript { | ||
|
||
address multisig = address(0); // TODO | ||
|
||
address endpoint = 0x1a44076050125825900e736c501f859c50fE728c; | ||
address l1Bridge = 0x34C0bD5877A5Ee7099D0f5688D65F4bB9158BDE2; | ||
address fraxtalLzCurveAmo = address(0); // TODO | ||
|
||
address fraxOft = 0x909DBdE1eBE906Af95660033e478D59EFe831fED; | ||
address sFraxOft = 0xe4796cCB6bB5DE2290C417Ac337F2b66CA2E770E; | ||
address sFrxEthOft = 0x1f55a02A049033E3419a8E2975cF3F572F4e6E9A; | ||
address fxsOft = 0x23432452B720C80553458496D4D9d7C5003280d0; | ||
address fpiOft = 0x6Eca253b102D41B6B69AC815B9CC6bD47eF1979d; | ||
|
||
function run() public broadcaster { | ||
|
||
// deploy EthereumNativeBridgeComposer | ||
address implementation = address(new EthereumNativeBridgeComposer()); | ||
FraxProxy proxy = new FraxProxy(implementation, multisig, abi.encodeCall(EthereumNativeBridgeComposer.initialize, (endpoint, l1Bridge, fraxtalLzCurveAmo))); | ||
console.log("EthereumNativeBridgeComposer @ ", address(proxy)); | ||
|
||
// Deploy EthereumLZSenderAMO | ||
implementation = address(new EthereumLZSenderAMO()); | ||
proxy = new FraxProxy(implementation, multisig, abi.encodeCall(EthereumLZSenderAMO.initialize, (fraxtalLzCurveAmo, fraxOft, sFraxOft, sFrxEthOft, fxsOft, fpiOft))); | ||
console.log("EthereumLZSenderAMO @ ", address(proxy)); | ||
} | ||
} |
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,27 @@ | ||
// SPDX-License-Identifier: ISC | ||
pragma solidity ^0.8.19; | ||
|
||
import { BaseScript } from "frax-std/BaseScript.sol"; | ||
import { console } from "frax-std/FraxTest.sol"; | ||
import { FraxtalLZCurveAMO } from "../contracts/amos/FraxtalLZCurveAMO.sol"; | ||
import { FraxProxy } from "../contracts/FraxProxy.sol"; | ||
|
||
// Run this with source .env && forge script --broadcast --rpc-url $MAINNET_URL DeployFraxtalL.s.sol | ||
contract SetupFraxtal is BaseScript { | ||
|
||
FraxtalLZCurveAMO fraxtalLzCurveAmo = FraxtalLZCurveAMO(address(0)); // TODO | ||
address ethereumComposer = address(0); // TODO | ||
address ethereumLzSenderAmo = address(0); // TODO | ||
address multisig = address(0); // TODO | ||
|
||
bytes32 DEFAULT_ADMIN_ROLE = 0x00; | ||
|
||
function run() public broadcaster { | ||
fraxtalLzCurveAmo.setStorage({ | ||
_ethereumComposer: ethereumComposer, | ||
_ethereumLzSenderAmo: ethereumLzSenderAmo | ||
}); | ||
fraxtalLzCurveAmo.grantRole(DEFAULT_ADMIN_ROLE, multisig); | ||
fraxtalLzCurveAmo.renounceRole(DEFAULT_ADMIN_ROLE, deployer); | ||
} | ||
} |