Skip to content

Commit

Permalink
Merge branch 'master' into jun/rswBTC
Browse files Browse the repository at this point in the history
  • Loading branch information
junkim012 committed Aug 22, 2024
2 parents e370738 + 7bf0e41 commit 8fcbdd6
Show file tree
Hide file tree
Showing 18 changed files with 274 additions and 57 deletions.
27 changes: 10 additions & 17 deletions deployment-config/boba-eth-l1-08-09-24.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
{
"protocolAdmin": "0x0000000000417626Ef34D62C4DC189b021603f2F",

"boringVault":{
"boringVault": {
"boringVaultSalt": "0x1000000000000000000000000000000000000000000000000000000000000001",
"boringVaultName": "Boba Native Yield Nucleus Token",
"boringVaultName": "Boba Native Yield Nucleus Token",
"boringVaultSymbol": "bobaETH",

"address": "0x0000000000000000000000000000000000000000"
},

"manager":{
"managerSalt": "0x2000000000000000000000000000000000000000000000000000000000000001",
"address": "0x0000000000000000000000000000000000000000"

},
"manager": {
"managerSalt": "0x2000000000000000000000000000000000000000000000000000000000000001",
"address": "0x0000000000000000000000000000000000000000"
},

"accountant":{
"accountant": {
"accountantSalt": "0x3000000000000000000000000000000000000000000000000000000000000001",
"payoutAddress": "0x0000000000417626Ef34D62C4DC189b021603f2F",
"allowedExchangeRateChangeUpper": "10030",
Expand All @@ -25,13 +22,13 @@

"address": "0x0000000000000000000000000000000000000000"
},

"teller": {
"tellerSalt": "0x4000000000000000000000000000000000000000000000000000000000000001",
"tellerSalt": "0x4000000000000000000000000000000000000000000000000000000000000002",
"maxGasForPeer": 200000,
"minGasForPeer": 60000,
"peerEid": 0,
"tellerContractName": "CrossChainOPTellerWithMultiAssetSupport",
"opMessenger": "0x6D4528d192dB72E282265D6092F4B872f9Dff69e",
"assets": [
"0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee",
"0xbf5495efe5db9ce00f80364c8b423567e58d2110",
Expand All @@ -46,14 +43,10 @@
"rolesAuthoritySalt": "0x5000000000000000000000000000000000000000000000000000000000000001",
"strategist": "0x0000000000417626Ef34D62C4DC189b021603f2F",
"exchangeRateBot": "0x0000000000417626Ef34D62C4DC189b021603f2F",

"address": "0x0000000000000000000000000000000000000000"
},

"decoder": {
"decoderSalt": "0x6000000000000000000000000000000000000000000000000000000000000001",

"address": "0x0000000000000000000000000000000000000000"
"address": "0x0000000000000000000000000000000000000000"
}

}
30 changes: 11 additions & 19 deletions deployment-config/boba-eth-l2-08-09-24.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
{
"protocolAdmin": "0x0888c3D797E13892C5e67cD802F93Ffe55Ea2826",

"boringVault":{
"boringVault": {
"boringVaultSalt": "0x1000000000000000000000000000000000000000000000000000000000000001",
"boringVaultName": "Boba Native Yield Nucleus Token",
"boringVaultName": "Boba Native Yield Nucleus Token",
"boringVaultSymbol": "bobaETH",

"address": "0x0000000000000000000000000000000000000000"
},

"manager":{
"address": "0x0000000000000000000000000000000000000000"
},
"manager": {
"managerSalt": "0x2000000000000000000000000000000000000000000000000000000000000001",

"address": "0x0000000000000000000000000000000000000000"
},

"accountant":{
"accountant": {
"accountantSalt": "0x3000000000000000000000000000000000000000000000000000000000000001",
"payoutAddress": "0x0888c3D797E13892C5e67cD802F93Ffe55Ea2826",
"allowedExchangeRateChangeUpper": "10030",
Expand All @@ -25,29 +21,25 @@

"address": "0x0000000000000000000000000000000000000000"
},

"teller": {
"tellerSalt": "0x4000000000000000000000000000000000000000000000000000000000000001",
"tellerSalt": "0x4000000000000000000000000000000000000000000000000000000000000002",
"maxGasForPeer": 200000,
"minGasForPeer": 60000,
"peerEid": 0,
"tellerContractName": "CrossChainOPTellerWithMultiAssetSupport",
"assets": [
],
"opMessenger": "0x4200000000000000000000000000000000000007",
"assets": [],

"address": "0x0000000000000000000000000000000000000000"
},
"rolesAuthority": {
"rolesAuthoritySalt": "0x5000000000000000000000000000000000000000000000000000000000000001",
"strategist": "0x0888c3D797E13892C5e67cD802F93Ffe55Ea2826",
"exchangeRateBot": "0x0888c3D797E13892C5e67cD802F93Ffe55Ea2826",

"address": "0x0000000000000000000000000000000000000000"
},

"decoder": {
"decoderSalt": "0x6000000000000000000000000000000000000000000000000000000000000001",

"address": "0x0000000000000000000000000000000000000000"
"address": "0x0000000000000000000000000000000000000000"
}

}
1 change: 0 additions & 1 deletion deployment-config/chains/1329.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"base": "0x160345fC359604fC6e70E3c5fAcbdE5F7A9342d8",
"balancerVault": "0x0000000000000000000000000000000000000000",
"opMessenger": "0x0000000000000000000000000000000000000000",
"lzEndpoint": "0x1a44076050125825900e736c501f859c50fE728c"
}
5 changes: 5 additions & 0 deletions deployment-config/chains/252.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"base": "0xFC00000000000000000000000000000000000006",
"balancerVault": "0x0000000000000000000000000000000000000000",
"lzEndpoint": "0x1a44076050125825900e736c501f859c50fE728c"
}
1 change: 0 additions & 1 deletion deployment-config/chains/288.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"base": "0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000",
"balancerVault": "0x0000000000000000000000000000000000000000",
"opMessenger": "0x4200000000000000000000000000000000000010",
"lzEndpoint": "0x0000000000000000000000000000000000000000"
}
49 changes: 49 additions & 0 deletions deployment-config/fraxtal-eth-l1-08-13-24.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"protocolAdmin": "0x0000000000417626Ef34D62C4DC189b021603f2F",
"boringVault": {
"boringVaultSalt": "0x1000000000000000000000000000000000000000000000000000000000000002",
"boringVaultName": "Fraxtal Native Yield Nucleus Token",
"boringVaultSymbol": "frxtlETH",
"address": "0x0000000000000000000000000000000000000000"
},
"manager": {
"managerSalt": "0x2000000000000000000000000000000000000000000000000000000000000002",
"address": "0x0000000000000000000000000000000000000000"
},
"accountant": {
"accountantSalt": "0x3000000000000000000000000000000000000000000000000000000000000002",
"payoutAddress": "0x0000000000417626Ef34D62C4DC189b021603f2F",
"allowedExchangeRateChangeUpper": "10030",
"allowedExchangeRateChangeLower": "9980",
"minimumUpdateDelayInSeconds": "3600",
"managementFee": "0",
"address": "0x0000000000000000000000000000000000000000"
},
"teller": {
"tellerSalt": "0x4000000000000000000000000000000000000000000000000000000000000002",
"maxGasForPeer": 200000,
"minGasForPeer": 60000,
"peerEid": 30255,
"tellerContractName": "MultiChainLayerZeroTellerWithMultiAssetSupport",
"opMessenger": "0x126bcc31Bc076B3d515f60FBC81FddE0B0d542Ed",
"assets": [
"0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee",
"0xbf5495efe5db9ce00f80364c8b423567e58d2110",
"0xA1290d69c65A6Fe4DF752f95823fae25cB99e5A7",
"0xFAe103DC9cf190eD75350761e95403b7b8aFa6c0",
"0xD9A442856C234a39a81a089C06451EBAa4306a72",
"0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0"
],
"address": "0x0000000000000000000000000000000000000000"
},
"rolesAuthority": {
"rolesAuthoritySalt": "0x5000000000000000000000000000000000000000000000000000000000000002",
"strategist": "0x0000000000417626Ef34D62C4DC189b021603f2F",
"exchangeRateBot": "0x0000000000417626Ef34D62C4DC189b021603f2F",
"address": "0x0000000000000000000000000000000000000000"
},
"decoder": {
"decoderSalt": "0x6000000000000000000000000000000000000000000000000000000000000002",
"address": "0x0000000000000000000000000000000000000000"
}
}
42 changes: 42 additions & 0 deletions deployment-config/fraxtal-eth-l2-08-13-24.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"protocolAdmin": "0x0888c3D797E13892C5e67cD802F93Ffe55Ea2826",
"boringVault": {
"boringVaultSalt": "0x1000000000000000000000000000000000000000000000000000000000000002",
"boringVaultName": "Fraxtal Native Yield Nucleus Token",
"boringVaultSymbol": "frxtlETH",
"address": "0x0000000000000000000000000000000000000000"
},
"manager": {
"managerSalt": "0x2000000000000000000000000000000000000000000000000000000000000002",
"address": "0x0000000000000000000000000000000000000000"
},
"accountant": {
"accountantSalt": "0x3000000000000000000000000000000000000000000000000000000000000002",
"payoutAddress": "0x0888c3D797E13892C5e67cD802F93Ffe55Ea2826",
"allowedExchangeRateChangeUpper": "10030",
"allowedExchangeRateChangeLower": "9980",
"minimumUpdateDelayInSeconds": "3600",
"managementFee": "0",
"address": "0x0000000000000000000000000000000000000000"
},
"teller": {
"tellerSalt": "0x4000000000000000000000000000000000000000000000000000000000000002",
"maxGasForPeer": 200000,
"minGasForPeer": 60000,
"peerEid": 30101,
"tellerContractName": "MultiChainLayerZeroTellerWithMultiAssetSupport",
"opMessenger": "0x4200000000000000000000000000000000000007",
"assets": [],
"address": "0x0000000000000000000000000000000000000000"
},
"rolesAuthority": {
"rolesAuthoritySalt": "0x5000000000000000000000000000000000000000000000000000000000000002",
"strategist": "0x0888c3D797E13892C5e67cD802F93Ffe55Ea2826",
"exchangeRateBot": "0x0888c3D797E13892C5e67cD802F93Ffe55Ea2826",
"address": "0x0000000000000000000000000000000000000000"
},
"decoder": {
"decoderSalt": "0x6000000000000000000000000000000000000000000000000000000000000002",
"address": "0x0000000000000000000000000000000000000000"
}
}
5 changes: 2 additions & 3 deletions deployment-config/mydeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@
"maxGasForPeer": 100000,
"minGasForPeer": 0,
"peerEid": 0,
"dvnIfNoDefault": "0x589dEDbD617e0CBcB916A9223F4d1300c294236b",
"dvnBlockConfirmationsRequiredIfNoDefault": 15,
"tellerContractName": "MultiChainLayerZeroTellerWithMultiAssetSupport",
"tellerContractName": "MultiChainLayerZeroTellerWithMultiAssetSupport",
"opMessenger": "0x0000000000000000000000000000000000000000",
"assets": [
"0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee",
"0xbf5495Efe5DB9ce00f80364C8B423567e58d2110"
Expand Down
1 change: 1 addition & 0 deletions deployment-config/sei-eth-l1-08-08-24.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"minGasForPeer": 60000,
"peerEid": 30280,
"tellerContractName": "MultiChainLayerZeroTellerWithMultiAssetSupport",
"opMessenger": "0x0000000000000000000000000000000000000000",
"assets": [
"0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee",
"0xbf5495efe5db9ce00f80364c8b423567e58d2110",
Expand Down
1 change: 1 addition & 0 deletions deployment-config/sei-eth-l2-08-08-24.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"minGasForPeer": 60000,
"peerEid": 30101,
"tellerContractName": "MultiChainLayerZeroTellerWithMultiAssetSupport",
"opMessenger": "0x0000000000000000000000000000000000000000",
"assets": [
],
"address": "0x0000000000000000000000000000000000000000"
Expand Down
1 change: 1 addition & 0 deletions deployment-config/seidry.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"minGasForPeer": 0,
"peerEid": 1,
"tellerContractName": "MultiChainLayerZeroTellerWithMultiAssetSupport",
"opMessenger": "0x0000000000000000000000000000000000000000",
"assets": [
],
"address": "0x0000000000000000000000000000000000000000"
Expand Down
1 change: 0 additions & 1 deletion lib/ccip
Submodule ccip deleted from 9eb270
8 changes: 4 additions & 4 deletions script/Base.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ import { ICreateX } from "lib/createx/src/ICreateX.sol";
import { Strings } from "@openzeppelin/contracts/utils/Strings.sol";

import { Script, stdJson } from "@forge-std/Script.sol";
import { console2 } from "@forge-std/console2.sol";

import { ConfigReader, IAuthority } from "./ConfigReader.s.sol";
import { console } from "forge-std/Test.sol";

abstract contract BaseScript is Script {
using stdJson for string;
Expand All @@ -19,7 +17,7 @@ abstract contract BaseScript is Script {
string constant CONFIG_CHAIN_ROOT = "./deployment-config/chains/";

/// Custom base params
ICreateX CREATEX = ICreateX(0xD7d6e6C50507d278b9F43f62Bc7b9310ECeff2C5);
ICreateX CREATEX = ICreateX(0x1077f8ea07EA34D9F23BC39256BF234665FB391f);

/// @dev Included to enable compilation of the script without a $MNEMONIC environment variable.
string internal constant TEST_MNEMONIC = "test test test test test test test test test test test junk";
Expand Down Expand Up @@ -72,7 +70,9 @@ abstract contract BaseScript is Script {
vm.stopBroadcast();
}

function deploy(ConfigReader.Config memory config) public virtual returns (address);
function deploy(ConfigReader.Config memory config) public virtual returns (address) {
revert("deploy() Not Implemented");
}

function getConfig() public returns (ConfigReader.Config memory) {
return ConfigReader.toConfig(requestConfigFileFromUser(), getChainConfigFile());
Expand Down
5 changes: 1 addition & 4 deletions script/ConfigReader.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ library ConfigReader {
config.tellerContractName = _config.readString(".teller.tellerContractName");
config.assets = _config.readAddressArray(".teller.assets");
config.peerEid = uint32(_config.readUint(".teller.peerEid"));
config.dvnIfNoDefault = _config.readAddress(".teller.dvnIfNoDefault");
config.dvnBlockConfirmationsRequiredIfNoDefault =
uint64(_config.readUint(".teller.dvnBlockConfirmationsRequiredIfNoDefault"));
config.opMessenger = _config.readAddress(".teller.opMessenger");

// Reading from the 'rolesAuthority' section
config.rolesAuthority = _config.readAddress(".rolesAuthority.address");
Expand All @@ -101,7 +99,6 @@ library ConfigReader {
// Reading from the 'chainConfig' section
config.base = _chainConfig.readAddress(".base");
config.balancerVault = _chainConfig.readAddress(".balancerVault");
config.opMessenger = _chainConfig.readAddress(".opMessenger");
config.lzEndpoint = _chainConfig.readAddress(".lzEndpoint");

return config;
Expand Down
3 changes: 1 addition & 2 deletions script/DeployCustomCreatex.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ contract DeployCustomCreateX is Script {
string internal mnemonic;
string internal constant TEST_MNEMONIC = "test test test test test test test test test test test junk";

address constant EXPECTED = 0xD7d6e6C50507d278b9F43f62Bc7b9310ECeff2C5;
address constant EXPECTED = 0x1077f8ea07EA34D9F23BC39256BF234665FB391f;
bytes32 constant SALT = 0x8888888833388888888000000000000000000000000000000000000000000000;

constructor() {
Expand All @@ -33,7 +33,6 @@ contract DeployCustomCreateX is Script {
require(EXPECTED.code.length == 0, "Createx already exists on this chain");

CreateX createx = new CreateX{ salt: SALT }();

console.log(address(createx));
require(address(createx) == EXPECTED, "address is not expected");
}
Expand Down
11 changes: 6 additions & 5 deletions script/deploy/single/06_DeployRolesAuthority.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,18 @@ import { ConfigReader } from "../../ConfigReader.s.sol";
import { CrossChainTellerBase } from "../../../src/base/Roles/CrossChain/CrossChainTellerBase.sol";
import { stdJson as StdJson } from "@forge-std/StdJson.sol";

uint8 constant STRATEGIST_ROLE = 1;
uint8 constant MANAGER_ROLE = 2;
uint8 constant TELLER_ROLE = 3;
uint8 constant UPDATE_EXCHANGE_RATE_ROLE = 4;
uint8 constant SOLVER_ROLE = 5;

/**
* NOTE Deploys with `Authority` set to zero bytes.
*/
contract DeployRolesAuthority is BaseScript {
using StdJson for string;

uint8 public constant STRATEGIST_ROLE = 1;
uint8 public constant MANAGER_ROLE = 2;
uint8 public constant TELLER_ROLE = 3;
uint8 public constant UPDATE_EXCHANGE_RATE_ROLE = 4;

function run() public virtual returns (address rolesAuthority) {
return deploy(getConfig());
}
Expand Down
Loading

0 comments on commit 8fcbdd6

Please sign in to comment.