Skip to content

Commit

Permalink
Implement Curve Pool Booster. (#2327)
Browse files Browse the repository at this point in the history
* feat: Implement Curve Pool Booster.

* feat: Add proxy for Curve Pool Booster.

* feaat: prepare deployment file for Curve Pool Booster.

* feat: add deployment file for Curve Pool Booster.

* feat: Add more test.

* Revert "Merge remote-tracking branch 'origin/master' into clement/pool-booster-curve"

This reverts commit b3de3b0, reversing
changes made to e65f962.

* fix: bring back latest changes on master.

* Fix tests

* feat: send ETH back.

* feat: Add events.

* feat: rescue tokens.

* feat: add possiblity to blacklist users.

* feat: add convex vecrv voter.

* prettier

* feat: Add fee.

* fix: adjust deploy number.

* fix: adjust deployment file with new Curve Pool.

* feat: add new curve pool/gauge.

* fix: use `Strategizable`instead of operator.

* prettier.

* fix: adjust event names.

* docs: add natspec to functions.

* fix: prevent `feeCollector` to be address(0).

* fix: use `call` instead of `transfer` for ETH.

* fix: use internal logic for setters.

* fix: adjust event name.

* fix: cache balance for gas.

* fix: ensure receiver is not address(0).

* fix: type adjustment.

* fix: emit event when fees are collected.

* fix: add onlyGovernor for initialization.

* fix: use safeApprove.

* fix: add natspec.

* fix: group logic.

* fix: use multichain strategist.

* prettier.

* fix: adjust deployment number.

* fix: adjust comments.

* fix: change from BASE_FEE to FEE_BASE.

* fix: add reentrancy blocker.

* fix: handle rebasing token for fees.

* linter + prettier.

* Add `closeCampaign()`  to CurvePoolBooster. (#2360)

* feat: add closeCampaign function to CurvePoolBooster.

* fix: remove immutable from campaignRemoteManager.

* fix: adjust naming and prettier.

* feat: configure deploymment with CreateX.

* fix: use encodeFunctionData to encodeWithSignature.

* feat: add arbitrum deployment file for CurvePoolBooster.

* feat: create a funciton for encodedSalt.

* feat: create multichainStrategist variable.

* fix: change proxy owner.

* try something.

* fix: adjust with new CampaignRemoteManager.

* fix merge conflit.

* fix: add more tests.

* feat: add extra test for Curve Pool Booster.

* prettier.

* fix: add missing`nonReentrant`.

* fix: approve 0 before approving.

* fix: gas optimization.

* fix: adjust salt.

* Ran prettier for js files

* Fixed deployName in Arb deploy of Pool Booster

* Deploy 119 and 120 - Curve Pool Booster Mainnet and Arbitrum (#2367)

* fix: adjust deployName.

* fix: deploy 119 and 120.

* feat: add safeTransfer for USDT.

* fix: adjust deployed address for CurvePoolBooster.

* fix: simplidy tests.

* Fixed Arb deploy script of Curve Pool Booster

* FIxed forked coverage tests

* Disabled OUSD AMO fork tests

* Fixed CurvePoolBooster fork test

* Fixed SimpleHarvester fork tests

---------

Co-authored-by: Shahul Hameed <[email protected]>
Co-authored-by: Domen Grabec <[email protected]>
Co-authored-by: Nicholas Addison <[email protected]>
  • Loading branch information
4 people authored Jan 30, 2025
1 parent 532dabf commit aca54e1
Show file tree
Hide file tree
Showing 17 changed files with 1,256 additions and 17 deletions.
77 changes: 77 additions & 0 deletions contracts/abi/createx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
[
{
"inputs": [
{
"internalType": "bytes32",
"name": "salt",
"type": "bytes32"
},
{
"internalType": "bytes",
"name": "initCode",
"type": "bytes"
}
],
"name": "deployCreate2",
"outputs": [
{
"internalType": "address",
"name": "newContract",
"type": "address"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "salt",
"type": "bytes32"
},
{
"internalType": "bytes",
"name": "initCode",
"type": "bytes"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
},
{
"components": [
{
"internalType": "uint256",
"name": "constructorAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "initCallAmount",
"type": "uint256"
}
],
"internalType": "struct CreateX.Values",
"name": "values",
"type": "tuple"
},
{
"internalType": "address",
"name": "refundAddress",
"type": "address"
}
],
"name": "deployCreate2AndInit",
"outputs": [
{
"internalType": "address",
"name": "newContract",
"type": "address"
}
],
"stateMutability": "payable",
"type": "function"
}
]
50 changes: 50 additions & 0 deletions contracts/contracts/interfaces/ICampaignRemoteManager.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface ICampaignRemoteManager {
function createCampaign(
CampaignCreationParams memory params,
uint256 destinationChainId,
uint256 additionalGasLimit,
address votemarket
) external payable;

function manageCampaign(
CampaignManagementParams memory params,
uint256 destinationChainId,
uint256 additionalGasLimit,
address votemarket
) external payable;

function closeCampaign(
CampaignClosingParams memory params,
uint256 destinationChainId,
uint256 additionalGasLimit,
address votemarket
) external payable;

struct CampaignCreationParams {
uint256 chainId;
address gauge;
address manager;
address rewardToken;
uint8 numberOfPeriods;
uint256 maxRewardPerVote;
uint256 totalRewardAmount;
address[] addresses;
address hook;
bool isWhitelist;
}

struct CampaignManagementParams {
uint256 campaignId;
address rewardToken;
uint8 numberOfPeriods;
uint256 totalRewardAmount;
uint256 maxRewardPerVote;
}

struct CampaignClosingParams {
uint256 campaignId;
}
}
7 changes: 7 additions & 0 deletions contracts/contracts/proxies/Proxies.sol
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,13 @@ contract MorphoGauntletPrimeUSDTStrategyProxy is

}

/**
* @notice CurvePoolBoosterProxy delegates calls to a CurvePoolBooster implementation
*/
contract CurvePoolBoosterProxy is InitializeGovernedUpgradeabilityProxy {

}

/**
* @notice OETHFixedRateDripperProxy delegates calls to a OETHFixedRateDripper implementation
*/
Expand Down
Loading

0 comments on commit aca54e1

Please sign in to comment.