@@ -10,10 +10,7 @@ import "./interfaces/IEscrowedMultipleMerkleDistributor.sol";
10
10
/// @title Kwenta EscrowedMultipleMerkleDistributor
11
11
/// @author JaredBorders and JChiaramonte7
12
12
/// @notice Facilitates trading incentives distribution over multiple periods.
13
- contract EscrowedMultipleMerkleDistributor is
14
- IEscrowedMultipleMerkleDistributor ,
15
- Owned
16
- {
13
+ contract EscrowedMultipleMerkleDistributor is IEscrowedMultipleMerkleDistributor , Owned {
17
14
/// @inheritdoc IEscrowedMultipleMerkleDistributor
18
15
address public immutable override rewardEscrow;
19
16
@@ -31,29 +28,19 @@ contract EscrowedMultipleMerkleDistributor is
31
28
/// @param _owner: designated owner of this contract
32
29
/// @param _token: address of erc20 token to be distributed
33
30
/// @param _rewardEscrow: address of kwenta escrow for tokens claimed
34
- constructor (
35
- address _owner ,
36
- address _token ,
37
- address _rewardEscrow
38
- ) Owned (_owner) {
31
+ constructor (address _owner , address _token , address _rewardEscrow ) Owned (_owner) {
39
32
token = _token;
40
33
rewardEscrow = _rewardEscrow;
41
34
}
42
35
43
36
/// @inheritdoc IEscrowedMultipleMerkleDistributor
44
- function setMerkleRootForEpoch (
45
- bytes32 merkleRoot ,
46
- uint256 epoch
47
- ) external override onlyOwner {
37
+ function setMerkleRootForEpoch (bytes32 merkleRoot , uint256 epoch ) external override onlyOwner {
48
38
merkleRoots[epoch] = merkleRoot;
49
39
emit MerkleRootModified (epoch);
50
40
}
51
41
52
42
/// @inheritdoc IEscrowedMultipleMerkleDistributor
53
- function isClaimed (
54
- uint256 index ,
55
- uint256 epoch
56
- ) public view override returns (bool ) {
43
+ function isClaimed (uint256 index , uint256 epoch ) public view override returns (bool ) {
57
44
uint256 claimedWordIndex = index / 256 ;
58
45
uint256 claimedBitIndex = index % 256 ;
59
46
uint256 claimedWord = claimedBitMaps[epoch][claimedWordIndex];
@@ -68,8 +55,7 @@ contract EscrowedMultipleMerkleDistributor is
68
55
uint256 claimedWordIndex = index / 256 ;
69
56
uint256 claimedBitIndex = index % 256 ;
70
57
claimedBitMaps[epoch][claimedWordIndex] =
71
- claimedBitMaps[epoch][claimedWordIndex] |
72
- (1 << claimedBitIndex);
58
+ claimedBitMaps[epoch][claimedWordIndex] | (1 << claimedBitIndex);
73
59
}
74
60
75
61
/// @inheritdoc IEscrowedMultipleMerkleDistributor
@@ -81,8 +67,7 @@ contract EscrowedMultipleMerkleDistributor is
81
67
uint256 epoch
82
68
) public override {
83
69
require (
84
- ! isClaimed (index, epoch),
85
- "EscrowedMultipleMerkleDistributor: Drop already claimed. "
70
+ ! isClaimed (index, epoch), "EscrowedMultipleMerkleDistributor: Drop already claimed. "
86
71
);
87
72
88
73
// verify the merkle proof
@@ -108,7 +93,7 @@ contract EscrowedMultipleMerkleDistributor is
108
93
/// @inheritdoc IEscrowedMultipleMerkleDistributor
109
94
function claimMultiple (Claims[] calldata claims ) external override {
110
95
uint256 cacheLength = claims.length ;
111
- for (uint256 i = 0 ; i < cacheLength; ) {
96
+ for (uint256 i = 0 ; i < cacheLength;) {
112
97
claim (
113
98
claims[i].index,
114
99
claims[i].account,
0 commit comments