Skip to content

Commit

Permalink
feat: readying superVault on base
Browse files Browse the repository at this point in the history
  • Loading branch information
0xTimepunk committed Jan 6, 2025
1 parent 1c477f4 commit e610602
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
17 changes: 12 additions & 5 deletions script/forge-scripts/Deploy.SuperVault.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ contract MainnetDeploySuperVault is Script {

/// @notice Deploy SuperVault
uint256[] memory superformIds = new uint256[](1);
superformIds[0] = chainId == 1
? 6_277_101_737_254_839_006_396_113_557_627_089_406_881_862_780_813_070_776_090 // Gauntlet's USDC Core,
: 53_060_340_969_225_424_123_272_122_895_191_053_251_498_236_784_870_936_252_229_868;

if (chainId == 1) {
superformIds[0] = 6_277_101_737_254_839_006_396_113_557_627_089_406_881_862_780_813_070_776_090;
} else if (chainId == 8453) {
superformIds[0] = 53_060_340_969_225_715_878_205_116_584_081_115_198_352_809_299_304_516_324_185_578;
}

uint256[] memory startingWeights = new uint256[](1);
startingWeights[0] = 10_000;
Expand All @@ -59,8 +62,12 @@ contract MainnetDeploySuperVault is Script {
MANAGEMENT = 0xde587D0C7773BD239fF1bE87d32C876dEd4f7879;
}
// USDC on mainnet
address ASSET =
chainId == 1 ? 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 : 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913;
address ASSET;
if (chainId == 1) {
ASSET = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;
} else if (chainId == 8453) {
ASSET = 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913;
}

assert(STRATEGIST != address(0));
assert(VAULT_MANAGER != address(0));
Expand Down
4 changes: 2 additions & 2 deletions script/utils/deploy_supervault.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ export TENDERLY_ACCESS_TOKEN=$(op read op://5ylebqljbh3x6zomdxi3qd7tsa/TENDERLY_
# Run the script
echo Deploying SV To Production: ...

forge script script/forge-scripts/Deploy.SuperVault.s.sol:MainnetDeploySuperVault --sig "deploySuperVault(uint256,uint256)" 0 1 \
--rpc-url $ETHEREUM_RPC_URL \
forge script script/forge-scripts/Deploy.SuperVault.s.sol:MainnetDeploySuperVault --sig "deploySuperVault(uint256,uint256)" 0 8453 \
--rpc-url $BSC_RPC_URL \
--account default \
--sender 0x48aB8AdF869Ba9902Ad483FB1Ca2eFDAb6eabe92 \
--legacy \
Expand Down
3 changes: 1 addition & 2 deletions script/utils/verify_contracts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,9 @@ export BASESCAN_API_KEY=$(op read op://5ylebqljbh3x6zomdxi3qd7tsa/BASESCAN_API_K
# --etherscan-api-key $TENDERLY_ACCESS_TOKEN


constructor_arg_staging="$(cast abi-encode 'constructor((address,address,address,address,string,uint256,uint256[],uint256[]))' '(0xB2C097ac459aFAc892ae5b35f6bd6a9Dd3071F47,0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913,0x1F05a8Ff6d895Ba04C84c5031c5d63FA1afCDA6F,0x6A5DD913fE3CB5193E09D1810a3b9ff1C0f9c0D6,SuperUSDC,1000000000000,[53060340969225424123272122895191053251498236784870936252229868],[10000])')"
#constructor_arg="$(cast abi-encode 'constructor((address,address,address,address,string,uint256,uint256[],uint256[]))' '(0xB2C097ac459aFAc892ae5b35f6bd6a9Dd3071F47,0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913,0x1F05a8Ff6d895Ba04C84c5031c5d63FA1afCDA6F,0x6A5DD913fE3CB5193E09D1810a3b9ff1C0f9c0D6,SuperUSDC,1000000000000,[53060340969225424123272122895191053251498236784870936252229868],[10000])')"

export NETWORK_ID=8453
export TENDERLY_VERIFIER_URL_STAGING=https://api.tenderly.co/api/v1/account/superform/project/v1/etherscan/verify/network/8453

forge verify-contract 0xBD34DB7ef42533A51eb0F53eD9D91D06880bcdf1 "src/SuperVault.sol:SuperVault" --chain-id $NETWORK_ID \
--num-of-optimizations 200 \
Expand Down

0 comments on commit e610602

Please sign in to comment.