supersorbet / emblem-vault-solidity

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Emblem Vault Solidity Test Suite Results

  • Balance

    • should deploy storage
    • storage should be owned by deployer
    • should deploy balance
    • uninitialized storage should reflect current version of zero (48ms)
    • adding balance by non owner reverts (114ms)
    • uninitialized storage can not add balance (220ms)
    • initialized storage should reflect current version (52ms)
    • promote version should prevent balance from working (146ms)
    • should revert with invalid signature (213ms)
    • initialized storage and valid signature can add single balance (538ms)
    • can add multiple balances (646ms)
    • can hash balances in contract
    • hashed balances in contract matched client hashed balances
    • hashed balance object in contract matched client hashed balance object
    • hashed balance object with 10 balances matches (49ms)
    • adding witness by non owner should revert (114ms)
    • owner should be able to add witness (153ms)
    • removing witness by non owner should revert (151ms)
    • owner should be able to remove witness (210ms)
    • signature from witness with used nonce should revert (502ms)
    • should get all tokenIds for nftAddress (769ms)
    • should get single tokenId for nftAddress by index (1163ms)
    • should get tokenIds from map (1069ms)
    • should get tokenIds from map by index (1349ms)
  • Burn tokens

    • should burn directly via vault contract (199ms)
    • should not claim via handler without permission (176ms)
    • should claim via handler with permission (318ms)
    • should not be able to mint previously claimed vault (265ms)
    • unminted should not return claimed (106ms)
    • burnt via emblem vault should not return claimed (266ms)
  • Claimed

    • should deploy storage
    • storage should be owned by deployer
    • should deploy claimed
    • should transfer ownership to deployer (55ms)
    • uninitialized storage should reflect current version of zero (40ms)
    • uninitialized claimed can not add to legacy claim (94ms)
    • initialized storage should reflect current version (54ms)
    • initialized storage can add legacy claim (362ms)
    • should not be legacy claimed when legacy claimed root not stored (57ms)
    • should be claimed by ZERO ADDRESS when not minted (48ms)
    • should be claimed by type of "unknown" when not minted (49ms)
    • should be claimed when legacy (328ms)
    • should verify valid merklescript (79ms)
    • should verify valid merkle proof (80ms)
    • should not verify invalid merkle proof (77ms)
    • should verify valid complex merkle proof (81ms)
  • Emblem Vault

    • should deploy vault (57ms)
    • should not allow minting if not owned (58ms)
    • should allow minting if owned (161ms)
    • should serialize and hash locally (58ms)
    • should verify signature and hash in handler (187ms)
    • should not be witnessed if signer not a witness (187ms)
    • should be witnessed if signer is a witness (223ms)
    • should get correct address from signature (197ms)
    • should fail to mint with signature if signer is not a witness (510ms)
    • should mint with signature if signer is a witness (445ms)
    • should mint with signed price (499ms)
  • Vault Handler

    • should deploy handler (58ms)
    • should transfer vault ownership to handler (66ms)
  • NFTradeV2 (Single-Tenant)

    • NFTradeV2 NFT

      • has correct name
      • can mint (192ms)
      • users have expected balances (210ms)
    • NFTradeV2 Trade

      • reflects correct version
      • cannot place offer without approval
      • cannot offer un-owned token
      • can place offer after approval (214ms)
      • cannot add erc20 token offer when canOfferERC20 off (52ms)
      • cannot add erc20 token offer before allowance
      • can add erc20 token offer after allowance (179ms)
      • can withdraw offer (238ms)
      • rejecting another users offer fails (176ms)
      • can reject offer (272ms)
      • cannot accept offer without approval (173ms)
      • cannot accept erc20 offer without approval (174ms)
      • can accept erc20 offer with approval (622ms)
      • can withdraw erc20 offer (475ms)
      • can reject erc20 offer (254ms)
      • can accept offer after approval (666ms)
      • cannot accept offer for un-owned nft (187ms)
      • accepting offer removes all other offers (1263ms)
      • can get outstanding offers placed (353ms)
      • can get accepted offer for nft (1004ms)
      • accepting offer removes all outstanding offers for nft (774ms)
    • NFTradeV2 Payment

      • reflects correct token balances before trades
      • toggles pay to make and accept offers
      • can charge separate prices to make and accept offers
      • Pay to make offer

        • fails to add offer if trade contract not approved to spend
        • fails to add offer if too broke (76ms)
        • can make offer (266ms)
        • bank receives fee (299ms)
      • Pay to accept offer

        • fails to accept offer if trade contract not approved to spend
        • fails to accept offer if too broke (106ms)
        • can accept offer (609ms)
        • bank receives fee (698ms)
    • NFTradeV2 Trade Types

      • 2 separate nft contracts exist
      • users have correct balances of nfts before trades
      • can swap erc721 for erc721 (431ms)
      • can detect erc1155 vs erc721 vs erc20
      • can swap erc721 for erc1155 (440ms)
      • can swap erc1155 for erc1155 (367ms)
      • fails to accept offer if too broke (97ms)
      • can accept offer (626ms)
      • bank receives fee (671ms)
      • can swap erc20 for erc721 (369ms)
      • can swap erc20 for erc1155
    • NFTradeV2 Percentage

      • can calculate percentage of even
      • can calculate percentage of odd
      • can calculate 100%
      • can calculate 1000%
      • can calculate 0%
      • can calculate % of single
      • fails on attempt to calculate negative
        • percentage fee for erc20 offer

          • Percentage fees are paid when percentage fee for erc20 on (682ms)
          • Percentage fees are not paid when percentage fee for erc20 off (443ms)
  • NFTradeV3 (Multi-Tenant)

    • NFTradeV3 NFT

      • has correct name
      • can mint (628ms)
      • users have expected balances (184ms)
    • NFTradeV3 Trade

      • reflects correct version
      • cannot place offer without approval
      • cannot offer un-owned token
      • can place offer after approval (184ms)
      • cannot add erc20 token offer when canOfferERC20 off (59ms)
      • cannot add erc20 token offer before allowance
      • can add erc20 token offer after allowance (163ms)
      • can withdraw offer (239ms)
      • rejecting another users offer fails (185ms)
      • can reject offer (314ms)
      • cannot accept offer without approval (172ms)
      • cannot accept erc20 offer without approval (186ms)
      • can accept erc20 offer with approval (538ms)
      • can withdraw erc20 offer (209ms)
      • can reject erc20 offer (279ms)
      • can accept offer after approval (986ms)
      • cannot accept offer for un-owned nft (216ms)
      • accepting offer removes all other offers (871ms)
      • can get outstanding offers placed (386ms)
      • can get accepted offer for nft (780ms)
      • accepting offer removes all outstanding offers for nft (1023ms)
    • NFTradeV3 Payment

      • reflects correct token balances before trades
      • toggles pay to make and accept offers
      • can charge separate prices to make and accept offers
      • Pay to make offer

        • fails to add offer if trade contract not approved to spend
        • fails to add offer if too broke (61ms)
        • can make offer (278ms)
        • bank receives fee (260ms)
      • Pay to accept offer

        • fails to accept offer if trade contract not approved to spend
        • fails to accept offer if too broke (67ms)
        • can accept offer (1149ms)
        • bank receives fee (552ms)
    • NFTradeV3 Trade Types

      • 2 separate nft contracts exist
      • users have correct balances of nfts before trades
      • can swap erc721 for erc721 (538ms)
      • can detect erc1155 vs erc721 vs erc20
      • can swap erc721 for erc1155 (399ms)
      • can swap erc1155 for erc1155 (366ms)
      • can swap erc20 for erc721 (378ms)
      • can swap erc20 for erc1155 (338ms)
    • NFTradeV3 Percentage

      • can calculate percentage of even
      • can calculate percentage of odd
      • can calculate 100%
      • can calculate 0%
      • can calculate % of single
      • fails on attempt to calculate negative
        • percentage fee for erc20 offer

          • Percentage fees are paid when percentage fee for erc20 on (402ms)
          • Percentage fees are not paid when percentage fee for erc20 off (363ms)

About


Languages

Language:JavaScript 63.4%Language:Solidity 36.6%