Skip to content

Commit

Permalink
Merge pull request #20 from Ion-Protocol/carson/form-deployment
Browse files Browse the repository at this point in the history
Carson/form deployment
  • Loading branch information
CarsonCase authored Sep 6, 2024
2 parents 884446f + 4f54ce6 commit 330d94f
Show file tree
Hide file tree
Showing 36 changed files with 722 additions and 137 deletions.
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"cSpell.enableFiletypes": [
"makefile"
]
}
39 changes: 38 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,41 @@ checkL1:

checkL2:
@echo "Setting environment variable LIVE_DEPLOY_READ_FILE_NAME to $(file)"
@export LIVE_DEPLOY_READ_FILE_NAME=$(file) && forge test --mp test/LiveDeploy.t.sol --fork-url=${L2_RPC_URL}
@export LIVE_DEPLOY_READ_FILE_NAME=$(file) && forge test --mp test/LiveDeploy.t.sol --fork-url=${L2_RPC_URL}

deployL1:
@echo "Setting environment variable LIVE_DEPLOY_READ_FILE_NAME to $(file)"
@export LIVE_DEPLOY_READ_FILE_NAME=$(file) && forge script script/deploy/deployAll.s.sol --sig "run(string)" $(file) --fork-url=${L1_RPC_URL}

deployL2:
@echo "Setting environment variable LIVE_DEPLOY_READ_FILE_NAME to $(file)"
@export LIVE_DEPLOY_READ_FILE_NAME=$(file) && forge script script/deploy/deployAll.s.sol --sig "run(string)" $(file) --fork-url=${L1_RPC_URL}

live-deployL1:
@echo "Setting environment variable LIVE_DEPLOY_READ_FILE_NAME to $(file)"
@export LIVE_DEPLOY_READ_FILE_NAME=$(file) && forge script script/deploy/deployAll.s.sol --sig "run(string)" $(file) --fork-url=${L1_RPC_URL} --private-key=$(PRIVATE_KEY) --broadcast --slow --verify

live-deployL2:
@echo "Setting environment variable LIVE_DEPLOY_READ_FILE_NAME to $(file)"
@export LIVE_DEPLOY_READ_FILE_NAME=$(file) && forge script script/deploy/deployAll.s.sol --sig "run(string)" $(file) --fork-url=${L1_RPC_URL} --private-key=$(PRIVATE_KEY) --broadcast --slow --verify

prettier:
prettier --write '**/*.{md,yml,yaml,ts,js}'

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 --no-metadata

deploy-createx-l2:
forge script script/DeployCustomCreatex.s.sol --rpc-url $L2_RPC_URL --private-key $PRIVATE_KEY --slow --no-metadata

