Skip to content

Commit

Permalink
feat: Blast points integration
Browse files Browse the repository at this point in the history
  • Loading branch information
0xhiroshi committed Feb 26, 2024
1 parent 61db933 commit a169a88
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
8 changes: 7 additions & 1 deletion contracts/ProtocolFeesDistributor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {ReentrancyGuard} from "@looksrare/contracts-libs/contracts/ReentrancyGua
import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";

import {IBlast, GasMode, YieldMode} from "./interfaces/IBlast.sol";
import {IBlastPoints} from "./interfaces/IBlastPoints.sol";

/**
* @title ProtocolFeesDistributor
Expand Down Expand Up @@ -50,16 +51,21 @@ contract ProtocolFeesDistributor is Pausable, ReentrancyGuard, OwnableTwoSteps,
* @param _weth address of the WETH token
* @param _owner address of the owner
* @param _blast address of the BLAST precompile
* @param _blastPoints The Blast points configuration.
* @param _blastPointsOperator The Blast points operator.
*/
constructor(
address _weth,
address _owner,
address _blast
address _blast,
address _blastPoints,
address _blastPointsOperator
) OwnableTwoSteps(_owner) {
WETH = _weth;
merkleRootUsed[bytes32(0)] = true;

IBlast(_blast).configure(YieldMode.CLAIMABLE, GasMode.CLAIMABLE, _owner);
IBlastPoints(_blastPoints).configurePointsOperator(_blastPointsOperator);
}

/**
Expand Down
6 changes: 6 additions & 0 deletions contracts/interfaces/IBlastPoints.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IBlastPoints {
function configurePointsOperator(address operator) external;
}
4 changes: 3 additions & 1 deletion test/protocolFeesDistributor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ describe("ProtocolFeesDistributor", () => {
protocolFeesDistributor = await ProtocolFeesDistributor.deploy(
"0x4200000000000000000000000000000000000023",
admin.address,
"0x4300000000000000000000000000000000000002"
"0x4300000000000000000000000000000000000002",
"0x2fc95838c71e76ec69ff817983BFf17c710F34E0",
admin.address
);
await protocolFeesDistributor.deployed();
});
Expand Down

0 comments on commit a169a88

Please sign in to comment.