diff --git a/README.md b/README.md index 87dead6..2765943 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,33 @@ - OFT Config: `BG9oPj76NRPbj1e1GbL4imnqo9VD7W2ukpnRFSWtq5CA` - As bytes32: `0x9876880bee04a9020e619b1be124ee307e03ca94bab4f32a7a22cfd2ccee3927` +### Solana +- Admin: Chain-respective msig +- `FRAX` + - SPL Token: B4Ds2fCbxjSiVLNyGQd44htvvNuVxzdoJSxNsRv3nxpE + - OFT Config: 7pw5h3gc4LQCGPdq9qsqCdBDt6vtyk5CWjL9spsjp7Sa + - As bytes32: 0x656d91ab3d464c05cd1345ce21c78e36140a36491e102fbb08c58af73aafe89b +- `sFrax` + - SPL Token: DnVyztLHnDyTqL3xfPYF9Uqpgrhcxphn6e31sVAwtg6K + - OFT Config: 3BcysJF4fQx86fVTDTBGNpZyRpeMyTF8XsuvPHJQuP3V + - As bytes32: 0x206fdd7d0be90d8ff93f6f7f4bd4d8b42ca8977317da0b7d2861299e3c589dd8 +- `sfrxETH` + - SPL Token: 6iHW2j5dvW8EiEVSXqQFjm7c5xNd4MdYuXLrW3eQ1UYw + - OFT Config: 8AdTghMT8yyNpWrTuPoDjrtXW7t1YEZgLVjWDftWfCxo + - As bytes32: 0x6a7942e4eb4938d5490d8187183d01123f515025f4244670aff7f8ecd2250d50 +- `FXS` + - SPL Token: 8QRvtWw4XYQW7UqTiGhzyWZkhCqSwZDA5qjRWDotSZ4e + - OFT Config: 5KYEyuA1cAdnZFj4i6zUjTEre4s7snacyXbkTmNqLjJs + - As bytes32: 0x402e86d1cfd2cde4fac63aa8d9892eca6d3c0e08e8335622124332a95df6c10c +- `frxETH` + - SPL Token: CuXHLCxCcyPkmbemPxh7PAWedfFffeL82b6VPJmonTaa + - OFT Config: AzaSy9yr44e4bnWNdrNkxmye1kEYmbbgGfY8a3ZqzuMf + - As bytes32: 0x94791ba0aae2b57460c63d36346392d849b22f39fd3eafad5bc82d01e352dde6 +- `FPI` + - SPL Token: FqRC7vNLS3ubbhtdqNSz8Q5ei8VdUxF6H6eoXQLHxihr + - OFT Config: BG9oPj76NRPbj1e1GbL4imnqo9VD7W2ukpnRFSWtq5CA + - As bytes32: 0x9876880bee04a9020e619b1be124ee307e03ca94bab4f32a7a22cfd2ccee3927 + ## New Chain Deployment - Ensure `PK_OFT_DEPLOYER` and `PK_CONFIG_DEPLOYER` are the private keys for `0x9C9dD956b413cdBD81690c9394a6B4D22afe6745` and `0x0990be6dB8c785FBbF9deD8bAEc612A10CaE814b`, respectively. - Modify `.env` `RPC_URL` to the new chain RPC diff --git a/scripts/BaseL0Script.sol b/scripts/BaseL0Script.sol index 2279718..aadfa4d 100644 --- a/scripts/BaseL0Script.sol +++ b/scripts/BaseL0Script.sol @@ -51,11 +51,24 @@ contract BaseL0Script is Script { } L0Config[] public legacyConfigs; L0Config[] public proxyConfigs; - L0Config[] public configs; // legacy & proxy configs + L0Config[] public evmConfigs; + L0Config[] public nonEvmConfigs; + L0Config[] public allConfigs; // legacy, proxy, and non-evm allConfigs L0Config public broadcastConfig; // config of actively-connected (broadcasting) chain L0Config public simulateConfig; // Config of the simulated chain L0Config[] public broadcastConfigArray; // length of 1 of broadcastConfig - bool public activeLegacy; // true if we're broadcasting to legacy chain + bool public activeLegacy; // true if we're broadcasting to legacy chain (setup by L0 team) + + /// @dev alphabetical order as json is read in by keys alphabetically. + struct NonEvmPeer { + bytes32 fpi; + bytes32 frax; + bytes32 frxEth; + bytes32 fxs; + bytes32 sFrax; + bytes32 sFrxEth; + } + bytes32[][] public nonEvmPeersArrays; // Mock implementation used to enable pre-determinsitic proxy creation address public implementationMock; @@ -73,9 +86,9 @@ contract BaseL0Script is Script { // 1:1 match between these arrays for setting peers address[] public legacyOfts; address[] public expectedProxyOfts; // to assert against proxyOfts - address[] public proxyOfts; + address[] public proxyOfts; // the OFTs deployed through `DeployFraxOFTProtocol.s.sol` - EnforcedOptionParam[] public enforcedOptionsParams; + EnforcedOptionParam[] public enforcedOptionParams; SetConfigParam[] public setConfigParams; @@ -84,7 +97,7 @@ contract BaseL0Script is Script { string public json; function version() public virtual pure returns (uint256, uint256, uint256) { - return (1, 1, 3); + return (1, 2, 0); } modifier broadcastAs(uint256 privateKey) { @@ -97,7 +110,7 @@ contract BaseL0Script is Script { L0Config memory _simulateConfig ) virtual { // Clear out any previous txs - delete enforcedOptionsParams; + delete enforcedOptionParams; delete setConfigParams; delete serializedTxs; @@ -148,10 +161,11 @@ contract BaseL0Script is Script { function loadJsonConfig() public virtual { string memory root = vm.projectRoot(); + + // L0Config.json + string memory path = string.concat(root, "/scripts/L0Config.json"); json = vm.readFile(path); - - // load and write to persistent storage // legacy L0Config[] memory legacyConfigs_ = abi.decode(json.parseRaw(".Legacy"), (L0Config[])); @@ -163,7 +177,8 @@ contract BaseL0Script is Script { activeLegacy = true; } legacyConfigs.push(config_); - configs.push(config_); + allConfigs.push(config_); + evmConfigs.push(config_); } // proxy (active deployment loaded as broadcastConfig) @@ -176,10 +191,39 @@ contract BaseL0Script is Script { activeLegacy = false; } proxyConfigs.push(config_); - configs.push(config_); + allConfigs.push(config_); + evmConfigs.push(config_); + } + + // Non-EVM allConfigs + /// @dev as foundry cannot deploy to non-evm, a non-evm chain will never be the active/connected chain + L0Config[] memory nonEvmConfigs_ = abi.decode(json.parseRaw(".Non-EVM"), (L0Config[])); + for (uint256 i=0; i