check-configs:
bun lzConfigCheck.cjs
29 changes: 12 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,20 @@
{
"protocolAdmin": "0x0000000000417626Ef34D62C4DC189b021603f2F",

"boringVault":{
"base": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"boringVaultAndBaseDecimals": "18",
"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 +24,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 +45,10 @@
"rolesAuthoritySalt": "0x5000000000000000000000000000000000000000000000000000000000000001",
"strategist": "0x0000000000417626Ef34D62C4DC189b021603f2F",
"exchangeRateBot": "0x0000000000417626Ef34D62C4DC189b021603f2F",

"address": "0x0000000000000000000000000000000000000000"
},

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

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

}
32 changes: 13 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,19 @@
{
"protocolAdmin": "0x0888c3D797E13892C5e67cD802F93Ffe55Ea2826",

"boringVault":{
"base": "0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000",
"boringVaultAndBaseDecimals": "18",
"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 +23,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"
}

}
18 changes: 15 additions & 3 deletions deployment-config/chains/1.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"base": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"name": "Ethereum",
"balancerVault": "0xBA12222222228d8Ba445958a75a0704d566BF2C8",
"opMessenger": "0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1",
"lzEndpoint": "0x1a44076050125825900e736c501f859c50fE728c",
Expand Down Expand Up @@ -41,11 +41,23 @@
"priceFeedType": 1
},
"0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0": {
"priceFeed": "",
"priceFeed": "0x86392dC19c0b719886221c78AB11eb8Cf5c52812",
"rateProvider": "0xa360Df495d0560bDDc5d681B54991629965ae170",
"decimals": 18,
"description": "",
"description": "STETH / ETH",
"priceFeedType": 0
},
"0x8db2350d78abc13f5673a411d4700bcf87864dde": {
"rateProvider": "0x318Da095d602C08eF41319f4c4bA0646d318C906",
"decimals": 8
},
"0x9ba021b0a9b958b5e75ce9f6dff97c7ee52cb3e6":{
"priceFeed": "0x19219bc90f48dee4d5cf202e09c438faacfd8bea",
"rateProvider": "",
"decimals": 18,
"description": "apxETH/ETH",
"priceFeedType": 1
}

}
}
5 changes: 5 additions & 0 deletions deployment-config/chains/11155111.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "Ethereum Sepolia",
"balancerVault": "0xBA12222222228d8Ba445958a75a0704d566BF2C8",
"lzEndpoint": "0x6EDCE65403992e310A62460808c4b910D972f10f"
}
3 changes: 1 addition & 2 deletions deployment-config/chains/1329.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"base": "0x160345fC359604fC6e70E3c5fAcbdE5F7A9342d8",
"name": "Sei",
"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 @@
{
"name": "Fraxtal",
"balancerVault": "0x0000000000000000000000000000000000000000",
"lzEndpoint": "0x1a44076050125825900e736c501f859c50fE728c"
}
3 changes: 1 addition & 2 deletions deployment-config/chains/288.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"base": "0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000",
"name": "Boba",
"balancerVault": "0x0000000000000000000000000000000000000000",
"opMessenger": "0x4200000000000000000000000000000000000010",
"lzEndpoint": "0x0000000000000000000000000000000000000000"
}
20 changes: 10 additions & 10 deletions deployment-config/exampleL1.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
{
"protocolAdmin": "0xC2d99d76bb9D46BF8Ec9449E4DfAE48C30CF0839",
"base": "0xee44150250AfF3E6aC25539765F056EDb7F85D7B",
"protocolAdmin": "0x0000000000417626Ef34D62C4DC189b021603f2F",
"boringVaultAndBaseDecimals": "18",
"boringVault": {
"boringVaultSalt": "0x1ddd634c506ad203da17ff00000000000000000000000000000000000000000e",
"boringVaultSalt": "0x1ddd634c506ad203da17ff00000000000000000000000000000000000000001c",
"boringVaultName": "Nucleus Vault",
"boringVaultSymbol": "NV",
"address": "0x0000000000E7Ab44153eEBEF2343ba5289F65dAC"
},
"manager": {
"managerSalt": "0x30432d4b4ec00003b4a25000000000000000000000000000000000000000000e",
"managerSalt": "0x30432d4b4ec00003b4a25000000000000000000000000000000000000000001c",
"address": "0x0000000000fAd6Db23abdC1a85621B97bd1Dc82f"
},
"accountant": {
"accountantSalt": "0x6a184dbea6f3cc0318679f00000000000000000000000000000000000000000e",
"accountantSalt": "0x6a184dbea6f3cc0318679f00000000000000000000000000000000000000001c",
"payoutAddress": "0x0000000000417626Ef34D62C4DC189b021603f2F",
"base": "0x5f207d42F869fd1c71d7f0f81a2A67Fc20FF7323",
"allowedExchangeRateChangeUpper": "10003",
Expand All @@ -21,14 +23,12 @@
"address": "0x00000000004F96C07B83e86600D86F9479bB43fa"
},
"teller": {
"tellerSalt": "0x51f8968749a56d01202c9100000000000000000000000000000000000000000e",
"tellerSalt": "0x51f8968749a56d01202c9100000000000000000000000000000000000000001c",
"maxGasForPeer": 100000,
"minGasForPeer": 0,
"peerEid": 30280,
"tellerContractName": "MultiChainLayerZeroTellerWithMultiAssetSupport",
"tellerContractName": "TellerWithMultiAssetSupport",
"assets": [
"0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee",
"0xbf5495Efe5DB9ce00f80364C8B423567e58d2110"
],
"dvnIfNoDefault": {
"required": [
Expand All @@ -46,13 +46,13 @@
"address": "0x00000000004F96C07B83e86600D86F0000000000"
},
"rolesAuthority": {
"rolesAuthoritySalt": "0x66bbc3b3b3000b01466a3a00000000000000000000000000000000000000000e",
"rolesAuthoritySalt": "0x66bbc3b3b3000b01466a3a00000000000000000000000000000000000000001c",
"strategist": "0xC2d99d76bb9D46BF8Ec9449E4DfAE48C30CF0839",
"exchangeRateBot": "0x00000000004F96C07B83e86600D86F0000000000",
"address": "0x00000000004F96C07B83e86600D86F0000000000"
},
"decoder": {
"decoderSalt": "0x48b53893da2e0b0248268c00000000000000000000000000000000000000000e",
"decoderSalt": "0x48b53893da2e0b0248268c00000000000000000000000000000000000000001c",
"address": "0x00000000004F96C07B83e86600D86F0000000000"
}
}
3 changes: 2 additions & 1 deletion deployment-config/exampleL2.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"protocolAdmin": "0xF2dE1311C5b2C1BD94de996DA13F80010453e505",
"boringVaultAndBaseDecimals": "18",
"boringVault": {
"boringVaultSalt": "0x1ddd634c506ad203da17ff00000000000000000000000000000000000000000e",
"boringVaultName": "Nucleus Vault",
Expand All @@ -25,7 +26,7 @@
"maxGasForPeer": 100000,
"minGasForPeer": 0,
"peerEid": 30280,
"tellerContractName": "MultiChainLayerZeroTellerWithMultiAssetSupport",
"tellerContractName": "TellerWithMultiAssetSupport",
"assets": [],
"dvnIfNoDefault": {
"required": [
Expand Down
57 changes: 57 additions & 0 deletions deployment-config/form-btc-testnet-l1-08-30-24.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"base": "0x0893A950E8f80B21658ba35D39d9AB00cCa95589",
"protocolAdmin": "0x0000000000417626Ef34D62C4DC189b021603f2F",
"boringVaultAndBaseDecimals": "8",
"boringVault": {
"boringVaultSalt": "0x1ddd634c506ad203da17ff000000000000000000000000000000000000000011",
"boringVaultName": "Form BTC",
"boringVaultSymbol": "FBTC",
"address": "0x0000000000000000000000000000000000000000"
},
"manager": {
"managerSalt": "0x30432d4b4ec00003b4a250000000000000000000000000000000000000000011",
"address": "0x0000000000000000000000000000000000000000"
},
"accountant": {
"accountantSalt": "0x6a184dbea6f3cc0318679f000000000000000000000000000000000000000011",
"payoutAddress": "0x0000000000417626Ef34D62C4DC189b021603f2F",
"allowedExchangeRateChangeUpper": "10003",
"allowedExchangeRateChangeLower": "9998",
"minimumUpdateDelayInSeconds": "3600",
"managementFee": "0",
"address": "0x0000000000000000000000000000000000000000"
},
"teller": {
"tellerSalt": "0x51f8968749a56d01202c91000000000000000000000000000000000000000011",
"maxGasForPeer": 100000,
"minGasForPeer": 0,
"peerEid": 40270,
"tellerContractName": "TellerWithMultiAssetSupport",
"opMessenger": "0x58Cc85b8D04EA49cC6DBd3CbFFd00B4B8D6cb3ef",
"assets": [],
"dvnIfNoDefault": {
"required": [
"0x589dEDbD617e0CBcB916A9223F4d1300c294236b"
],
"optional": [
"0x380275805876Ff19055EA900CDb2B46a94ecF20D",
"0x8FafAE7Dd957044088b3d0F67359C327c6200d18",
"0xa59BA433ac34D2927232918Ef5B2eaAfcF130BA5",
"0xe552485d02EDd3067FE7FCbD4dd56BB1D3A998D2"
],
"blockConfirmationsRequiredIfNoDefault": 15,
"optionalThreshold": 1
},
"address": "0x0000000000000000000000000000000000000000"
},
"rolesAuthority": {
"rolesAuthoritySalt": "0x66bbc3b3b3000b01466a3a000000000000000000000000000000000000000011",
"strategist": "0x0000000000417626Ef34D62C4DC189b021603f2F",
"exchangeRateBot": "0x0000000000417626Ef34D62C4DC189b021603f2F",
"address": "0x0000000000000000000000000000000000000000"
},
"decoder": {
"decoderSalt": "0x48b53893da2e0b0248268c000000000000000000000000000000000000000011",
"address": "0x0000000000000000000000000000000000000000"
}
}
Loading

0 comments on commit 330d94f

Please sign in to comment.