Skip to content

wise-foundation/liquid-nfts-audit

Repository files navigation

Wise Liquid NFT

// MAKE TRUNK - DEFAULT BRANCH!

--

setup:

npm install

--

tests-pre-requirements:

    # npm run chain
    # npm run deploy-token
    # npm run deploy-factory

run tests:

    # npm run test-locker
    # npm run test-factory
    # npm run coverage

EXPECTED GAS USAGE:

·------------------------------------------|---------------------------|-------------|----------------------------·
|   Solc version: 0.8.10+commit.fc410830   ·  Optimizer enabled: true  ·  Runs: 200  ·  Block limit: 6718946 gas  │
···········································|···························|·············|·····························
|  Methods                                                                                                        │
··················|························|·············|·············|·············|··············|··············
|  Contract       ·  Method                ·  Min        ·  Max        ·  Avg        ·  # calls     ·  usd (avg)  │
··················|························|·············|·············|·············|··············|··············
|  LiquidFactory  ·  contributeToLocker    ·      52576  ·     143218  ·     102345  ·          22  ·          -  │
··················|························|·············|·············|·············|··············|··············
|  LiquidFactory  ·  createLiquidLocker    ·          -  ·          -  ·     288877  ·          20  ·          -  │
··················|························|·············|·············|·············|··············|··············
|  LiquidFactory  ·  updateDefaultTarget   ·          -  ·          -  ·      28504  ·          10  ·          -  │
··················|························|·············|·············|·············|··············|··············
|  LiquidFactory  ·  updateImplementation  ·          -  ·          -  ·      29039  ·          10  ·          -  │
··················|························|·············|·············|·············|··············|··············
|  LiquidLocker   ·  disableLocker         ·          -  ·          -  ·      50969  ·          13  ·          -  │
··················|························|·············|·············|·············|··············|··············
|  LiquidLocker   ·  enableLocker          ·      84126  ·     114126  ·      99126  ·           2  ·          -  │
··················|························|·············|·············|·············|··············|··············
|  LiquidLocker   ·  refundDueDisabled     ·      23025  ·      31050  ·      25700  ·           3  ·          -  │
··················|························|·············|·············|·············|··············|··············
|  LiquidLocker   ·  refundDueSingle       ·          -  ·          -  ·      31920  ·           1  ·          -  │
··················|························|·············|·············|·············|··············|··············
|  NFT1155        ·  mint                  ·          -  ·          -  ·      35343  ·          20  ·          -  │
··················|························|·············|·············|·············|··············|··············
|  NFT721         ·  approve               ·      24975  ·      46889  ·      38494  ·          80  ·          -  │
··················|························|·············|·············|·············|··············|··············
|  NFT721         ·  mint                  ·          -  ·          -  ·     129578  ·          10  ·          -  │
··················|························|·············|·············|·············|··············|··············
|  Deployments                             ·                                         ·  % of limit  ·             │
···········································|·············|·············|·············|··············|··············
|  LiquidLocker                            ·          -  ·          -  ·    1915145  ·      28.5 %  ·          -  │
···········································|·············|·············|·············|··············|··············
|  NFT721                                  ·          -  ·          -  ·    1275636  ·        19 %  ·          -  │
·------------------------------------------|-------------|-------------|-------------|--------------|-------------·

1 (TIME) OLD: makeContribution · 44684 · 132335 · 93909 + 40000 (for first approval) NEW: contributeToLocker · 52576 · 143218 · 102345 + 40000 (for first approval)

2 (TIMES) OLD: makeContribution · 84684 · 132335 · 93909 + 40000 (needs new approval) NEW: contributeToLocker · 52576 · 143218 · 102345 + 0 (can use same approval)