Skip to content

Commit

Permalink
fix: contract verification on deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
0xChin committed Nov 20, 2024
1 parent 315f97d commit 46ab7d7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 33 deletions.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
"build": "forge build",
"build:optimized": "FOUNDRY_PROFILE=optimized forge build",
"coverage": "forge coverage --report summary --report lcov --match-path 'test/unit/*'",
"deploy:arbitrum": "bash -c 'source .env && TESTING=false forge script Deploy -vvvvv --rpc-url $ARBITRUM_RPC --broadcast --chain arbitrum --account dev --verify'",
"deploy:arbitrum-sepolia": "bash -c 'source .env && forge script Deploy -vvvvv --rpc-url $ARBITRUM_SEPOLIA_RPC --broadcast --chain arbitrum-sepolia --account dev --verify --verifier blockscout --verifier-url https://arbitrum-sepolia.blockscout.com/api/'",
"deploy:base": "bash -c 'source .env && TESTING=false forge script Deploy -vvvvv --rpc-url $BASE_RPC --broadcast --chain base --account dev --verify'",
"deploy:bnb": "bash -c 'source .env && TESTING=false forge script Deploy -vvvvv --rpc-url $BNB_RPC --broadcast --chain 56 --account dev --verify'",
"deploy:optimism": "bash -c 'source .env && TESTING=false forge script Deploy -vvvvv --rpc-url $OPTIMISM_RPC --broadcast --chain optimism --account dev --verify'",
"deploy:optimism-sepolia": "bash -c 'source .env && forge script Deploy -vvvvv --rpc-url $OPTIMISM_SEPOLIA_RPC --broadcast --chain optimism-sepolia --account dev --verify --verifier blockscout --verifier-url https://optimism-sepolia.blockscout.com/api/'",
"deploy:polygon": "bash -c 'source .env && TESTING=false forge script Deploy -vvvvv --rpc-url $POLYGON_RPC --broadcast --chain polygon --account dev --verify'",
"deploy:arbitrum": "bash -c 'source .env && TESTING=false forge script Deploy -vvvvv --rpc-url $ARBITRUM_RPC --broadcast --chain arbitrum --account dev --verify --etherscan-api-key $ARBITRUM_ETHERSCAN_API_KEY'",
"deploy:arbitrum-sepolia": "bash -c 'source .env && TESTING=false forge script Deploy -vvvvv --rpc-url $ARBITRUM_SEPOLIA_RPC --broadcast --chain arbitrum-sepolia --account dev --verify --verifier blockscout --verifier-url https://arbitrum-sepolia.blockscout.com/api/'",
"deploy:base": "bash -c 'source .env && TESTING=false forge script Deploy -vvvvv --rpc-url $BASE_RPC --broadcast --chain base --account dev --verify --etherscan-api-key $BASE_ETHERSCAN_API_KEY'",
"deploy:bnb": "bash -c 'source .env && TESTING=false forge script Deploy -vvvvv --rpc-url $BNB_RPC --broadcast --chain 56 --account dev --verify --etherscan-api-key $BNB_ETHERSCAN_API_KEY'",
"deploy:optimism": "bash -c 'source .env && TESTING=false forge script Deploy -vvvvv --rpc-url $OPTIMISM_RPC --broadcast --chain optimism --account dev --verify --etherscan-api-key $OPTIMISM_ETHERSCAN_API_KEY'",
"deploy:optimism-sepolia": "bash -c 'source .env && TESTING=false forge script Deploy -vvvvv --rpc-url $OPTIMISM_SEPOLIA_RPC --broadcast --chain optimism-sepolia --account dev --verify --verifier blockscout --verifier-url https://optimism-sepolia.blockscout.com/api/'",
"deploy:polygon": "bash -c 'source .env && TESTING=false forge script Deploy -vvvvv --rpc-url $POLYGON_RPC --broadcast --chain polygon --account dev --verify --etherscan-api-key $POLYGON_ETHERSCAN_API_KEY'",
"lint:check": "yarn lint:sol-tests && yarn lint:sol-logic && forge fmt --check",
"lint:fix": "sort-package-json && forge fmt && yarn lint:sol-tests --fix && yarn lint:sol-logic --fix",
"lint:natspec": "npx @defi-wonderland/natspec-smells --config natspec-smells.config.js",
Expand Down
35 changes: 9 additions & 26 deletions script/Deploy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ contract Deploy is Script {

params = DeploymentParams({
tokens: _tokens,
owner: GRATEFUL_MULTISIG,
owner: DEV_ADDRESS,
aavePool: IPool(0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2),
initialFee: 0.01 ether, // 1%
initialPerformanceFee: 0.05 ether, // 5%
Expand Down Expand Up @@ -120,7 +120,7 @@ contract Deploy is Script {

params = DeploymentParams({
tokens: _tokens,
owner: GRATEFUL_MULTISIG,
owner: DEV_ADDRESS,
aavePool: IPool(0x794a61358D6845594F94dc1DB02A252b5b4814aD),
initialFee: 0.01 ether, // 1%
initialPerformanceFee: 0.05 ether, // 5%
Expand Down Expand Up @@ -154,7 +154,7 @@ contract Deploy is Script {

params = DeploymentParams({
tokens: _tokens,
owner: GRATEFUL_MULTISIG,
owner: DEV_ADDRESS,
aavePool: IPool(0x794a61358D6845594F94dc1DB02A252b5b4814aD),
initialFee: 0.01 ether, // 1%
initialPerformanceFee: 0.05 ether, // 5%
Expand Down Expand Up @@ -188,7 +188,7 @@ contract Deploy is Script {

params = DeploymentParams({
tokens: _tokens,
owner: GRATEFUL_MULTISIG,
owner: DEV_ADDRESS,
aavePool: IPool(0x794a61358D6845594F94dc1DB02A252b5b4814aD),
initialFee: 0.01 ether, // 1%
initialPerformanceFee: 0.05 ether, // 5%
Expand Down Expand Up @@ -216,31 +216,12 @@ contract Deploy is Script {

params = DeploymentParams({
tokens: _tokens,
owner: GRATEFUL_MULTISIG,
owner: DEV_ADDRESS,
aavePool: IPool(0x6807dc923806fE8Fd134338EABCA509979a7e0cB),
initialFee: 0.01 ether, // 1%
initialPerformanceFee: 0.05 ether, // 5%
vaults: _vaults
});
} else if (chainId == CHAIN_OPTIMISM_SEPOLIA) {
address[] memory _tokens = new address[](1);
_tokens[0] = address(0x5fd84259d66Cd46123540766Be93DFE6D43130D7);

VaultDeploymentParams[] memory _vaults = new VaultDeploymentParams[](1);
_vaults[0] = VaultDeploymentParams({
token: address(0x5fd84259d66Cd46123540766Be93DFE6D43130D7),
aToken: address(0xa818F1B57c201E092C4A2017A91815034326Efd1),
rewardsController: address(0xaD4F91D26254B6B0C6346b390dDA2991FDE2F20d)
});

params = DeploymentParams({
tokens: _tokens,
owner: GRATEFUL_MULTISIG,
aavePool: IPool(0xb50201558B00496A145fE76f7424749556E326D8),
initialFee: 0.01 ether, // 1%
initialPerformanceFee: 0.05 ether, // 5%
vaults: _vaults
});
} else if (chainId == CHAIN_BASE) {
address[] memory _tokens = new address[](3);
_tokens[0] = address(0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913); // USDC
Expand All @@ -257,7 +238,7 @@ contract Deploy is Script {

params = DeploymentParams({
tokens: _tokens,
owner: GRATEFUL_MULTISIG,
owner: DEV_ADDRESS,
aavePool: IPool(0xA238Dd80C259a72e81d7e4664a9801593F98d1c5),
initialFee: 0.01 ether, // 1%
initialPerformanceFee: 0.05 ether, // 5%
Expand Down Expand Up @@ -326,7 +307,7 @@ contract Deploy is Script {
ERC20(vaultParams.token),
ERC20(vaultParams.aToken),
_params.aavePool,
grateful.owner(),
GRATEFUL_MULTISIG,
IRewardsController(vaultParams.rewardsController),
address(grateful) // newOwner
);
Expand All @@ -337,6 +318,8 @@ contract Deploy is Script {
vaults[vaultParams.token] = vault;
}

grateful.transferOwnership(GRATEFUL_MULTISIG);

if (!vm.envBool("TESTING")) {
vm.stopBroadcast();
}
Expand Down

0 comments on commit 46ab7d7

Please sign in to comment.