Skip to content

Commit

Permalink
feat: add possiblity to blacklist users.
Browse files Browse the repository at this point in the history
  • Loading branch information
clement-ux committed Dec 19, 2024
1 parent de03aa9 commit a4c63d8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion contracts/contracts/strategies/CurvePoolBooster.sol
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ contract CurvePoolBooster is Initializable, Governable {
function createCampaign(
uint8 numberOfPeriods,
uint256 maxRewardPerVote,
address[] calldata blacklist,
uint256 bridgeFee,
uint256 additionalGasLimit
) external onlyOperator {
Expand All @@ -83,7 +84,7 @@ contract CurvePoolBooster is Initializable, Governable {
numberOfPeriods: numberOfPeriods,
maxRewardPerVote: maxRewardPerVote,
totalRewardAmount: totalRewardAmount,
addresses: new address[](0), // Is it blacklist?
addresses: blacklist,
hook: address(0),
isWhitelist: false
}),
Expand Down
12 changes: 6 additions & 6 deletions contracts/test/strategies/curvePoolBooster.mainnet.fork-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe("ForkTest: CurvePoolBooster", function () {

await curvePoolBooster
.connect(sDeployer)
.createCampaign(4, 10, parseUnits("0.1"), 0);
.createCampaign(4, 10, [addresses.mainnet.ConvexVoter], parseUnits("0.1"), 0);

expect(await oeth.balanceOf(curvePoolBooster.address)).to.equal(
parseUnits("0")
Expand Down Expand Up @@ -94,7 +94,7 @@ describe("ForkTest: CurvePoolBooster", function () {

await curvePoolBooster
.connect(sDeployer)
.createCampaign(4, 10, parseUnits("0.1"), 0);
.createCampaign(4, 10, [addresses.mainnet.ConvexVoter], parseUnits("0.1"), 0);

// Deal new OETH to pool booster
await oeth
Expand Down Expand Up @@ -137,7 +137,7 @@ describe("ForkTest: CurvePoolBooster", function () {

await curvePoolBooster
.connect(sDeployer)
.createCampaign(4, 10, parseUnits("0.1"), 0);
.createCampaign(4, 10, [addresses.mainnet.ConvexVoter], parseUnits("0.1"), 0);

// Deal new OETH to pool booster
await oeth
Expand Down Expand Up @@ -177,7 +177,7 @@ describe("ForkTest: CurvePoolBooster", function () {

await curvePoolBooster
.connect(sDeployer)
.createCampaign(4, 10, parseUnits("0.1"), 0);
.createCampaign(4, 10, [addresses.mainnet.ConvexVoter], parseUnits("0.1"), 0);

// Deal new OETH to pool booster
await oeth
Expand All @@ -202,7 +202,7 @@ describe("ForkTest: CurvePoolBooster", function () {
const { deployerAddr } = await getNamedAccounts();

await expect(
curvePoolBooster.createCampaign(4, 10, parseUnits("0.1"), 0)
curvePoolBooster.createCampaign(4, 10, [addresses.mainnet.ConvexVoter], parseUnits("0.1"), 0)
).to.be.revertedWith("Only Operator or Governor");
await expect(
curvePoolBooster.manageTotalRewardAmount(parseUnits("0.1"), 0)
Expand Down Expand Up @@ -230,7 +230,7 @@ describe("ForkTest: CurvePoolBooster", function () {
await expect(
curvePoolBooster
.connect(sDeployer)
.createCampaign(4, 10, parseUnits("0.1"), 0)
.createCampaign(4, 10, [addresses.mainnet.ConvexVoter], parseUnits("0.1"), 0)
).to.be.revertedWith("Campaign already created");
});

Expand Down

0 comments on commit a4c63d8

Please sign in to comment.