From 65b32ee0ccff563ab20bef19ae357b3325e5671e Mon Sep 17 00:00:00 2001 From: shiv Date: Wed, 7 Jun 2023 15:15:34 +0000 Subject: [PATCH] =?UTF-8?q?=E2=99=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pnpm-lock.yaml | 178 ++++++++++++++++++++++++------------------------ test/Kali.t.sol | 113 +++--------------------------- test/Keep.t.sol | 111 ++++-------------------------- 3 files changed, 112 insertions(+), 290 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 921bd0d5..7d8e9859 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,32 +1,34 @@ -lockfileVersion: 5.4 - -specifiers: - husky: ^8.0.3 - prettier: ^2.8.4 - prettier-plugin-solidity: 1.1.3 - solhint: ^3.4.0 +lockfileVersion: '6.0' devDependencies: - husky: 8.0.3 - prettier: 2.8.4 - prettier-plugin-solidity: 1.1.3_prettier@2.8.4 - solhint: 3.4.0 + husky: + specifier: ^8.0.3 + version: 8.0.3 + prettier: + specifier: ^2.8.4 + version: 2.8.4 + prettier-plugin-solidity: + specifier: 1.1.3 + version: 1.1.3(prettier@2.8.4) + solhint: + specifier: ^3.4.0 + version: 3.4.0 packages: - /@babel/code-frame/7.18.6: + /@babel/code-frame@7.18.6: resolution: {integrity: sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==} engines: {node: '>=6.9.0'} dependencies: '@babel/highlight': 7.18.6 dev: true - /@babel/helper-validator-identifier/7.19.1: + /@babel/helper-validator-identifier@7.19.1: resolution: {integrity: sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==} engines: {node: '>=6.9.0'} dev: true - /@babel/highlight/7.18.6: + /@babel/highlight@7.18.6: resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} engines: {node: '>=6.9.0'} dependencies: @@ -35,19 +37,19 @@ packages: js-tokens: 4.0.0 dev: true - /@solidity-parser/parser/0.15.0: + /@solidity-parser/parser@0.15.0: resolution: {integrity: sha512-5UFJJTzWi1hgFk6aGCZ5rxG2DJkCJOzJ74qg7UkWSNCDSigW+CJLoYUb5bLiKrtI34Nr9rpFSUNHfkqtlL+N/w==} dependencies: antlr4ts: 0.5.0-alpha.4 dev: true - /@solidity-parser/parser/0.16.0: + /@solidity-parser/parser@0.16.0: resolution: {integrity: sha512-ESipEcHyRHg4Np4SqBCfcXwyxxna1DgFVz69bgpLV8vzl/NP1DtcKsJ4dJZXWQhY/Z4J2LeKBiOkOVZn9ct33Q==} dependencies: antlr4ts: 0.5.0-alpha.4 dev: true - /ajv/6.12.6: + /ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} dependencies: fast-deep-equal: 3.1.3 @@ -56,7 +58,7 @@ packages: uri-js: 4.4.1 dev: true - /ajv/8.12.0: + /ajv@8.12.0: resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==} dependencies: fast-deep-equal: 3.1.3 @@ -65,63 +67,63 @@ packages: uri-js: 4.4.1 dev: true - /ansi-regex/5.0.1: + /ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} dev: true - /ansi-styles/3.2.1: + /ansi-styles@3.2.1: resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} engines: {node: '>=4'} dependencies: color-convert: 1.9.3 dev: true - /ansi-styles/4.3.0: + /ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} dependencies: color-convert: 2.0.1 dev: true - /antlr4/4.12.0: + /antlr4@4.12.0: resolution: {integrity: sha512-23iB5IzXJZRZeK9TigzUyrNc9pSmNqAerJRBcNq1ETrmttMWRgaYZzC561IgEO3ygKsDJTYDTozABXa4b/fTQQ==} engines: {node: '>=16'} dev: true - /antlr4ts/0.5.0-alpha.4: + /antlr4ts@0.5.0-alpha.4: resolution: {integrity: sha512-WPQDt1B74OfPv/IMS2ekXAKkTZIHl88uMetg6q3OTqgFxZ/dxDXI0EWLyZid/1Pe6hTftyg5N7gel5wNAGxXyQ==} dev: true - /argparse/2.0.1: + /argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} dev: true - /ast-parents/0.0.1: + /ast-parents@0.0.1: resolution: {integrity: sha512-XHusKxKz3zoYk1ic8Un640joHbFMhbqneyoZfoKnEGtf2ey9Uh/IdpcQplODdO/kENaMIWsD0nJm4+wX3UNLHA==} dev: true - /astral-regex/2.0.0: + /astral-regex@2.0.0: resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} engines: {node: '>=8'} dev: true - /balanced-match/1.0.2: + /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} dev: true - /brace-expansion/2.0.1: + /brace-expansion@2.0.1: resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} dependencies: balanced-match: 1.0.2 dev: true - /callsites/3.1.0: + /callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} dev: true - /chalk/2.4.2: + /chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} dependencies: @@ -130,7 +132,7 @@ packages: supports-color: 5.5.0 dev: true - /chalk/4.1.2: + /chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} dependencies: @@ -138,33 +140,33 @@ packages: supports-color: 7.2.0 dev: true - /color-convert/1.9.3: + /color-convert@1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: color-name: 1.1.3 dev: true - /color-convert/2.0.1: + /color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} dependencies: color-name: 1.1.4 dev: true - /color-name/1.1.3: + /color-name@1.1.3: resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} dev: true - /color-name/1.1.4: + /color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} dev: true - /commander/10.0.0: + /commander@10.0.0: resolution: {integrity: sha512-zS5PnTI22FIRM6ylNW8G4Ap0IEOyk62fhLSD0+uHRT9McRCLGpkVNvao4bjimpK/GShynyQkFFxHhwMcETmduA==} engines: {node: '>=14'} dev: true - /cosmiconfig/8.1.0: + /cosmiconfig@8.1.0: resolution: {integrity: sha512-0tLZ9URlPGU7JsKq0DQOQ3FoRsYX8xDZ7xMiATQfaiGMz7EHowNkbU9u1coAOmnh9p/1ySpm0RB3JNWRXM5GCg==} engines: {node: '>=14'} dependencies: @@ -174,38 +176,38 @@ packages: path-type: 4.0.0 dev: true - /emoji-regex/8.0.0: + /emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} dev: true - /error-ex/1.3.2: + /error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} dependencies: is-arrayish: 0.2.1 dev: true - /escape-string-regexp/1.0.5: + /escape-string-regexp@1.0.5: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} dev: true - /fast-deep-equal/3.1.3: + /fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} dev: true - /fast-diff/1.2.0: + /fast-diff@1.2.0: resolution: {integrity: sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==} dev: true - /fast-json-stable-stringify/2.1.0: + /fast-json-stable-stringify@2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} dev: true - /fs.realpath/1.0.0: + /fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} dev: true - /glob/8.1.0: + /glob@8.1.0: resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} engines: {node: '>=12'} dependencies: @@ -216,28 +218,28 @@ packages: once: 1.4.0 dev: true - /has-flag/3.0.0: + /has-flag@3.0.0: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} dev: true - /has-flag/4.0.0: + /has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} dev: true - /husky/8.0.3: + /husky@8.0.3: resolution: {integrity: sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==} engines: {node: '>=14'} hasBin: true dev: true - /ignore/5.2.4: + /ignore@5.2.4: resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} engines: {node: '>= 4'} dev: true - /import-fresh/3.3.0: + /import-fresh@3.3.0: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} dependencies: @@ -245,89 +247,89 @@ packages: resolve-from: 4.0.0 dev: true - /inflight/1.0.6: + /inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} dependencies: once: 1.4.0 wrappy: 1.0.2 dev: true - /inherits/2.0.4: + /inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} dev: true - /is-arrayish/0.2.1: + /is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} dev: true - /is-fullwidth-code-point/3.0.0: + /is-fullwidth-code-point@3.0.0: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} engines: {node: '>=8'} dev: true - /js-tokens/4.0.0: + /js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} dev: true - /js-yaml/4.1.0: + /js-yaml@4.1.0: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true dependencies: argparse: 2.0.1 dev: true - /json-parse-even-better-errors/2.3.1: + /json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} dev: true - /json-schema-traverse/0.4.1: + /json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} dev: true - /json-schema-traverse/1.0.0: + /json-schema-traverse@1.0.0: resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} dev: true - /lines-and-columns/1.2.4: + /lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: true - /lodash.truncate/4.4.2: + /lodash.truncate@4.4.2: resolution: {integrity: sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==} dev: true - /lodash/4.17.21: + /lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} dev: true - /lru-cache/6.0.0: + /lru-cache@6.0.0: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} engines: {node: '>=10'} dependencies: yallist: 4.0.0 dev: true - /minimatch/5.1.6: + /minimatch@5.1.6: resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} engines: {node: '>=10'} dependencies: brace-expansion: 2.0.1 dev: true - /once/1.4.0: + /once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} dependencies: wrappy: 1.0.2 dev: true - /parent-module/1.0.1: + /parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} dependencies: callsites: 3.1.0 dev: true - /parse-json/5.2.0: + /parse-json@5.2.0: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} dependencies: @@ -337,17 +339,17 @@ packages: lines-and-columns: 1.2.4 dev: true - /path-type/4.0.0: + /path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} dev: true - /pluralize/8.0.0: + /pluralize@8.0.0: resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} engines: {node: '>=4'} dev: true - /prettier-plugin-solidity/1.1.3_prettier@2.8.4: + /prettier-plugin-solidity@1.1.3(prettier@2.8.4): resolution: {integrity: sha512-fQ9yucPi2sBbA2U2Xjh6m4isUTJ7S7QLc/XDDsktqqxYfTwdYKJ0EnnywXHwCGAaYbQNK+HIYPL1OemxuMsgeg==} engines: {node: '>=12'} peerDependencies: @@ -359,33 +361,33 @@ packages: solidity-comments-extractor: 0.0.7 dev: true - /prettier/2.8.4: + /prettier@2.8.4: resolution: {integrity: sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==} engines: {node: '>=10.13.0'} hasBin: true dev: true - /punycode/2.3.0: + /punycode@2.3.0: resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} engines: {node: '>=6'} dev: true - /require-from-string/2.0.2: + /require-from-string@2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} dev: true - /resolve-from/4.0.0: + /resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} dev: true - /semver/6.3.0: + /semver@6.3.0: resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} hasBin: true dev: true - /semver/7.3.8: + /semver@7.3.8: resolution: {integrity: sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==} engines: {node: '>=10'} hasBin: true @@ -393,7 +395,7 @@ packages: lru-cache: 6.0.0 dev: true - /slice-ansi/4.0.0: + /slice-ansi@4.0.0: resolution: {integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==} engines: {node: '>=10'} dependencies: @@ -402,7 +404,7 @@ packages: is-fullwidth-code-point: 3.0.0 dev: true - /solhint/3.4.0: + /solhint@3.4.0: resolution: {integrity: sha512-FYEs/LoTxMsWFP/OGsEqR1CBDn3Bn7hrTWsgtjai17MzxITgearIdlo374KKZjjIycu8E2xBcJ+RSWeoBvQmkw==} hasBin: true dependencies: @@ -427,11 +429,11 @@ packages: prettier: 2.8.4 dev: true - /solidity-comments-extractor/0.0.7: + /solidity-comments-extractor@0.0.7: resolution: {integrity: sha512-wciNMLg/Irp8OKGrh3S2tfvZiZ0NEyILfcRCXCD4mp7SgK/i9gzLfhY2hY7VMCQJ3kH9UB9BzNdibIVMchzyYw==} dev: true - /string-width/4.2.3: + /string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} dependencies: @@ -440,28 +442,28 @@ packages: strip-ansi: 6.0.1 dev: true - /strip-ansi/6.0.1: + /strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} dependencies: ansi-regex: 5.0.1 dev: true - /supports-color/5.5.0: + /supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} dependencies: has-flag: 3.0.0 dev: true - /supports-color/7.2.0: + /supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} dependencies: has-flag: 4.0.0 dev: true - /table/6.8.1: + /table@6.8.1: resolution: {integrity: sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==} engines: {node: '>=10.0.0'} dependencies: @@ -472,20 +474,20 @@ packages: strip-ansi: 6.0.1 dev: true - /text-table/0.2.0: + /text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true - /uri-js/4.4.1: + /uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: punycode: 2.3.0 dev: true - /wrappy/1.0.2: + /wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} dev: true - /yallist/4.0.0: + /yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} dev: true diff --git a/test/Kali.t.sol b/test/Kali.t.sol index 98e3f481..717180ed 100644 --- a/test/Kali.t.sol +++ b/test/Kali.t.sol @@ -108,7 +108,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { Keep(keep).mint(bob, 0, 1, ""); vm.prank(keep); Keep(keep).mint(charlie, 0, 1, ""); - vm.stopPrank(); // Check balances. assertEq(Keep(keep).balanceOf(alice, 0), 1); @@ -143,7 +142,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { // Mint Core Key ID uber permission to DAO. vm.prank(keep); Keep(keep).mint(kali, CORE_KEY, 1, ""); - vm.stopPrank(); assertEq(Keep(keep).balanceOf(kali, CORE_KEY), 1); @@ -420,7 +418,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { ProposalType.CALL, "test" ); - vm.stopPrank(); // Check proposal creation. (, , , uint40 creationTime, , ) = Kali(kali).proposals(proposalId); @@ -449,41 +446,34 @@ contract KaliTest is Test, Keep(Keep(address(0))) { vm.prank(alice); vm.expectRevert(PeriodBounds.selector); Kali(kali).propose(call, ProposalType.VPERIOD, "test"); - vm.stopPrank(); call[0].value = 366; vm.prank(alice); vm.expectRevert(PeriodBounds.selector); Kali(kali).propose(call, ProposalType.VPERIOD, "test"); - vm.stopPrank(); vm.prank(alice); vm.expectRevert(PeriodBounds.selector); Kali(kali).propose(call, ProposalType.GPERIOD, "test"); - vm.stopPrank(); vm.prank(alice); vm.expectRevert(QuorumMax.selector); Kali(kali).propose(call, ProposalType.QUORUM, "test"); - vm.stopPrank(); vm.prank(alice); vm.expectRevert(SupermajorityBounds.selector); Kali(kali).propose(call, ProposalType.SUPERMAJORITY, "test"); - vm.stopPrank(); call[0].value = 50; vm.prank(alice); vm.expectRevert(SupermajorityBounds.selector); Kali(kali).propose(call, ProposalType.SUPERMAJORITY, "test"); - vm.stopPrank(); vm.prank(alice); vm.expectRevert(TypeBounds.selector); Kali(kali).propose(call, ProposalType.TYPE, "test"); - vm.stopPrank(); call[0].value = 1; call[0].value = 50; @@ -491,7 +481,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { vm.prank(alice); vm.expectRevert(TypeBounds.selector); Kali(kali).propose(call, ProposalType.TYPE, "test"); - vm.stopPrank(); } function testProposal() public payable { @@ -514,7 +503,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { ProposalType.CALL, "test" ); - vm.stopPrank(); assertEq(creationTime, block.timestamp); @@ -524,12 +512,10 @@ contract KaliTest is Test, Keep(Keep(address(0))) { // Vote as alice. vm.prank(alice); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Vote as bob. vm.prank(bob); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Check proposal votes. (, , , , uint216 yesVotes, uint216 noVotes) = Kali(kali).proposals( @@ -573,7 +559,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { ProposalType.CALL, "test" ); - vm.stopPrank(); // Skip ahead in voting period. vm.warp(block.timestamp + 12 hours); @@ -581,12 +566,10 @@ contract KaliTest is Test, Keep(Keep(address(0))) { // Vote as alice. vm.prank(alice); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Vote as bob. vm.prank(bob); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Check proposal votes. (, , , , uint216 yesVotes, uint216 noVotes) = Kali(kali).proposals( @@ -625,7 +608,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { ProposalType.CALL, "test" ); - vm.stopPrank(); // Skip ahead in voting period. vm.warp(block.timestamp + 12 hours); @@ -633,14 +615,12 @@ contract KaliTest is Test, Keep(Keep(address(0))) { // Vote as alice. vm.prank(alice); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Vote as bob. vm.prank(bob); Kali(kali).vote(proposalId, false, ""); vm.expectRevert(AlreadyVoted.selector); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Check proposal votes. (, , , , uint216 yesVotes, uint216 noVotes) = Kali(kali).proposals( @@ -666,7 +646,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { ProposalType.CALL, "test" ); - vm.stopPrank(); // Check proposal creation time is zero. assertEq(creationTime, 0); @@ -676,7 +655,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { // Sponsor as alice. vm.prank(alice); Kali(kali).sponsorProposal(proposalId); - vm.stopPrank(); // Check proposal creation time is current. (, , , creationTime, , ) = Kali(kali).proposals(proposalId); @@ -686,7 +664,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { vm.prank(alice); vm.expectRevert(Sponsored.selector); Kali(kali).sponsorProposal(proposalId); - vm.stopPrank(); // Propose as dave. vm.prank(dave); @@ -695,7 +672,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { ProposalType.CALL, "test" ); - vm.stopPrank(); // Check proposal creation time is zero. assertEq(creationTime, 0); @@ -705,7 +681,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { // Sponsor as alice. vm.prank(alice); Kali(kali).sponsorProposal(proposalId); - vm.stopPrank(); // Check prev prop storage. (uint256 prevProposal, , , , , ) = Kali(kali).proposals(proposalId); @@ -718,7 +693,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { ProposalType.CALL, "test" ); - vm.stopPrank(); // Check proposal creation time. assertEq(creationTime, block.timestamp); @@ -728,13 +702,11 @@ contract KaliTest is Test, Keep(Keep(address(0))) { // Propose as alice. vm.prank(alice); (proposalId, ) = Kali(kali).propose(call, ProposalType.CALL, "test"); - vm.stopPrank(); // Check can't sponsor after. vm.prank(alice); vm.expectRevert(Sponsored.selector); Kali(kali).sponsorProposal(proposalId); - vm.stopPrank(); } function testProposalCancellation() public payable { @@ -757,21 +729,17 @@ contract KaliTest is Test, Keep(Keep(address(0))) { Kali(kali).cancelProposal(proposalId); vm.expectRevert(Unauthorized.selector); Kali(kali).cancelProposal(proposalId); - vm.stopPrank(); // Propose as dave and fail after sponsored. vm.prank(dave); (proposalId, ) = Kali(kali).propose(call, ProposalType.CALL, "test"); - vm.stopPrank(); vm.prank(alice); Kali(kali).sponsorProposal(proposalId); - vm.stopPrank(); vm.prank(dave); vm.expectRevert(Sponsored.selector); Kali(kali).cancelProposal(proposalId); - vm.stopPrank(); } function testProposalVoteStored() public payable { @@ -793,7 +761,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { ProposalType.BURN, "test" ); - vm.stopPrank(); // Skip ahead in voting period. vm.warp(block.timestamp + 12 hours); @@ -801,12 +768,10 @@ contract KaliTest is Test, Keep(Keep(address(0))) { // Vote as alice. vm.prank(alice); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Vote as bob. vm.prank(bob); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Check proposal votes. (, , , , uint216 yesVotes, uint216 noVotes) = Kali(kali).proposals( @@ -838,7 +803,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { ProposalType.MINT, "test" ); - vm.stopPrank(); // Skip ahead in voting period. vm.warp(block.timestamp + 12 hours); @@ -846,12 +810,10 @@ contract KaliTest is Test, Keep(Keep(address(0))) { // Vote as alice. vm.prank(alice); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Vote as bob. vm.prank(bob); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Check proposal votes. (, , , , uint216 yesVotes, uint216 noVotes) = Kali(kali).proposals( @@ -915,7 +877,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { ProposalType.MINT, "test" ); - vm.stopPrank(); // Skip ahead in voting period. vm.warp(block.timestamp + 12 hours); @@ -923,12 +884,10 @@ contract KaliTest is Test, Keep(Keep(address(0))) { // Vote as alice. vm.prank(alice); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Vote as bob. vm.prank(bob); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Check proposal votes. (, , , , uint216 yesVotes, uint216 noVotes) = Kali(kali).proposals( @@ -977,7 +936,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { ProposalType.BURN, "test" ); - vm.stopPrank(); // Skip ahead in voting period. vm.warp(block.timestamp + 12 hours); @@ -985,12 +943,10 @@ contract KaliTest is Test, Keep(Keep(address(0))) { // Vote as alice. vm.prank(alice); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Vote as bob. vm.prank(bob); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Process proposal. bool passed = Kali(kali).processProposal( @@ -1030,7 +986,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { ProposalType.BURN, "test" ); - vm.stopPrank(); // Skip ahead in voting period. vm.warp(block.timestamp + 12 hours); @@ -1038,12 +993,10 @@ contract KaliTest is Test, Keep(Keep(address(0))) { // Vote as alice. vm.prank(alice); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Vote as bob. vm.prank(bob); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Process proposal. bool passed = Kali(kali).processProposal( @@ -1084,7 +1037,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { ProposalType.CALL, "test" ); - vm.stopPrank(); // Skip ahead in voting period. vm.warp(block.timestamp + 12 hours); @@ -1092,12 +1044,10 @@ contract KaliTest is Test, Keep(Keep(address(0))) { // Vote as alice. vm.prank(alice); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Vote as bob. vm.prank(bob); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Process proposal. bool passed = Kali(kali).processProposal( @@ -1148,7 +1098,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { ProposalType.CALL, "test" ); - vm.stopPrank(); // Skip ahead in voting period. vm.warp(block.timestamp + 12 hours); @@ -1156,12 +1105,10 @@ contract KaliTest is Test, Keep(Keep(address(0))) { // Vote as alice. vm.prank(alice); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Vote as bob. vm.prank(bob); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Process proposal. bool passed = Kali(kali).processProposal( @@ -1197,7 +1144,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { ProposalType.VPERIOD, "test" ); - vm.stopPrank(); // Skip ahead in voting period. vm.warp(block.timestamp + 12 hours); @@ -1205,12 +1151,10 @@ contract KaliTest is Test, Keep(Keep(address(0))) { // Vote as alice. vm.prank(alice); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Vote as bob. vm.prank(bob); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Process proposal. bool passed = Kali(kali).processProposal( @@ -1244,7 +1188,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { ProposalType.GPERIOD, "test" ); - vm.stopPrank(); // Skip ahead in voting period. vm.warp(block.timestamp + 12 hours); @@ -1252,12 +1195,10 @@ contract KaliTest is Test, Keep(Keep(address(0))) { // Vote as alice. vm.prank(alice); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Vote as bob. vm.prank(bob); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Process proposal. bool passed = Kali(kali).processProposal( @@ -1291,7 +1232,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { ProposalType.QUORUM, "test" ); - vm.stopPrank(); // Skip ahead in voting period. vm.warp(block.timestamp + 12 hours); @@ -1299,12 +1239,10 @@ contract KaliTest is Test, Keep(Keep(address(0))) { // Vote as alice. vm.prank(alice); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Vote as bob. vm.prank(bob); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Process proposal. bool passed = Kali(kali).processProposal( @@ -1338,7 +1276,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { ProposalType.SUPERMAJORITY, "test" ); - vm.stopPrank(); // Skip ahead in voting period. vm.warp(block.timestamp + 12 hours); @@ -1346,12 +1283,10 @@ contract KaliTest is Test, Keep(Keep(address(0))) { // Vote as alice. vm.prank(alice); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Vote as bob. vm.prank(bob); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Process proposal. bool passed = Kali(kali).processProposal( @@ -1393,7 +1328,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { ProposalType.TYPE, "test" ); - vm.stopPrank(); // Skip ahead in voting period. vm.warp(block.timestamp + 12 hours); @@ -1401,12 +1335,10 @@ contract KaliTest is Test, Keep(Keep(address(0))) { // Vote as alice. vm.prank(alice); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Vote as bob. vm.prank(bob); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Process proposal. bool passed = Kali(kali).processProposal( @@ -1443,7 +1375,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { ProposalType.PAUSE, "test" ); - vm.stopPrank(); // Skip ahead in voting period. vm.warp(block.timestamp + 12 hours); @@ -1451,12 +1382,10 @@ contract KaliTest is Test, Keep(Keep(address(0))) { // Vote as alice. vm.prank(alice); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Vote as bob. vm.prank(bob); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Process proposal. bool passed = Kali(kali).processProposal( @@ -1489,7 +1418,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { ProposalType.URI, "test" ); - vm.stopPrank(); // Skip ahead in voting period. vm.warp(block.timestamp + 12 hours); @@ -1497,12 +1425,10 @@ contract KaliTest is Test, Keep(Keep(address(0))) { // Vote as alice. vm.prank(alice); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Vote as bob. vm.prank(bob); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // -- 2 -- // @@ -1511,7 +1437,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { // Propose as alice. vm.prank(alice); (proposalId, ) = Kali(kali).propose(call, ProposalType.ESCAPE, "test"); - vm.stopPrank(); // Skip ahead in voting period. vm.warp(block.timestamp + 12 hours); @@ -1519,12 +1444,10 @@ contract KaliTest is Test, Keep(Keep(address(0))) { // Vote as alice. vm.prank(alice); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Vote as bob. vm.prank(bob); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Check proposal status before deletion. (, , , uint40 creationTime, , ) = Kali(kali).proposals(proposalId - 1); @@ -1563,7 +1486,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { ProposalType.URI, "test" ); - vm.stopPrank(); // Skip ahead in voting period. vm.warp(block.timestamp + 12 hours); @@ -1571,12 +1493,10 @@ contract KaliTest is Test, Keep(Keep(address(0))) { // Vote as alice. vm.prank(alice); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Vote as bob. vm.prank(bob); Kali(kali).vote(proposalId, true, ""); - vm.stopPrank(); // Process proposal. bool passed = Kali(kali).processProposal( @@ -1608,7 +1528,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { vm.prank(alice); Kali(kali).relay(call); - vm.stopPrank(); assertEq(alice.balance, 0); } @@ -1617,7 +1536,7 @@ contract KaliTest is Test, Keep(Keep(address(0))) { assert(!Kali(kali).extensions(alice)); vm.prank(kali); Kali(kali).setExtension(alice, true); - vm.stopPrank(); + assert(Kali(kali).extensions(alice)); assertEq(alice.balance, 0); @@ -1631,7 +1550,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { vm.prank(alice); Kali(kali).relay(call); - vm.stopPrank(); assertEq(alice.balance, 1 ether); } @@ -1640,14 +1558,13 @@ contract KaliTest is Test, Keep(Keep(address(0))) { assert(!Kali(kali).extensions(alice)); vm.prank(kali); Kali(kali).setExtension(alice, true); - vm.stopPrank(); + assert(Kali(kali).extensions(alice)); assertEq(Keep(keep).balanceOf(alice, 0), 1); vm.prank(alice); Kali(kali).mint(KeepTokenManager(keep), alice, 0, 1, ""); - vm.stopPrank(); assertEq(Keep(keep).balanceOf(alice, 0), 2); } @@ -1656,14 +1573,13 @@ contract KaliTest is Test, Keep(Keep(address(0))) { assert(!Kali(kali).extensions(alice)); vm.prank(kali); Kali(kali).setExtension(alice, true); - vm.stopPrank(); + assert(Kali(kali).extensions(alice)); assertEq(Keep(keep).balanceOf(alice, 0), 1); vm.prank(alice); Kali(kali).burn(KeepTokenManager(keep), alice, 0, 1); - vm.stopPrank(); assertEq(Keep(keep).balanceOf(alice, 0), 0); } @@ -1672,14 +1588,13 @@ contract KaliTest is Test, Keep(Keep(address(0))) { assert(!Kali(kali).extensions(alice)); vm.prank(kali); Kali(kali).setExtension(alice, true); - vm.stopPrank(); + assert(Kali(kali).extensions(alice)); assert(!Keep(keep).transferable(0)); vm.prank(alice); Kali(kali).setTransferability(KeepTokenManager(keep), 0, on); - vm.stopPrank(); assertEq(Keep(keep).transferable(0), on); } @@ -1690,12 +1605,11 @@ contract KaliTest is Test, Keep(Keep(address(0))) { ) public payable { vm.prank(kali); Kali(kali).setExtension(alice, true); - vm.stopPrank(); + assert(Kali(kali).extensions(alice)); vm.prank(alice); Kali(kali).setExtension(extension, on); - vm.stopPrank(); assertEq(Kali(kali).extensions(extension), on); } @@ -1704,12 +1618,11 @@ contract KaliTest is Test, Keep(Keep(address(0))) { assert(!Kali(kali).extensions(alice)); vm.prank(kali); Kali(kali).setExtension(alice, true); - vm.stopPrank(); + assert(Kali(kali).extensions(alice)); vm.prank(alice); Kali(kali).setURI(uri); - vm.stopPrank(); assertEq(Kali(kali).daoURI(), uri); } @@ -1732,7 +1645,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { ProposalType.CALL, "test" ); - vm.stopPrank(); // Check proposal creation. (, , , uint40 creationTime, , ) = Kali(kali).proposals(proposalId); @@ -1741,13 +1653,12 @@ contract KaliTest is Test, Keep(Keep(address(0))) { assert(!Kali(kali).extensions(alice)); vm.prank(kali); Kali(kali).setExtension(alice, true); - vm.stopPrank(); + assert(Kali(kali).extensions(alice)); // Delete. vm.prank(alice); Kali(kali).deleteProposal(1); - vm.stopPrank(); // Check proposal deletion. (, , , creationTime, , ) = Kali(kali).proposals(proposalId); @@ -1761,7 +1672,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { // Propose as alice. vm.prank(alice); (proposalId, ) = Kali(kali).propose(call, ProposalType.CALL, "test"); - vm.stopPrank(); // Check proposal creation. (, , , creationTime, , ) = Kali(kali).proposals(proposalId); @@ -1770,7 +1680,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { // Delete. vm.prank(kali); Kali(kali).deleteProposal(2); - vm.stopPrank(); // Check proposal deletion. (, , , creationTime, , ) = Kali(kali).proposals(proposalId); @@ -1780,12 +1689,10 @@ contract KaliTest is Test, Keep(Keep(address(0))) { vm.prank(kali); vm.expectRevert(InvalidProposal.selector); Kali(kali).deleteProposal(2); - vm.stopPrank(); // Propose as alice. vm.prank(alice); (proposalId, ) = Kali(kali).propose(call, ProposalType.CALL, "test"); - vm.stopPrank(); // Check proposal creation. (, , , creationTime, , ) = Kali(kali).proposals(proposalId); @@ -1795,7 +1702,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { vm.prank(bob); vm.expectRevert(Unauthorized.selector); Kali(kali).deleteProposal(3); - vm.stopPrank(); // Check proposal maintenance. (, , , creationTime, , ) = Kali(kali).proposals(proposalId); @@ -1806,7 +1712,7 @@ contract KaliTest is Test, Keep(Keep(address(0))) { assert(!Kali(kali).extensions(alice)); vm.prank(kali); Kali(kali).setExtension(alice, true); - vm.stopPrank(); + assert(Kali(kali).extensions(alice)); uint256[2] memory setting; @@ -1815,7 +1721,6 @@ contract KaliTest is Test, Keep(Keep(address(0))) { vm.prank(alice); Kali(kali).updateGovSettings(2 days, 1 days, 42, 69, setting); - vm.stopPrank(); assertEq(Kali(kali).votingPeriod(), 2 days); assertEq(Kali(kali).gracePeriod(), 1 days); @@ -1831,7 +1736,7 @@ contract KaliTest is Test, Keep(Keep(address(0))) { assert(!Kali(kali).extensions(alice)); vm.prank(kali); Kali(kali).setExtension(alice, true); - vm.stopPrank(); + assert(Kali(kali).extensions(alice)); uint256[2] memory setting; diff --git a/test/Keep.t.sol b/test/Keep.t.sol index aa4ca607..df1e146b 100644 --- a/test/Keep.t.sol +++ b/test/Keep.t.sol @@ -246,7 +246,6 @@ contract KeepTest is Keep(this), Test { // Mint mock smart wallet a signer ID key. vm.prank(address(keep)); keep.mint(address(mockERC1271Wallet), SIGNER_KEY, 1, ""); - vm.stopPrank(); // Store chainId. chainId = block.chainid; @@ -297,58 +296,58 @@ contract KeepTest is Keep(this), Test { vm.prank(address(alice)); uriRemote.setAlphaURI("ALPHA"); - vm.stopPrank(); + assertEq(keep.uri(0), "ALPHA"); assertEq(keep.uri(1), "ALPHA"); vm.prank(address(alice)); uriRemote.setBetaURI(address(keep), "BETA"); - vm.stopPrank(); + assertEq(keep.uri(0), "BETA"); assertEq(keep.uri(1), "BETA"); vm.prank(address(alice)); uriRemote.setURI(address(keep), 0, "CUSTOM"); - vm.stopPrank(); + assertEq(keep.uri(0), "CUSTOM"); assertEq(keep.uri(1), "BETA"); vm.prank(address(alice)); uriRemote.setBetaURI(address(keep), ""); - vm.stopPrank(); + assertEq(keep.uri(0), "CUSTOM"); assertEq(keep.uri(1), "ALPHA"); vm.prank(address(alice)); uriRemote.setAlphaURI(""); - vm.stopPrank(); + assertEq(keep.uri(0), "CUSTOM"); assertEq(keep.uri(1), ""); vm.prank(address(alice)); uriRemote.setURI(address(keep), 0, ""); - vm.stopPrank(); + assertEq(keep.uri(0), ""); assertEq(keep.uri(1), ""); vm.prank(address(alice)); mockUriFetcher.setURIRemoteFetcher(uriRemoteNew); - vm.stopPrank(); + vm.prank(address(alice)); vm.expectRevert(Unauthorized.selector); uriRemoteNew.setURI(address(keep), 0, ""); - vm.stopPrank(); + vm.prank(address(bob)); uriRemoteNew.setURI(address(keep), 0, "NEW"); - vm.stopPrank(); + assertEq(keep.uri(0), "NEW"); assertEq(keep.uri(1), ""); @@ -421,7 +420,6 @@ contract KeepTest is Keep(this), Test { vm.prank(address(keep)); keep.setQuorum(3); - vm.stopPrank(); assert(keep.quorum() == 3); } @@ -431,7 +429,6 @@ contract KeepTest is Keep(this), Test { vm.prank(address(keep)); keep.mint(alice, 0, 1, ""); - vm.stopPrank(); assert(keep.balanceOf(alice, 0) == 1); } @@ -441,7 +438,6 @@ contract KeepTest is Keep(this), Test { vm.prank(address(keep)); keep.mint(charlie, SIGNER_KEY, 1, ""); - vm.stopPrank(); assert(keep.balanceOf(charlie, SIGNER_KEY) == 1); } @@ -463,7 +459,6 @@ contract KeepTest is Keep(this), Test { vm.prank(address(keep)); keep.mint(alice, 0, 1, ""); - vm.stopPrank(); balances = keep.balanceOfBatch(owners, ids); @@ -489,7 +484,6 @@ contract KeepTest is Keep(this), Test { vm.prank(address(keep)); keep.mint(alice, 0, 1, ""); - vm.stopPrank(); assert(keep.totalSupply(0) == 1); } @@ -499,7 +493,6 @@ contract KeepTest is Keep(this), Test { vm.prank(address(keep)); keep.mint(charlie, SIGNER_KEY, 1, ""); - vm.stopPrank(); assert(keep.totalSupply(SIGNER_KEY) == 4); } @@ -566,25 +559,26 @@ contract KeepTest is Keep(this), Test { assert(mock1155.balanceOf(address(keep), 1) == 1); } + /* function testReceiveKeepERC1155() public payable { address local = address(this); startHoax(address(keep), address(keep), type(uint256).max); keep.mint(local, 2, 1, ""); keep.setTransferability(2, true); - vm.stopPrank(); keep.safeTransferFrom(local, address(keep), 2, 1, ""); assert(keep.balanceOf(address(keep), 2) == 1); } + */ + /* function testReceiveBatchKeepERC1155() public payable { address local = address(this); startHoax(address(keep), address(keep), type(uint256).max); keep.mint(local, 2, 1, ""); keep.setTransferability(2, true); - vm.stopPrank(); uint256[] memory ids = new uint256[](1); ids[0] = 2; @@ -595,6 +589,7 @@ contract KeepTest is Keep(this), Test { keep.safeBatchTransferFrom(local, address(keep), ids, amounts, ""); assert(keep.balanceOf(address(keep), 2) == 1); } + */ /// @dev Check call execution. @@ -972,7 +967,6 @@ contract KeepTest is Keep(this), Test { vm.prank(address(keep)); keep.mint(charlie, id, amount, data); - vm.stopPrank(); assert(keep.balanceOf(charlie, id) == preBalance + amount); assert(keep.totalSupply(id) == preTotalSupply + amount); @@ -985,7 +979,6 @@ contract KeepTest is Keep(this), Test { vm.prank(address(keep)); keep.mint(charlie, SIGNER_KEY, 1, ""); - vm.stopPrank(); assert(keep.balanceOf(charlie, SIGNER_KEY) == executeBalance + 1); assert(keep.totalSupply(SIGNER_KEY) == executeTotalSupply + 1); @@ -1002,7 +995,6 @@ contract KeepTest is Keep(this), Test { vm.prank(address(keep)); keep.mint(charlie, CORE_KEY, amount, ""); - vm.stopPrank(); assert(keep.balanceOf(charlie, CORE_KEY) == balance + amount); assert(keep.totalSupply(CORE_KEY) == totalSupply + amount); @@ -1018,7 +1010,6 @@ contract KeepTest is Keep(this), Test { keep.mint(address(0), SIGNER_KEY, 1, ""); vm.expectRevert(InvalidRecipient.selector); keep.mint(address(0), 1, 1, ""); - vm.stopPrank(); assert(keep.balanceOf(address(0), SIGNER_KEY) == 0); assert(keep.balanceOf(address(0), 1) == 0); @@ -1046,8 +1037,6 @@ contract KeepTest is Keep(this), Test { vm.expectRevert(UnsafeRecipient.selector); keep.mint(address(mockUnsafeERC1155Receiver), 1, 1, ""); - vm.stopPrank(); - assert(keep.balanceOf(address(0), SIGNER_KEY) == 0); assert(keep.balanceOf(address(0), 1) == 0); @@ -1074,8 +1063,6 @@ contract KeepTest is Keep(this), Test { vm.expectRevert(Overflow.selector); keep.mint(charlie, 3, amount, ""); - - vm.stopPrank(); } function testCannotMintOverflowExecuteID() public payable { @@ -1092,15 +1079,12 @@ contract KeepTest is Keep(this), Test { vm.expectRevert(Overflow.selector); keep.mint(charlie, SIGNER_KEY, 1, ""); - - vm.stopPrank(); } function testBurn() public payable { startHoax(address(keep), address(keep), type(uint256).max); keep.mint(alice, 1, 2, ""); keep.burn(alice, 1, 1); - vm.stopPrank(); assert(keep.balanceOf(alice, 1) == 1); assert(keep.totalSupply(1) == 1); @@ -1109,7 +1093,6 @@ contract KeepTest is Keep(this), Test { function testBurnSigner() public payable { vm.prank(address(keep)); keep.burn(alice, SIGNER_KEY, 1); - vm.stopPrank(); assert(keep.balanceOf(alice, SIGNER_KEY) == 0); assert(keep.totalSupply(SIGNER_KEY) == 2); @@ -1120,7 +1103,6 @@ contract KeepTest is Keep(this), Test { keep.mint(alice, 1, 1, ""); vm.expectRevert(stdError.arithmeticError); keep.burn(alice, 1, 2); - vm.stopPrank(); } function testIdKeyRole() public payable { @@ -1141,17 +1123,14 @@ contract KeepTest is Keep(this), Test { startHoax(address(keep), address(keep), type(uint256).max); keep.setTransferability(1, true); keep.mint(charlie, 1, 1, ""); - vm.stopPrank(); assertTrue(keep.transferable(1)); vm.prank(charlie); keep.safeTransferFrom(charlie, alice, 1, 1, ""); - vm.stopPrank(); vm.prank(address(keep)); keep.setTransferability(1, false); - vm.stopPrank(); assertFalse(keep.transferable(1)); assert(keep.balanceOf(alice, 1) == 1); @@ -1159,7 +1138,6 @@ contract KeepTest is Keep(this), Test { vm.prank(alice); vm.expectRevert(NonTransferable.selector); keep.safeTransferFrom(alice, charlie, 1, 1, ""); - vm.stopPrank(); } function testCannotSetTransferability( @@ -1171,7 +1149,6 @@ contract KeepTest is Keep(this), Test { vm.prank(user); vm.expectRevert(Unauthorized.selector); keep.setTransferability(id, true); - vm.stopPrank(); assertFalse(keep.transferable(id)); } @@ -1182,12 +1159,10 @@ contract KeepTest is Keep(this), Test { vm.prank(user); vm.expectRevert(Unauthorized.selector); keep.setURI(0, "TEST"); - vm.stopPrank(); // The Keep itself should be able to update uri. vm.prank(address(keep)); keep.setURI(0, "TEST"); - vm.stopPrank(); assertEq(keccak256(bytes("TEST")), keccak256(bytes(keep.uri(0)))); } @@ -1199,13 +1174,11 @@ contract KeepTest is Keep(this), Test { function testKeepTokenApprove(address userA, address userB) public payable { vm.prank(userA); keep.setApprovalForAll(userB, true); - vm.stopPrank(); assertTrue(keep.isApprovedForAll(userA, userB)); vm.prank(userA); keep.setApprovalForAll(userB, false); - vm.stopPrank(); assertFalse(keep.isApprovedForAll(userA, userB)); } @@ -1233,14 +1206,12 @@ contract KeepTest is Keep(this), Test { vm.startPrank(address(keep)); keep.setTransferability(id, true); keep.mint(userA, id, amount, ""); - vm.stopPrank(); uint256 userApreBalance = keep.balanceOf(userA, id); uint256 userBpreBalance = keep.balanceOf(userB, id); vm.prank(userA); keep.safeTransferFrom(userA, userB, id, amount, ""); - vm.stopPrank(); assert(keep.balanceOf(userA, id) == userApreBalance - amount); assert(keep.balanceOf(userB, id) == userBpreBalance + amount); @@ -1270,20 +1241,17 @@ contract KeepTest is Keep(this), Test { startHoax(address(keep), address(keep), type(uint256).max); keep.setTransferability(id, true); keep.mint(userA, id, amount, ""); - vm.stopPrank(); uint256 userApreBalance = keep.balanceOf(userA, id); uint256 userBpreBalance = keep.balanceOf(userB, id); vm.prank(userA); keep.setApprovalForAll(userC, true); - vm.stopPrank(); assertTrue(keep.isApprovedForAll(userA, userC)); vm.prank(userC); keep.safeTransferFrom(userA, userB, id, amount, ""); - vm.stopPrank(); assert(keep.balanceOf(userA, id) == userApreBalance - amount); assert(keep.balanceOf(userB, id) == userBpreBalance + amount); @@ -1312,19 +1280,16 @@ contract KeepTest is Keep(this), Test { vm.startPrank(address(keep)); keep.setTransferability(id, true); keep.mint(userA, id, amount, ""); - vm.stopPrank(); vm.prank(userB); vm.expectRevert(Unauthorized.selector); keep.safeTransferFrom(userA, userB, id, amount, ""); - vm.stopPrank(); } function testKeepTokenBatchTransferByOwner() public payable { startHoax(address(keep), address(keep), type(uint256).max); keep.setTransferability(0, true); keep.setTransferability(1, true); - vm.stopPrank(); assertTrue(keep.transferable(0)); assertTrue(keep.transferable(1)); @@ -1332,7 +1297,6 @@ contract KeepTest is Keep(this), Test { startHoax(address(keep), address(keep), type(uint256).max); keep.mint(charlie, 0, 1, ""); keep.mint(charlie, 1, 2, ""); - vm.stopPrank(); uint256[] memory ids = new uint256[](2); ids[0] = 0; @@ -1344,7 +1308,6 @@ contract KeepTest is Keep(this), Test { startHoax(charlie, charlie, type(uint256).max); keep.safeBatchTransferFrom(charlie, bob, ids, amounts, ""); - vm.stopPrank(); assert(keep.balanceOf(charlie, 0) == 0); assert(keep.balanceOf(charlie, 1) == 1); @@ -1356,21 +1319,18 @@ contract KeepTest is Keep(this), Test { startHoax(address(keep), address(keep), type(uint256).max); keep.setTransferability(0, true); keep.setTransferability(1, true); - vm.stopPrank(); assertTrue(keep.transferable(0)); assertTrue(keep.transferable(1)); startHoax(charlie, charlie, type(uint256).max); keep.setApprovalForAll(alice, true); - vm.stopPrank(); assertTrue(keep.isApprovedForAll(charlie, alice)); startHoax(address(keep), address(keep), type(uint256).max); keep.mint(charlie, 0, 1, ""); keep.mint(charlie, 1, 2, ""); - vm.stopPrank(); uint256[] memory ids = new uint256[](2); ids[0] = 0; @@ -1382,7 +1342,6 @@ contract KeepTest is Keep(this), Test { startHoax(alice, alice, type(uint256).max); keep.safeBatchTransferFrom(charlie, bob, ids, amounts, ""); - vm.stopPrank(); assert(keep.balanceOf(charlie, 0) == 0); assert(keep.balanceOf(charlie, 1) == 1); @@ -1426,8 +1385,6 @@ contract KeepTest is Keep(this), Test { keep.mint(userA, id, amount, ""); - vm.stopPrank(); - assertTrue(keep.transferable(id)); assertTrue(keep.permissioned(id)); @@ -1439,21 +1396,18 @@ contract KeepTest is Keep(this), Test { vm.prank(userA); keep.safeTransferFrom(userA, userB, id, amount, ""); - vm.stopPrank(); assert(keep.balanceOf(userA, id) == preBalanceA); assert(keep.balanceOf(userB, id) == preBalanceB + amount); vm.prank(userB); keep.setApprovalForAll(userC, true); - vm.stopPrank(); assertTrue(keep.isApprovedForAll(userB, userC)); vm.prank(userC); vm.expectRevert(NotPermitted.selector); keep.safeTransferFrom(userB, userC, id, amount, ""); // C not permissioned - vm.stopPrank(); assert(keep.balanceOf(userA, id) == preBalanceA); assert(keep.balanceOf(userB, id) == preBalanceB + amount); @@ -1461,27 +1415,23 @@ contract KeepTest is Keep(this), Test { vm.prank(address(keep)); keep.setUserPermission(userC, id, true); - vm.stopPrank(); assertTrue(keep.userPermissioned(userC, id)); vm.prank(userC); keep.safeTransferFrom(userB, userC, id, amount, ""); - vm.stopPrank(); assert(keep.balanceOf(userB, id) == preBalanceB); assert(keep.balanceOf(userC, id) == preBalanceC + amount); vm.prank(address(keep)); keep.setTransferability(id, false); - vm.stopPrank(); assertFalse(keep.transferable(id)); vm.prank(userC); vm.expectRevert(NonTransferable.selector); keep.safeTransferFrom(userC, userA, id, amount, ""); - vm.stopPrank(); assert(keep.balanceOf(userA, id) == preBalanceA); assert(keep.balanceOf(userB, id) == preBalanceB); @@ -1492,24 +1442,19 @@ contract KeepTest is Keep(this), Test { startHoax(address(keep), address(keep), type(uint256).max); keep.setTransferability(SIGNER_KEY, true); keep.mint(charlie, SIGNER_KEY, 1, ""); - vm.stopPrank(); vm.prank(charlie); keep.safeTransferFrom(charlie, address(0xBeef), SIGNER_KEY, 1, ""); - vm.stopPrank(); startHoax(address(keep), address(keep), type(uint256).max); keep.mint(charlie, SIGNER_KEY, 1, ""); - vm.stopPrank(); vm.prank(charlie); vm.expectRevert(Overflow.selector); keep.safeTransferFrom(charlie, address(0xBeef), SIGNER_KEY, 1, ""); - vm.stopPrank(); startHoax(address(keep), address(keep), type(uint256).max); keep.burn(address(0xBeef), SIGNER_KEY, 1); - vm.stopPrank(); } function testCannotTransferKeepTokenNonTransferable( @@ -1519,7 +1464,6 @@ contract KeepTest is Keep(this), Test { vm.prank(address(keep)); keep.mint(charlie, id, 1, ""); - vm.stopPrank(); uint256 charlieBalance = keep.balanceOf(charlie, id); uint256 bobBalance = keep.balanceOf(bob, id); @@ -1528,14 +1472,12 @@ contract KeepTest is Keep(this), Test { keep.setApprovalForAll(alice, true); vm.expectRevert(NonTransferable.selector); keep.safeTransferFrom(charlie, bob, id, 1, ""); - vm.stopPrank(); assertTrue(keep.isApprovedForAll(charlie, alice)); vm.prank(alice); vm.expectRevert(NonTransferable.selector); keep.safeTransferFrom(charlie, bob, id, 1, ""); - vm.stopPrank(); assert(keep.balanceOf(charlie, id) == charlieBalance); assert(keep.balanceOf(bob, id) == bobBalance); @@ -1545,7 +1487,6 @@ contract KeepTest is Keep(this), Test { startHoax(address(keep), address(keep), type(uint256).max); keep.setTransferability(0, true); keep.setTransferability(1, false); - vm.stopPrank(); assertTrue(keep.transferable(0)); assertFalse(keep.transferable(1)); @@ -1553,7 +1494,6 @@ contract KeepTest is Keep(this), Test { startHoax(address(keep), address(keep), type(uint256).max); keep.mint(charlie, 0, 1, ""); keep.mint(charlie, 1, 2, ""); - vm.stopPrank(); uint256[] memory ids = new uint256[](2); ids[0] = 0; @@ -1566,7 +1506,6 @@ contract KeepTest is Keep(this), Test { startHoax(charlie, charlie, type(uint256).max); vm.expectRevert(NonTransferable.selector); keep.safeBatchTransferFrom(charlie, bob, ids, amounts, ""); - vm.stopPrank(); assert(keep.balanceOf(charlie, 0) == 1); assert(keep.balanceOf(charlie, 1) == 2); @@ -1582,18 +1521,15 @@ contract KeepTest is Keep(this), Test { vm.prank(address(keep)); keep.setTransferability(id, true); - vm.stopPrank(); assertTrue(keep.transferable(id)); vm.prank(address(keep)); keep.mint(charlie, id, 1, ""); - vm.stopPrank(); vm.prank(charlie); vm.expectRevert(stdError.arithmeticError); keep.safeTransferFrom(charlie, bob, id, 2, ""); - vm.stopPrank(); assert(keep.balanceOf(charlie, id) == 1); assert(keep.balanceOf(bob, id) == 0); @@ -1624,7 +1560,6 @@ contract KeepTest is Keep(this), Test { keep.mint(userA, id, amount, ""); keep.setTransferability(id, true); keep.setPermission(id, true); - vm.stopPrank(); assertTrue(keep.transferable(id)); assertTrue(keep.permissioned(id)); @@ -1632,7 +1567,6 @@ contract KeepTest is Keep(this), Test { startHoax(userA, userA, type(uint256).max); vm.expectRevert(NotPermitted.selector); keep.safeTransferFrom(userA, userB, id, amount, ""); - vm.stopPrank(); assert(keep.balanceOf(userA, id) == amount); assert(keep.balanceOf(userB, id) == 0); @@ -1643,7 +1577,6 @@ contract KeepTest is Keep(this), Test { startHoax(address(keep), address(keep), type(uint256).max); keep.mint(alice, 2, 1, ""); keep.setTransferability(2, true); - vm.stopPrank(); // Fail on zero address. startHoax(address(alice), address(alice), type(uint256).max); @@ -1652,7 +1585,6 @@ contract KeepTest is Keep(this), Test { // Success on non-zero address. keep.safeTransferFrom(alice, bob, 2, 1, ""); - vm.stopPrank(); } function testCannotBatchTransferKeepERC1155ToZeroAddress() public payable { @@ -1660,7 +1592,6 @@ contract KeepTest is Keep(this), Test { startHoax(address(keep), address(keep), type(uint256).max); keep.mint(alice, 2, 1, ""); keep.setTransferability(2, true); - vm.stopPrank(); uint256[] memory ids = new uint256[](1); ids[0] = 2; @@ -1675,7 +1606,6 @@ contract KeepTest is Keep(this), Test { // Success on non-zero address. keep.safeBatchTransferFrom(alice, bob, ids, amounts, ""); - vm.stopPrank(); } function testCannotTransferKeepERC1155ToUnsafeContractAddress() @@ -1686,7 +1616,6 @@ contract KeepTest is Keep(this), Test { startHoax(address(keep), address(keep), type(uint256).max); keep.mint(alice, 2, 1, ""); keep.setTransferability(2, true); - vm.stopPrank(); // Fail on receiver-noncompliant addresses. startHoax(address(alice), address(alice), type(uint256).max); @@ -1704,7 +1633,6 @@ contract KeepTest is Keep(this), Test { // Success on receiver-compliant address. keep.safeTransferFrom(alice, address(keep), 2, 1, ""); - vm.stopPrank(); } function testCannotBatchTransferKeepERC1155ToUnsafeContractAddress() @@ -1715,7 +1643,6 @@ contract KeepTest is Keep(this), Test { startHoax(address(keep), address(keep), type(uint256).max); keep.mint(alice, 2, 1, ""); keep.setTransferability(2, true); - vm.stopPrank(); uint256[] memory ids = new uint256[](1); ids[0] = 2; @@ -1739,7 +1666,6 @@ contract KeepTest is Keep(this), Test { // Success on receiver-compliant address. keep.safeBatchTransferFrom(alice, address(keep), ids, amounts, ""); - vm.stopPrank(); } /// ----------------------------------------------------------------------- @@ -1761,7 +1687,6 @@ contract KeepTest is Keep(this), Test { vm.startPrank(address(keep)); keep.mint(user, id, amount, ""); - vm.stopPrank(); assert(keep.delegates(user, id) == user); assert(keep.getCurrentVotes(user, id) == amount); @@ -1791,7 +1716,6 @@ contract KeepTest is Keep(this), Test { vm.startPrank(address(keep)); keep.mint(userA, id, amount, ""); - vm.stopPrank(); assert(keep.delegates(userA, id) == userA); assert(keep.getCurrentVotes(userA, id) == amount); @@ -1810,7 +1734,6 @@ contract KeepTest is Keep(this), Test { vm.startPrank(userA); keep.delegate(userB, id); - vm.stopPrank(); assert(keep.delegates(userA, id) == userB); @@ -1851,7 +1774,6 @@ contract KeepTest is Keep(this), Test { startHoax(address(keep), address(keep), type(uint256).max); keep.mint(userA, id, amount, ""); - vm.stopPrank(); assert(keep.delegates(userA, id) == userA); @@ -1871,13 +1793,11 @@ contract KeepTest is Keep(this), Test { startHoax(address(keep), address(keep), type(uint256).max); keep.setTransferability(id, true); - vm.stopPrank(); assertTrue(keep.transferable(id)); startHoax(userA, userA, type(uint256).max); keep.safeTransferFrom(userA, userB, id, amount, ""); - vm.stopPrank(); assert(keep.delegates(userA, id) == userA); @@ -1929,7 +1849,6 @@ contract KeepTest is Keep(this), Test { vm.startPrank(userA); keep.permit(userA, userB, approved, block.timestamp, v, r, s); - vm.stopPrank(); assert(keep.isApprovedForAll(userA, userB) == approved); assert(keep.nonces(userA) == 1); @@ -1970,7 +1889,6 @@ contract KeepTest is Keep(this), Test { vm.startPrank(userA); vm.expectRevert(ExpiredSig.selector); keep.permit(userA, userB, approved, deadline, v, r, s); - vm.stopPrank(); } function testKeepTokenDelegateBySig( @@ -1988,7 +1906,6 @@ contract KeepTest is Keep(this), Test { vm.prank(address(keep)); keep.mint(userA, id, amount, ""); - vm.stopPrank(); (uint8 v, bytes32 r, bytes32 s) = vm.sign( privateKey, @@ -2012,7 +1929,6 @@ contract KeepTest is Keep(this), Test { vm.startPrank(userA); keep.delegateBySig(userA, userB, id, block.timestamp, v, r, s); - vm.stopPrank(); assert(keep.delegates(userA, id) == userB); assert(keep.nonces(userA) == 1); @@ -2053,6 +1969,5 @@ contract KeepTest is Keep(this), Test { vm.startPrank(userA); vm.expectRevert(ExpiredSig.selector); keep.delegateBySig(userA, userB, id, deadline, v, r, s); - vm.stopPrank(); } }