Skip to content

Commit

Permalink
chore: fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
jpick713 committed Aug 12, 2024
2 parents 66784a4 + a79095c commit b2d6251
Show file tree
Hide file tree
Showing 19 changed files with 251 additions and 91 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
```
_____ ______ _____ _.====.._
/ ___| |___ / / ___| ,:._ ~-_
\ `--. ___ / /__ _ __ \ `--. ___ __ _ ___ `\ ~-_
`--. \/ _ \ / / _ \ '_ \ `--. \/ _ \/ _` / __| | `.
/\__/ / __/./ / __/ | | /\__/ / __/ (_| \__ \ ,/ ~-_
.,_,.='``'-.,\____/ \___|\_/ \___|_| |_\____/ \___|\__,_|___/-..__..-'' ~~--
.-. .-..-. .-. ,--, ,-. ,---. .-. .-. .---.
| \| || | | |.' .') | | | .-' | | | | ( .-._)
| | || | | || |(_) | | | `-. | | | | (_) \
| |\ || | | |\ \ | | | .-' | | | | _ \ \
| | |)|| `-')| \ `-. | `--. | `--.| `-')|( `-' )
/( (_)`---(_) \____\|( __.'/( __.'`---(_) `----'
(__) (_) (__)
```

> This repository began as a fork of [Se7enSeas](https://github.com/Se7en-Seas)' open source [boring-vault](https://github.com/Se7en-Seas/boring-vault) repo. We want to credit the Se7enSeas for creating the BoringVault architecture and allowing its free distribution.
# Boring Vault Architecture
# Boring Vault Architectures

Boring Vaults are flexible vault contracts that allow for intricate strategies, secured by both onchain and offchain mechanisms.

Expand Down
32 changes: 30 additions & 2 deletions deployment-config/chains/1.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,45 @@
"NOTE_THESE_KEYS_MUST_NOT_BE_CHECKSUMMED": 0,
"0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee": {
"priceFeed": "0x5c9C449BbC9a6075A2c061dF312a35fd1E05fF22",
"rateProvider": "0x0000000000000000000000000000000000000000",
"rateProvider": "0x51a9319B45F41c405eFA1EcbCcE530607A694862",
"decimals": 18,
"description": "weETH / ETH",
"priceFeedType": 0
},
"0xbf5495efe5db9ce00f80364c8b423567e58d2110": {
"priceFeed": "0x636A000262F6aA9e1F094ABF0aD8f645C44f641C",
"rateProvider": "0x0000000000000000000000000000000000000000",
"rateProvider": "0xb9B1eD92d3902eBEca23F931a629343D4C46c38D",
"decimals": 18,
"description": "ezETH / ETH",
"priceFeedType": 0
},
"0xa1290d69c65a6fe4df752f95823fae25cb99e5a7":{
"priceFeed": "0x03c68933f7a3F76875C0bc670a58e69294cDFD01",
"rateProvider": "0xB140e881E206E94B18e143f1739d5f212C59C859",
"decimals": 18,
"description": "RSETH / ETH",
"priceFeedType": 0
},
"0xfae103dc9cf190ed75350761e95403b7b8afa6c0": {
"priceFeed": "0xb613CfebD0b6e95abDDe02677d6bC42394FdB857",
"rateProvider": "0x4E323185C91Ef73e36f0CD2DdDcE54fb33112949",
"decimals": 18,
"description": "rswETH / ETH",
"priceFeedType": 0
},
"0xd9a442856c234a39a81a089c06451ebaa4306a72": {
"priceFeed": "0x76A495b0bFfb53ef3F0E94ef0763e03cE410835C",
"rateProvider": "0xEE8259373fCf5dc12F511867551F7f6FA6fcb0FB",
"decimals": 18,
"description": "pufETH/ETH",
"priceFeedType": 1
},
"0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0": {
"priceFeed": "",
"rateProvider": "0xa360Df495d0560bDDc5d681B54991629965ae170",
"decimals": 18,
"description": "",
"priceFeedType": 0
}
}
}
4 changes: 2 additions & 2 deletions deployment-config/chains/1329.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"base": "0x160345fC359604fC6e70E3c5fAcbdE5F7A9342d8",
"balancerVault": "0xBA12222222228d8Ba445958a75a0704d566BF2C8",
"opMessenger": "0x25ace71c97B33Cc4729CF772ae268934F7ab5fA1",
"balancerVault": "0x0000000000000000000000000000000000000000",
"opMessenger": "0x0000000000000000000000000000000000000000",
"lzEndpoint": "0x1a44076050125825900e736c501f859c50fE728c"
}
8 changes: 1 addition & 7 deletions deployment-config/mydeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,6 @@
"decoderSalt": "0x48b53893da2e0b0248268c00000000000000000000000000000000000000000a",

"address": "0x00000000004F96C07B83e86600D86F0000000000"
},

"rateProvider": {
"maxTimeFromLastUpdate": "86400",
"rateProviderSalt": "0x0000000000000000000000000000000000000000000000000000000000000000",

"address": "0x00000000004F96C07B83e86600D86F0000000000"
}

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

"boringVault":{
"boringVaultSalt": "0x1000000000000000000000000000000000000000000000000000000000000000",
"boringVaultName": "Sei Native Yield Nucleus Token",
"boringVaultSymbol": "seiyanETH",

"address": "0x0000000000000000000000000000000000000000"
},

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

"address": "0x0000000000000000000000000000000000000000"
},

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

"address": "0x0000000000000000000000000000000000000000"
},

"teller": {
"tellerSalt": "0x4000000000000000000000000000000000000000000000000000000000000000",
"maxGasForPeer": 200000,
"minGasForPeer": 60000,
"peerEid": 30280,
"tellerContractName": "MultiChainLayerZeroTellerWithMultiAssetSupport",
"assets": [
"0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee",
"0xbf5495efe5db9ce00f80364c8b423567e58d2110",
"0xA1290d69c65A6Fe4DF752f95823fae25cB99e5A7",
"0xFAe103DC9cf190eD75350761e95403b7b8aFa6c0",
"0xD9A442856C234a39a81a089C06451EBAa4306a72",
"0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0"
],
"address": "0x0000000000000000000000000000000000000000"
},
"rolesAuthority": {
"rolesAuthoritySalt": "0x5000000000000000000000000000000000000000000000000000000000000000",
"strategist": "0x0000000000417626Ef34D62C4DC189b021603f2F",
"exchangeRateBot": "0x0000000000417626Ef34D62C4DC189b021603f2F",

"address": "0x0000000000000000000000000000000000000000"
},

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

"address": "0x0000000000000000000000000000000000000000"
}

}
53 changes: 53 additions & 0 deletions deployment-config/sei-eth-l2-08-08-24.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"protocolAdmin": "0xF2dE1311C5b2C1BD94de996DA13F80010453e505",

"boringVault":{
"boringVaultSalt": "0x1000000000000000000000000000000000000000000000000000000000000000",
"boringVaultName": "Sei Native Yield Nucleus Token",
"boringVaultSymbol": "seiyanETH",

"address": "0x0000000000000000000000000000000000000000"
},

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

"address": "0x0000000000000000000000000000000000000000"
},

"accountant":{
"accountantSalt": "0x3000000000000000000000000000000000000000000000000000000000000000",
"payoutAddress": "0xF2dE1311C5b2C1BD94de996DA13F80010453e505",
"allowedExchangeRateChangeUpper": "10030",
"allowedExchangeRateChangeLower": "9980",
"minimumUpdateDelayInSeconds": "3600",
"managementFee": "0",

"address": "0x0000000000000000000000000000000000000000"
},

"teller": {
"tellerSalt": "0x4000000000000000000000000000000000000000000000000000000000000000",
"maxGasForPeer": 200000,
"minGasForPeer": 60000,
"peerEid": 30101,
"tellerContractName": "MultiChainLayerZeroTellerWithMultiAssetSupport",
"assets": [
],
"address": "0x0000000000000000000000000000000000000000"
},
"rolesAuthority": {
"rolesAuthoritySalt": "0x5000000000000000000000000000000000000000000000000000000000000000",
"strategist": "0xF2dE1311C5b2C1BD94de996DA13F80010453e505",
"exchangeRateBot": "0xF2dE1311C5b2C1BD94de996DA13F80010453e505",

"address": "0x0000000000000000000000000000000000000000"
},

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

"address": "0x0000000000000000000000000000000000000000"
}

}
1 change: 0 additions & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[profile.default]
# Sets the concrete solc version to use
# This overrides the `auto_detect_solc` value
solc_version = '0.8.21'
auto_detect_solc = false
evm_version = 'shanghai'
optimizer = true
Expand Down
1 change: 0 additions & 1 deletion lib/foundry-arbitrum
Submodule foundry-arbitrum deleted from 1ff06d
2 changes: 1 addition & 1 deletion lib/openzeppelin-contracts-upgradeable
Submodule openzeppelin-contracts-upgradeable updated from 2d081f to 723f8c
44 changes: 3 additions & 41 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,9 @@
"coverage": "./coverage.sh",
"solhint": "solhint -w 0 'src/**/*.sol'",
"slither": "slither src",
"01_DeployBoringVault:deployment:test": "forge test --mc DeployYieldOracleTest --ffi --nmp \"\"",
"01_DeployBoringVault:deployment:deploy:anvil": "forge script script/deploy/01_DeployBoringVault.s.sol --rpc-url http://localhost:8545 --private-key $PRIVATE_KEY --slow",
"01_DeployBoringVault:deployment:deploy:tenderly": "forge script script/deploy/01_DeployBoringVault.s.sol --rpc-url $TENDERLY_RPC_URL --private-key $PRIVATE_KEY --slow",
"01_DeployBoringVault:deployment:deploy:sepolia": "forge script script/deploy/01_DeployBoringVault.s.sol --rpc-url $SEPOLIA_RPC_URL --private-key $PRIVATE_KEY --slow",
"01_DeployBoringVault:deployment:deploy:mainnet": "forge script script/deploy/01_DeployBoringVault.s.sol --rpc-url $MAINNET_RPC_URL --private-key $PRIVATE_KEY --slow",
"02_DeployManagerWithMerkleVerification:deployment:test": "forge test --mc DeployManagerWithMerkleVerification --ffi --nmp \"\"",
"02_DeployManagerWithMerkleVerification:deployment:deploy:anvil": "forge script script/deploy/02_DeployManagerWithMerkleVerification.s.sol --rpc-url http://localhost:8545 --private-key $PRIVATE_KEY --slow",
"02_DeployManagerWithMerkleVerification:deployment:deploy:tenderly": "forge script script/deploy/02_DeployManagerWithMerkleVerification.s.sol --rpc-url $TENDERLY_RPC_URL --private-key $PRIVATE_KEY --slow",
"02_DeployManagerWithMerkleVerification:deployment:deploy:sepolia": "forge script script/deploy/02_DeployManagerWithMerkleVerification.s.sol --rpc-url $SEPOLIA_RPC_URL --private-key $PRIVATE_KEY --slow",
"02_DeployManagerWithMerkleVerification:deployment:deploy:mainnet": "forge script script/deploy/02_DeployManagerWithMerkleVerification.s.sol --rpc-url $MAINNET_RPC_URL --private-key $PRIVATE_KEY --slow",
"03_DeployAccountantWithRateProviders:deployment:test": "forge test --mc DeployManagerWithMerkleVerification --ffi --nmp \"\"",
"03_DeployAccountantWithRateProviders:deployment:deploy:anvil": "forge script script/deploy/03_DeployAccountantWithRateProviders.s.sol --rpc-url http://localhost:8545 --private-key $PRIVATE_KEY --slow",
"03_DeployAccountantWithRateProviders:deployment:deploy:tenderly": "forge script script/deploy/03_DeployAccountantWithRateProviders.s.sol --rpc-url $TENDERLY_RPC_URL --private-key $PRIVATE_KEY --slow",
"03_DeployAccountantWithRateProviders:deployment:deploy:sepolia": "forge script script/deploy/03_DeployAccountantWithRateProviders.s.sol --rpc-url $SEPOLIA_RPC_URL --private-key $PRIVATE_KEY --slow",
"03_DeployAccountantWithRateProviders:deployment:deploy:mainnet": "forge script script/deploy/03_DeployAccountantWithRateProviders.s.sol --rpc-url $MAINNET_RPC_URL --private-key $PRIVATE_KEY --slow",
"04_DeployTellerWithMultiAssetSupport:deployment:test": "forge test --mc DeployManagerWithMerkleVerification --ffi --nmp \"\"",
"04_DeployTellerWithMultiAssetSupport:deployment:deploy:anvil": "forge script script/deploy/04_DeployTellerWithMultiAssetSupport.s.sol --rpc-url http://localhost:8545 --private-key $PRIVATE_KEY --slow",
"04_DeployTellerWithMultiAssetSupport:deployment:deploy:tenderly": "forge script script/deploy/04_DeployTellerWithMultiAssetSupport.s.sol --rpc-url $TENDERLY_RPC_URL --private-key $PRIVATE_KEY --slow",
"04_DeployTellerWithMultiAssetSupport:deployment:deploy:sepolia": "forge script script/deploy/04_DeployTellerWithMultiAssetSupport.s.sol --rpc-url $SEPOLIA_RPC_URL --private-key $PRIVATE_KEY --slow",
"04_DeployTellerWithMultiAssetSupport:deployment:deploy:mainnet": "forge script script/deploy/04_DeployTellerWithMultiAssetSupport.s.sol --rpc-url $MAINNET_RPC_URL --private-key $PRIVATE_KEY --slow",
"05_DeployRolesAuthority:deployment:test": "forge test --mc DeployManagerWithMerkleVerification --ffi --nmp \"\"",
"05_DeployRolesAuthority:deployment:deploy:anvil": "forge script script/deploy/05_DeployRolesAuthority.s.sol --rpc-url http://localhost:8545 --private-key $PRIVATE_KEY --slow",
"05_DeployRolesAuthority:deployment:deploy:tenderly": "forge script script/deploy/05_DeployRolesAuthority.s.sol --rpc-url $TENDERLY_RPC_URL --private-key $PRIVATE_KEY --slow",
"05_DeployRolesAuthority:deployment:deploy:sepolia": "forge script script/deploy/05_DeployRolesAuthority.s.sol --rpc-url $SEPOLIA_RPC_URL --private-key $PRIVATE_KEY --slow",
"05_DeployRolesAuthority:deployment:deploy:mainnet": "forge script script/deploy/05_DeployRolesAuthority.s.sol --rpc-url $MAINNET_RPC_URL --private-key $PRIVATE_KEY --slow",
"06_SetAuthorityAndTransferOwnerships:deployment:test": "forge test --mc 06_SetAuthorityAndTransferOwnerships --ffi --nmp \"\"",
"06_SetAuthorityAndTransferOwnerships:deployment:deploy:anvil": "forge script script/deploy/06_SetAuthorityAndTransferOwnerships.s.sol.s.sol --rpc-url http://localhost:8545 --private-key $PRIVATE_KEY --slow",
"06_SetAuthorityAndTransferOwnerships:deployment:deploy:tenderly": "forge script script/deploy/06_SetAuthorityAndTransferOwnerships.s.sol --rpc-url $TENDERLY_RPC_URL --private-key $PRIVATE_KEY --slow",
"06_SetAuthorityAndTransferOwnerships:deployment:deploy:sepolia": "forge script script/deploy/06_SetAuthorityAndTransferOwnerships.s.sol --rpc-url $SEPOLIA_RPC_URL --private-key $PRIVATE_KEY --slow",
"06_SetAuthorityAndTransferOwnerships:deployment:deploy:mainnet": "forge script script/deploy/06_SetAuthorityAndTransferOwnerships.s.sol --rpc-url $MAINNET_RPC_URL --private-key $PRIVATE_KEY --slow",
"07_DeployDecoderAndSanitizer:deployment:test": "forge test --mc 06_TransferOwnerships --ffi --nmp \"\"",
"07_DeployDecoderAndSanitizer:deployment:deploy:anvil": "forge script script/deploy/07_DeployDecoderAndSanitizer.s.sol.s.sol --rpc-url http://localhost:8545 --private-key $PRIVATE_KEY --slow",
"07_DeployDecoderAndSanitizer:deployment:deploy:tenderly": "forge script script/deploy/07_DeployDecoderAndSanitizer.s.sol --rpc-url $TENDERLY_RPC_URL --private-key $PRIVATE_KEY --slow",
"07_DeployDecoderAndSanitizer:deployment:deploy:sepolia": "forge script script/deploy/07_DeployDecoderAndSanitizer.s.sol --rpc-url $SEPOLIA_RPC_URL --private-key $PRIVATE_KEY --slow",
"07_DeployDecoderAndSanitizer:deployment:deploy:mainnet": "forge script script/deploy/07_DeployDecoderAndSanitizer.s.sol --rpc-url $MAINNET_RPC_URL --private-key $PRIVATE_KEY --slow",
"08_DeployRateProviders:deployment:test": "forge test --mc 06_TransferOwnerships --ffi --nmp \"\"",
"08_DeployRateProviders:deployment:deploy:anvil": "forge script script/deploy/08_DeployRateProviders.s.sol --rpc-url http://localhost:8545 --private-key $PRIVATE_KEY --slow",
"08_DeployRateProviders:deployment:deploy:tenderly": "forge script script/deploy/08_DeployRateProviders.s.sol --rpc-url $TENDERLY_RPC_URL --private-key $PRIVATE_KEY --slow",
"08_DeployRateProviders:deployment:deploy:sepolia": "forge script script/deploy/08_DeployRateProviders.s.sol --rpc-url $SEPOLIA_RPC_URL --private-key $PRIVATE_KEY --slow",
"08_DeployRateProviders:deployment:deploy:mainnet": "forge script script/deploy/08_DeployRateProviders.s.sol --rpc-url $MAINNET_RPC_URL --private-key $PRIVATE_KEY --slow",
"prepare": "husky"
"prepare": "husky",
"deploy-mainnet": "forge script script/deploy/deployAll.s.sol -f $MAINNET_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"
},
"devDependencies": {
"@layerzerolabs/lz-definitions": "^2.3.25",
Expand Down
8 changes: 2 additions & 6 deletions script/Base.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ abstract contract BaseScript is Script {
string constant CONFIG_CHAIN_ROOT = "./deployment-config/chains/";

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

/// @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 @@ -48,18 +48,15 @@ abstract contract BaseScript is Script {
deployCreate2 = vm.envOr({ name: "CREATE2", defaultValue: true });
address from = vm.envOr({ name: "ETH_FROM", defaultValue: address(0) });
if (from != address(0)) {
console.log("using env provided wallet");
broadcaster = from;
} else {
console.log("Using default mnemonic wallet");
mnemonic = vm.envOr({ name: "MNEMONIC", defaultValue: TEST_MNEMONIC });
(broadcaster,) = deriveRememberKey({ mnemonic: mnemonic, index: 0 });
}
console2.log("broadcaster", broadcaster);

// if this chain doesn't have a CREATEX deployment, deploy it ourselves
if (address(CREATEX).code.length == 0) {
revert("CREATEX Not Deployed on this chain. Use the Library to forge deploy it");
revert("CREATEX Not Deployed on this chain. Use the DeployCustomCreatex script to deploy it");
}
}

Expand All @@ -82,7 +79,6 @@ abstract contract BaseScript is Script {
}

function getChainConfigFile() internal view returns (string memory) {
console2.log("Deployment Chain ID:", block.chainid);
return vm.readFile(string.concat(CONFIG_CHAIN_ROOT, Strings.toString(block.chainid), ".json"));
}

Expand Down
Loading

0 comments on commit b2d6251

Please sign in to comment.