Skip to content

Commit

Permalink
prettify
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelcabot committed Nov 3, 2022
1 parent ff84a4d commit c53ec12
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 20 deletions.
19 changes: 8 additions & 11 deletions contracts/SoulLinker.sol
Expand Up @@ -38,17 +38,14 @@ contract SoulLinker is DexAMM, Ownable, EIP712 {
/// @param _swapRouter Swap router address
/// @param _reserveWallet Wallet that will receive the fee
constructor(
address owner,
ISoulboundIdentity _soulboundIdentity,
uint256 _storePermissionPrice,
address _utilityToken,
address _wrappedNativeToken,
address _swapRouter,
address _reserveWallet
)
EIP712("SoulLinker", "1.0.0")
DexAMM(_swapRouter, _wrappedNativeToken)
{
address owner,
ISoulboundIdentity _soulboundIdentity,
uint256 _storePermissionPrice,
address _utilityToken,
address _wrappedNativeToken,
address _swapRouter,
address _reserveWallet
) EIP712("SoulLinker", "1.0.0") DexAMM(_swapRouter, _wrappedNativeToken) {
require(_utilityToken != address(0), "ZERO_ADDRESS");
require(_reserveWallet != address(0), "ZERO_ADDRESS");
require(address(_soulboundIdentity) != address(0), "ZERO_ADDRESS");
Expand Down
13 changes: 4 additions & 9 deletions test/Soulbound2FA.test.ts
Expand Up @@ -43,10 +43,7 @@ describe("Soulbound Two-factor authentication (2FA)", () => {
soulboundIdentityAddress,
owner
);
soulbound2FA = Soulbound2FA__factory.connect(
soulbound2FAAddress,
owner
);
soulbound2FA = Soulbound2FA__factory.connect(soulbound2FAAddress, owner);

// we mint identity SBT
await soulboundIdentity.connect(owner).mint(someone.address);
Expand All @@ -63,16 +60,14 @@ describe("Soulbound Two-factor authentication (2FA)", () => {
});

it("should fail to mint from someone", async () => {
await expect(soulbound2FA.connect(someone).mint(someone.address))
.to.be.rejected;
await expect(soulbound2FA.connect(someone).mint(someone.address)).to.be
.rejected;
});
});

describe("tokenUri", () => {
it("should fail to transfer because its soulbound", async () => {
const mintTx = await soulbound2FA
.connect(owner)
.mint(someone.address);
const mintTx = await soulbound2FA.connect(owner).mint(someone.address);

const mintReceipt = await mintTx.wait();
const tokenId = mintReceipt.events![0].args![1].toNumber();
Expand Down

0 comments on commit c53ec12

Please sign in to comment.