Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
26f4eaf
Fix extendDeposit issues and optimize gas usage
shark0der Aug 9, 2022
af074ef
Fix minted tokenId and deposit save location in `depositTo`
shark0der Aug 9, 2022
3a949a6
Remove redundant comments
shark0der Aug 9, 2022
a4c366b
Fix stack too deep in depositTo
shark0der Aug 9, 2022
426d8cf
Fix excessive withdrawals in `withdraw`
shark0der Aug 9, 2022
0b142db
Fix reward calculation bug in `setPoolFee`
shark0der Aug 9, 2022
b99cda5
Fix newCoverAmount by adding a typecast before the bit shift
shark0der Aug 11, 2022
5497ed0
Fix bit shift direction in getItemAt
shark0der Aug 11, 2022
8b21bba
Fix type casting order in CoverAmountGroup.setItemAt
shark0der Aug 11, 2022
cf98c6f
Fix bit shift direction in BucketTrancheGroup.getItemAt
shark0der Aug 11, 2022
e52d3ba
Fix mask and itemUnderlying calculation in BucketTrancheGroup.setItemAt
shark0der Aug 11, 2022
89276c1
Fix packedCoverTrancheAllocation bit shift operations
shark0der Aug 11, 2022
2b8dbcc
Fix initial deposit reverting when a private pool is created
shark0der Aug 11, 2022
10492a6
Remove the _ prefix from isApprovedOrOwner and move below initialize()
shark0der Aug 11, 2022
1d375b3
Rename argument to prevent shadowing
shark0der Aug 11, 2022
ad11869
Fix incorrect storage location for name and symbol issue
shark0der Aug 11, 2022
8c8bc60
Add back the accidentally removed isApprovedOrOwner
shark0der Aug 11, 2022
367f285
Fix StakingPool constructor args in unit tests
shark0der Sep 15, 2022
e3d1099
Remove unused mock NFT and fix tokenURI warning
shark0der Sep 16, 2022
5de97c6
Add todo comment to flag potential deposit issue
shark0der Sep 16, 2022
9ae3f41
Add minor deposit optimization
shark0der Sep 16, 2022
4db0860
Remove unused CLMockUnknownNFT
shark0der Sep 16, 2022
6e10204
Fix ERC721Mock compile warning
shark0der Sep 16, 2022
f4d3999
Cleanup Solmate ERC721 import in StakingPool
shark0der Sep 16, 2022
8686910
Remove unused mock nft
shark0der Sep 26, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions contracts/mocks/Claims/CLMockUnknownNFT.sol

This file was deleted.

20 changes: 0 additions & 20 deletions contracts/mocks/Incidents/ICMockUnknownNFT.sol

This file was deleted.

6 changes: 2 additions & 4 deletions contracts/mocks/Tokens/ERC721Mock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,23 @@ contract ERC721Mock is ERC721 {
return spender == owner || isApprovedForAll[owner][spender] || spender == getApproved[tokenId];
}

function tokenURI(uint) public view override returns (string memory) {
function tokenURI(uint) public pure override returns (string memory) {
return "";
}

function _operatorTransferFrom(address from, address to, uint256 tokenId) internal {
require(from == _ownerOf[tokenId], "WRONG_FROM");

require(from == _ownerOf[tokenId], "WRONG_FROM");
require(to != address(0), "INVALID_RECIPIENT");

// Underflow of the sender's balance is impossible because we check for
// ownership above and the recipient's balance can't realistically overflow.
unchecked {
_balanceOf[from]--;

_balanceOf[to]++;
}

_ownerOf[tokenId] = to;

delete getApproved[tokenId];

emit Transfer(from, to, tokenId);
Expand Down
6 changes: 2 additions & 4 deletions contracts/mocks/integration/IntegrationMockStakingPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@ contract IntegrationMockStakingPool is StakingPool {
address _nxm,
address _coverContract,
ITokenController _tokenController
)
StakingPool("Nexus Mutual Staking Pool", "NMSPT", _nxm, _coverContract, _tokenController)
{
) StakingPool(_nxm, _coverContract, _tokenController) {
// noop
}

function initialize(address _manager, uint _poolId) external /*override*/ {
_mint(_manager, totalSupply++);
poolId = _poolId;
}


function stake(uint amount) external {
_mint(msg.sender, amount);
}
Expand Down
Loading