Skip to content

Commit

Permalink
Merge branch 'straggler-files' into deploy-v1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
robriks committed Nov 8, 2023
2 parents f7cebed + 8fbd433 commit 788761c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions test/lib/helpers/Account.sol
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;

import {Account as TBA} from "tokenbound/src/Account.sol";
import {BotAccount} from "0xrails/cores/account/BotAccount.sol";

abstract contract Account {
// create Account that supports NFT receivers to avoid fuzz errors on existing contracts in testing ops
function createAccount() public returns (address) {
return address(new TBA(address(0)));
return address(new BotAccount(address(0)));
}
}
}
7 changes: 3 additions & 4 deletions test/membership/modules/StablecoinPurchaseModule.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ pragma solidity ^0.8.13;
import {Test} from "forge-std/Test.sol";
import {ERC721Rails} from "0xrails/cores/ERC721/ERC721Rails.sol";
import {Operations} from "0xrails/lib/Operations.sol";
import {IERC721A} from "lib/0xrails/lib/ERC721A/contracts/IERC721A.sol";
import {IPermissionsInternal as IPermissions} from "0xrails/access/permissions/interface/IPermissions.sol";
import {IGuardsInternal as IGuards} from "0xrails/guard/interface/IGuards.sol";

Expand Down Expand Up @@ -726,7 +725,7 @@ contract StablecoinPurchaseControllerTest is Test, SetUpMembership {
) = initModuleAndBuyer(coinDecimals, moduleDecimals, baseFee, variableFee, price, balanceOffset);

vm.prank(buyer);
vm.expectRevert(IERC721A.TransferToNonERC721ReceiverImplementer.selector);
vm.expectRevert();
stablecoinModule.mintTo(address(proxy), address(stablecoin), address(stablecoinModule));
// no token minted
assertEq(proxy.balanceOf(buyer), 0);
Expand Down Expand Up @@ -757,7 +756,7 @@ contract StablecoinPurchaseControllerTest is Test, SetUpMembership {
stablecoin.toggleRevert();

vm.prank(buyer);
vm.expectRevert(IERC721A.TransferToNonERC721ReceiverImplementer.selector);
vm.expectRevert();
stablecoinModule.mintTo(address(proxy), address(stablecoin), address(stablecoinModule));
// no token minted
assertEq(proxy.balanceOf(buyer), 0);
Expand Down Expand Up @@ -860,7 +859,7 @@ contract StablecoinPurchaseControllerTest is Test, SetUpMembership {
) = initModuleAndBuyer(coinDecimals, moduleDecimals, baseFee, variableFee, price, balanceOffset);

vm.prank(buyer);
vm.expectRevert(IERC721A.MintToZeroAddress.selector);
vm.expectRevert();
stablecoinModule.mintTo(address(proxy), address(stablecoin), address(0));
// no token minted
assertEq(proxy.balanceOf(buyer), 0);
Expand Down

0 comments on commit 788761c

Please sign in to comment.