Skip to content

Commit

Permalink
Merge pull request #15 from Ion-Protocol/jun/rswBTC
Browse files Browse the repository at this point in the history
rswBTC Deployment
  • Loading branch information
junkim012 authored Aug 22, 2024
2 parents 7bf0e41 + b8036ab commit 14186bd
Show file tree
Hide file tree
Showing 23 changed files with 265 additions and 137 deletions.
2 changes: 2 additions & 0 deletions deployment-config/boba-eth-l1-08-09-24.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"protocolAdmin": "0x0000000000417626Ef34D62C4DC189b021603f2F",
"base": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"baseDecimals": "18",
"boringVault": {
"boringVaultSalt": "0x1000000000000000000000000000000000000000000000000000000000000001",
"boringVaultName": "Boba Native Yield Nucleus Token",
Expand Down
2 changes: 2 additions & 0 deletions deployment-config/boba-eth-l2-08-09-24.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"protocolAdmin": "0x0888c3D797E13892C5e67cD802F93Ffe55Ea2826",
"base": "0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000",
"baseDecimals": "18",
"boringVault": {
"boringVaultSalt": "0x1000000000000000000000000000000000000000000000000000000000000001",
"boringVaultName": "Boba Native Yield Nucleus Token",
Expand Down
5 changes: 4 additions & 1 deletion deployment-config/chains/1.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"base": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"balancerVault": "0xBA12222222228d8Ba445958a75a0704d566BF2C8",
"opMessenger": "0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1",
"lzEndpoint": "0x1a44076050125825900e736c501f859c50fE728c",
Expand Down Expand Up @@ -46,6 +45,10 @@
"decimals": 18,
"description": "",
"priceFeedType": 0
},
"0x8db2350d78abc13f5673a411d4700bcf87864dde": {
"rateProvider": "0x318Da095d602C08eF41319f4c4bA0646d318C906",
"decimals": 8
}
}
}
1 change: 0 additions & 1 deletion deployment-config/chains/1329.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"base": "0x160345fC359604fC6e70E3c5fAcbdE5F7A9342d8",
"balancerVault": "0x0000000000000000000000000000000000000000",
"lzEndpoint": "0x1a44076050125825900e736c501f859c50fE728c"
}
1 change: 0 additions & 1 deletion deployment-config/chains/252.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"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,5 +1,4 @@
{
"base": "0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000",
"balancerVault": "0x0000000000000000000000000000000000000000",
"lzEndpoint": "0x0000000000000000000000000000000000000000"
}
2 changes: 2 additions & 0 deletions deployment-config/fraxtal-eth-l1-08-13-24.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"protocolAdmin": "0x0000000000417626Ef34D62C4DC189b021603f2F",
"base": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"baseDecimals": "18",
"boringVault": {
"boringVaultSalt": "0x1000000000000000000000000000000000000000000000000000000000000002",
"boringVaultName": "Fraxtal Native Yield Nucleus Token",
Expand Down
2 changes: 2 additions & 0 deletions deployment-config/fraxtal-eth-l2-08-13-24.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"protocolAdmin": "0x0888c3D797E13892C5e67cD802F93Ffe55Ea2826",
"base": "0xFC00000000000000000000000000000000000006",
"baseDecimals": "18",
"boringVault": {
"boringVaultSalt": "0x1000000000000000000000000000000000000000000000000000000000000002",
"boringVaultName": "Fraxtal Native Yield Nucleus Token",
Expand Down
59 changes: 0 additions & 59 deletions deployment-config/mydeploy.json

This file was deleted.

7 changes: 7 additions & 0 deletions deployment-config/rates/DeployGenericRateProvider.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"target": "0x8DB2350D78aBc13f5673A411D4700BCF87864dDE",
"signature": "pricePerShare()",
"expectedMin": "100000000",
"expectedMax": "100000000",
"salt": "0x1000000000000000000000000000000000000000000000000000000000000000"
}
57 changes: 57 additions & 0 deletions deployment-config/rswBTC-l1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"protocolAdmin": "0x0000000000417626Ef34D62C4DC189b021603f2F",
"base": "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
"baseDecimals": "8",

"boringVault":{
"boringVaultSalt": "0x100000000000000000000000000000000000000000000000000000000000000b",
"boringVaultName": "Swell Native Yield Nucleus Token",
"boringVaultSymbol": "rswBTC",

"address": "0x0000000000000000000000000000000000000000"
},

"manager":{
"managerSalt": "0x200000000000000000000000000000000000000000000000000000000000000b",

"address": "0x0000000000000000000000000000000000000000"
},

"accountant":{
"accountantSalt": "0x300000000000000000000000000000000000000000000000000000000000000b",
"payoutAddress": "0x0000000000417626Ef34D62C4DC189b021603f2F",
"allowedExchangeRateChangeUpper": "10030",
"allowedExchangeRateChangeLower": "9980",
"minimumUpdateDelayInSeconds": "3600",
"managementFee": "0",

"address": "0x0000000000000000000000000000000000000000"
},

"teller": {
"tellerSalt": "0x400000000000000000000000000000000000000000000000000000000000000a",
"maxGasForPeer": 200000,
"minGasForPeer": 60000,
"peerEid": 0,
"tellerContractName": "TellerWithMultiAssetSupport",
"opMessenger": "0x0000000000000000000000000000000000000000",
"assets": [
"0x8DB2350D78aBc13f5673A411D4700BCF87864dDE"
],
"address": "0x0000000000000000000000000000000000000000"
},
"rolesAuthority": {
"rolesAuthoritySalt": "0x500000000000000000000000000000000000000000000000000000000000000b",
"strategist": "0x0000000000417626Ef34D62C4DC189b021603f2F",
"exchangeRateBot": "0x0000000000417626Ef34D62C4DC189b021603f2F",

"address": "0x0000000000000000000000000000000000000000"
},

"decoder": {
"decoderSalt": "0x6000000000000000000000000000000000000000000000000000000000000000",

"address": "0x0000000000000000000000000000000000000000"
}

}
13 changes: 7 additions & 6 deletions deployment-config/sei-eth-l1-08-08-24.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
{
"protocolAdmin": "0x0000000000417626Ef34D62C4DC189b021603f2F",

"base": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"baseDecimals": "18",
"boringVault":{
"boringVaultSalt": "0x1000000000000000000000000000000000000000000000000000000000000000",
"boringVaultSalt": "0x100000000000000000000000000000000000000000000000000000000000000a",
"boringVaultName": "Sei Native Yield Nucleus Token",
"boringVaultSymbol": "seiyanETH",

"address": "0x0000000000000000000000000000000000000000"
},

"manager":{
"managerSalt": "0x2000000000000000000000000000000000000000000000000000000000000000",
"managerSalt": "0x200000000000000000000000000000000000000000000000000000000000000a",

"address": "0x0000000000000000000000000000000000000000"
},

"accountant":{
"accountantSalt": "0x3000000000000000000000000000000000000000000000000000000000000000",
"accountantSalt": "0x300000000000000000000000000000000000000000000000000000000000000a",
"payoutAddress": "0x0000000000417626Ef34D62C4DC189b021603f2F",
"allowedExchangeRateChangeUpper": "10030",
"allowedExchangeRateChangeLower": "9980",
Expand All @@ -27,7 +28,7 @@
},

"teller": {
"tellerSalt": "0x4000000000000000000000000000000000000000000000000000000000000000",
"tellerSalt": "0x400000000000000000000000000000000000000000000000000000000000000a",
"maxGasForPeer": 200000,
"minGasForPeer": 60000,
"peerEid": 30280,
Expand All @@ -44,7 +45,7 @@
"address": "0x0000000000000000000000000000000000000000"
},
"rolesAuthority": {
"rolesAuthoritySalt": "0x5000000000000000000000000000000000000000000000000000000000000000",
"rolesAuthoritySalt": "0x500000000000000000000000000000000000000000000000000000000000000a",
"strategist": "0x0000000000417626Ef34D62C4DC189b021603f2F",
"exchangeRateBot": "0x0000000000417626Ef34D62C4DC189b021603f2F",

Expand Down
3 changes: 2 additions & 1 deletion deployment-config/sei-eth-l2-08-08-24.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"protocolAdmin": "0xF2dE1311C5b2C1BD94de996DA13F80010453e505",

"base": "0x160345fC359604fC6e70E3c5fAcbdE5F7A9342d8",
"baseDecimals": "18",
"boringVault":{
"boringVaultSalt": "0x1000000000000000000000000000000000000000000000000000000000000000",
"boringVaultName": "Sei Native Yield Nucleus Token",
Expand Down
60 changes: 0 additions & 60 deletions deployment-config/seidry.json

This file was deleted.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"solhint": "solhint -w 0 'src/**/*.sol'",
"slither": "slither src",
"prepare": "husky",
"deploy-createx-l1": "forge script script/DeployCustomCreatex.s.sol --rpc-url $L1_RPC_URL --private-key $PRIVATE_KEY --slow",
"deploy-createx-l2": "forge script script/DeployCustomCreatex.s.sol --rpc-url $L2_RPC_URL --private-key $PRIVATE_KEY --slow",
"deploy-createx-l1": "forge script script/DeployCustomCreatex.s.sol --rpc-url $L1_RPC_URL --private-key $PRIVATE_KEY --slow --no-metadata",
"deploy-createx-l2": "forge script script/DeployCustomCreatex.s.sol --rpc-url $L2_RPC_URL --private-key $PRIVATE_KEY --slow --no-metadata",
"deploy-l1": "forge script script/deploy/deployAll.s.sol -f $L1_RPC_URL --private-key=$PRIVATE_KEY --slow",
"deploy-l2": "forge script script/deploy/deployAll.s.sol -f $L2_RPC_URL --private-key=$PRIVATE_KEY --slow"
},
Expand Down
8 changes: 6 additions & 2 deletions script/ConfigReader.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ library ConfigReader {

struct Config {
address protocolAdmin;
address base;
uint8 baseDecimals;
bytes32 accountantSalt;
address boringVault;
address payoutAddress;
Expand All @@ -28,6 +30,8 @@ library ConfigReader {
address balancerVault;
bytes32 tellerSalt;
uint32 peerEid;
address dvnIfNoDefault;
uint64 dvnBlockConfirmationsRequiredIfNoDefault;
address accountant;
address opMessenger;
uint64 maxGasForPeer;
Expand All @@ -48,12 +52,13 @@ library ConfigReader {
address[] assets;
address[] rateProviders;
address[] priceFeeds;
address base;
}

function toConfig(string memory _config, string memory _chainConfig) internal pure returns (Config memory config) {
// Reading the 'protocolAdmin'
config.protocolAdmin = _config.readAddress(".protocolAdmin");
config.base = _config.readAddress(".base");
config.baseDecimals = uint8(_config.readUint(".baseDecimals"));

// Reading from the 'accountant' section
config.accountant = _config.readAddress(".accountant.address");
Expand Down Expand Up @@ -95,7 +100,6 @@ library ConfigReader {
config.decoder = _config.readAddress(".decoder.address");

// Reading from the 'chainConfig' section
config.base = _chainConfig.readAddress(".base");
config.balancerVault = _chainConfig.readAddress(".balancerVault");
config.lzEndpoint = _chainConfig.readAddress(".lzEndpoint");

Expand Down
Loading

0 comments on commit 14186bd

Please sign in to comment.