Skip to content

Commit

Permalink
feat: YieldBox tests wip
Browse files Browse the repository at this point in the history
  • Loading branch information
0xadrii committed Jul 26, 2024
1 parent 4d788d7 commit 9c10ef9
Show file tree
Hide file tree
Showing 39 changed files with 3,904 additions and 153 deletions.
18 changes: 18 additions & 0 deletions cache/fuzz/failures
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Seeds for failure cases proptest has generated in the past. It is
# automatically read and these particular cases re-run before any
# novel cases are generated.
#
# It is recommended to check this file in to source control so that
# everyone who runs the test benefits from these saved cases.
cc 9040c3260c9c57c024a243facc80b429ca054b11c110918dbb1543b82ac153ac # shrinks to 0xc25f3d2d0000000000000000000000000000000000000000000000000000000000001236
cc 69dddd67435b265e7f01fa24a20f3e7965cfcbf303f1788dad39a2a4c3fa8423 # shrinks to 0xc25f3d2d0000000000000000000000000000000000000000000000000026cfe865801d54
cc 03331ec39ab18b1e2abcac3fc460b97b5e44e0a6feb3c5a26f95c46c6157d1a1 # shrinks to 0x4c968046000000000000000000000049d881b0c940ef11e0badcaf5dbffdbb200d061b39
cc b141feffdc218718993b4033ddc744a0733409376d537029cbee7f684e4114bf # shrinks to 0x3abb63771951b487797142ed68f7f9f1bc353651fb04c123ecf6934b58d9760bef393531
cc 6980e13f435e4b7404dc6c693ea15fb9dc45722a34838ef931b329b2f4f79712 # shrinks to 0x5075f177000000000000000000000000000000000000000000000000ffffffffffffffff
cc 94be2481c895c7331df01fa6c24da158168904c48e1aadc71d98ee21aa99580f # shrinks to 0xf420ce1b0000000000000000000000000000000000000000000000000000000000000000
cc 0d9d7c7fd825d3fdeb89a6eaee0e26d9f47024aad409215f901569c770d871bd # shrinks to 0x104eedbf00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000
cc 8b27d8b63357129a444c733398b2e9596d090a0a00196789936c58166bb53659 # shrinks to 0x80ca6f6d0000000000000000000000000000000000000000000000000000015a17e7deb7000000000000000000000000000000000000000000000000000000000000001b
cc d7f5a4ef4590b69dc183603db010449221ac0404245a117ff5be78aaf33e6916 # shrinks to 0x0097a1480000000000000000000000000000000000000000000000000000000000000000
cc 28378ff8238f0f55f3ec47c2219e9ca36e013036f44843f2efba5c32d90682e4 # shrinks to 0x620872930000000000000000000000000000000000000000000000286200f69c0e65347d
cc 315ee59773a931c51a86c2679800f9d8fc6e7e4d1e8f2dc9446ac25487b6f4ff # shrinks to 0x3255e7dc00000000000000000000000000000000000000000000001769366df606516aa1
cc ad036b659b802c36284fb0f1be6f370e2eef10c3fe28534b9a31dd7b01261f6b # shrinks to 0x691a05500000000000000000000000000000000000000000000000000000000000000007
1 change: 1 addition & 0 deletions cache/test-failures
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test_batchTransfer_whenValueIsSmallerOrEqualToBalance
2 changes: 1 addition & 1 deletion contracts/AssetRegister.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ contract AssetRegister is ERC1155 {
constructor() {
assets.push(Asset(TokenType.None, address(0), NO_STRATEGY, 0));
}

function assetCount() public view returns (uint256) {
return assets.length;
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/ERC1155.sol
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ contract ERC1155 is IERC1155 {
}

function _transferSingle(
address from,
address from,
address to,
uint256 id,
uint256 value
Expand Down
8 changes: 4 additions & 4 deletions contracts/NativeTokenFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ contract NativeTokenFactory is AssetRegister {
/// If 'from' is msg.sender, it's allowed.
/// If 'msg.sender' is an address (an operator) that is approved by 'from', it's allowed.
modifier allowed(address _from, uint256 _id) {
_requireTransferAllowed(
_requireTransferAllowed(
_from,
isApprovedForAsset[_from][msg.sender][_id]
);
);
_;
}

}
/// @notice Only allows the `owner` to execute the function.
/// @param tokenId The `tokenId` that the sender has to be owner of.
modifier onlyOwner(uint256 tokenId) {
Expand Down
2 changes: 1 addition & 1 deletion contracts/OZOwnable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ abstract contract OZOwnable is Context {
constructor() {
_transferOwnership(_msgSender());
}

/**
* @dev Throws if called by any account other than the owner.
*/
Expand Down
Loading

0 comments on commit 9c10ef9

Please sign in to comment.