@diwantanushh/rapiddex-contracts 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/openzeppelin-contracts/contracts/drafts/IERC20Permit.sol +14 -0
- package/lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol +14 -0
- package/lib/openzeppelin-contracts/contracts/token/ERC721/ERC721.sol +227 -0
- package/lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol +20 -0
- package/lib/openzeppelin-contracts/contracts/token/ERC721/IERC721Enumerable.sol +10 -0
- package/lib/openzeppelin-contracts/contracts/token/ERC721/IERC721Metadata.sol +10 -0
- package/lib/openzeppelin-contracts/contracts/token/ERC721/IERC721Receiver.sol +8 -0
- package/lib/openzeppelin-contracts/contracts/utils/Address.sol +12 -0
- package/lib/openzeppelin-contracts/contracts/utils/Context.sol +8 -0
- package/lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol +10 -0
- package/lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol +6 -0
- package/lib/openzeppelin-contracts-master/.changeset/better-tires-pull.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/blue-jars-lay.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/bright-cooks-brush.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/chatty-dryers-joke.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/config.json +12 -0
- package/lib/openzeppelin-contracts-master/.changeset/cool-clocks-tick.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/curly-pandas-flow.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/flat-flies-hear.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/floppy-symbols-burn.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/fruity-coats-smash.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/gentle-apples-dance.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/happy-pants-decide.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/heavy-pots-reply.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/legal-cameras-sin.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/rare-bushes-march.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/red-gifts-appear.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/silver-falcons-lay.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/smooth-cows-notice.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/some-dolls-shine.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/spicy-seals-bake.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/sweet-houses-cheer.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/swift-trees-build.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/tame-rules-run.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/tangy-jokes-begin.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/tidy-turkeys-build.md +5 -0
- package/lib/openzeppelin-contracts-master/.codecov.yml +16 -0
- package/lib/openzeppelin-contracts-master/.editorconfig +21 -0
- package/lib/openzeppelin-contracts-master/.gitattributes +3 -0
- package/lib/openzeppelin-contracts-master/.github/CODEOWNERS +10 -0
- package/lib/openzeppelin-contracts-master/.github/ISSUE_TEMPLATE/bug_report.md +21 -0
- package/lib/openzeppelin-contracts-master/.github/ISSUE_TEMPLATE/config.yml +4 -0
- package/lib/openzeppelin-contracts-master/.github/ISSUE_TEMPLATE/feature_request.md +14 -0
- package/lib/openzeppelin-contracts-master/.github/PULL_REQUEST_TEMPLATE.md +20 -0
- package/lib/openzeppelin-contracts-master/.github/actions/gas-compare/action.yml +51 -0
- package/lib/openzeppelin-contracts-master/.github/actions/setup/action.yml +108 -0
- package/lib/openzeppelin-contracts-master/.github/actions/storage-layout/action.yml +57 -0
- package/lib/openzeppelin-contracts-master/.github/workflows/actionlint.yml +18 -0
- package/lib/openzeppelin-contracts-master/.github/workflows/changeset.yml +28 -0
- package/lib/openzeppelin-contracts-master/.github/workflows/checks.yml +132 -0
- package/lib/openzeppelin-contracts-master/.github/workflows/docs.yml +19 -0
- package/lib/openzeppelin-contracts-master/.github/workflows/formal-verification.yml +63 -0
- package/lib/openzeppelin-contracts-master/.github/workflows/release-cycle.yml +212 -0
- package/lib/openzeppelin-contracts-master/.github/workflows/release-upgradeable.yml +97 -0
- package/lib/openzeppelin-contracts-master/.github/workflows/upgradeable.yml +35 -0
- package/lib/openzeppelin-contracts-master/.gitmodules +10 -0
- package/lib/openzeppelin-contracts-master/.husky/pre-commit +2 -0
- package/lib/openzeppelin-contracts-master/.mocharc.js +4 -0
- package/lib/openzeppelin-contracts-master/.prettierrc +15 -0
- package/lib/openzeppelin-contracts-master/.solcover.js +21 -0
- package/lib/openzeppelin-contracts-master/CHANGELOG.md +1424 -0
- package/lib/openzeppelin-contracts-master/CODE_OF_CONDUCT.md +73 -0
- package/lib/openzeppelin-contracts-master/CONTRIBUTING.md +36 -0
- package/lib/openzeppelin-contracts-master/FUNDING.json +10 -0
- package/lib/openzeppelin-contracts-master/GUIDELINES.md +170 -0
- package/lib/openzeppelin-contracts-master/LICENSE +22 -0
- package/lib/openzeppelin-contracts-master/README.md +122 -0
- package/lib/openzeppelin-contracts-master/RELEASING.md +45 -0
- package/lib/openzeppelin-contracts-master/SECURITY.md +43 -0
- package/lib/openzeppelin-contracts-master/audits/2017-03.md +292 -0
- package/lib/openzeppelin-contracts-master/audits/2018-10.pdf +0 -0
- package/lib/openzeppelin-contracts-master/audits/2022-10-Checkpoints.pdf +0 -0
- package/lib/openzeppelin-contracts-master/audits/2022-10-ERC4626.pdf +0 -0
- package/lib/openzeppelin-contracts-master/audits/2023-05-v4.9.pdf +0 -0
- package/lib/openzeppelin-contracts-master/audits/2023-10-v5.0.pdf +0 -0
- package/lib/openzeppelin-contracts-master/audits/2024-10-v5.1.pdf +0 -0
- package/lib/openzeppelin-contracts-master/audits/2024-12-v5.2.pdf +0 -0
- package/lib/openzeppelin-contracts-master/audits/2025-04-v5.3.pdf +0 -0
- package/lib/openzeppelin-contracts-master/audits/2025-07-v5.4.pdf +0 -0
- package/lib/openzeppelin-contracts-master/audits/2025-10-v5.5.pdf +0 -0
- package/lib/openzeppelin-contracts-master/audits/2025-11-RLP.pdf +0 -0
- package/lib/openzeppelin-contracts-master/audits/2026-02-v5.6.pdf +0 -0
- package/lib/openzeppelin-contracts-master/audits/README.md +24 -0
- package/lib/openzeppelin-contracts-master/contracts/access/AccessControl.sol +207 -0
- package/lib/openzeppelin-contracts-master/contracts/access/IAccessControl.sol +98 -0
- package/lib/openzeppelin-contracts-master/contracts/access/Ownable.sol +100 -0
- package/lib/openzeppelin-contracts-master/contracts/access/Ownable2Step.sol +67 -0
- package/lib/openzeppelin-contracts-master/contracts/access/README.adoc +45 -0
- package/lib/openzeppelin-contracts-master/contracts/access/extensions/AccessControlDefaultAdminRules.sol +372 -0
- package/lib/openzeppelin-contracts-master/contracts/access/extensions/AccessControlEnumerable.sol +81 -0
- package/lib/openzeppelin-contracts-master/contracts/access/extensions/IAccessControlDefaultAdminRules.sol +192 -0
- package/lib/openzeppelin-contracts-master/contracts/access/extensions/IAccessControlEnumerable.sol +31 -0
- package/lib/openzeppelin-contracts-master/contracts/access/manager/AccessManaged.sol +112 -0
- package/lib/openzeppelin-contracts-master/contracts/access/manager/AccessManager.sol +751 -0
- package/lib/openzeppelin-contracts-master/contracts/access/manager/AuthorityUtils.sol +36 -0
- package/lib/openzeppelin-contracts-master/contracts/access/manager/IAccessManaged.sol +32 -0
- package/lib/openzeppelin-contracts-master/contracts/access/manager/IAccessManager.sol +404 -0
- package/lib/openzeppelin-contracts-master/contracts/access/manager/IAuthority.sol +14 -0
- package/lib/openzeppelin-contracts-master/contracts/account/Account.sol +151 -0
- package/lib/openzeppelin-contracts-master/contracts/account/README.adoc +30 -0
- package/lib/openzeppelin-contracts-master/contracts/account/extensions/draft-AccountERC7579.sol +420 -0
- package/lib/openzeppelin-contracts-master/contracts/account/extensions/draft-AccountERC7579Hooked.sol +171 -0
- package/lib/openzeppelin-contracts-master/contracts/account/extensions/draft-ERC7821.sol +70 -0
- package/lib/openzeppelin-contracts-master/contracts/account/utils/EIP7702Utils.sol +21 -0
- package/lib/openzeppelin-contracts-master/contracts/account/utils/draft-ERC4337Utils.sol +279 -0
- package/lib/openzeppelin-contracts-master/contracts/account/utils/draft-ERC7579Utils.sol +280 -0
- package/lib/openzeppelin-contracts-master/contracts/crosschain/CrosschainLinked.sol +109 -0
- package/lib/openzeppelin-contracts-master/contracts/crosschain/CrosschainRemoteExecutor.sol +98 -0
- package/lib/openzeppelin-contracts-master/contracts/crosschain/ERC7786Recipient.sol +66 -0
- package/lib/openzeppelin-contracts-master/contracts/crosschain/README.adoc +44 -0
- package/lib/openzeppelin-contracts-master/contracts/crosschain/bridges/BridgeERC1155.sol +101 -0
- package/lib/openzeppelin-contracts-master/contracts/crosschain/bridges/BridgeERC20.sol +37 -0
- package/lib/openzeppelin-contracts-master/contracts/crosschain/bridges/BridgeERC721.sol +61 -0
- package/lib/openzeppelin-contracts-master/contracts/crosschain/bridges/BridgeERC7802.sol +34 -0
- package/lib/openzeppelin-contracts-master/contracts/crosschain/bridges/abstract/BridgeFungible.sol +83 -0
- package/lib/openzeppelin-contracts-master/contracts/crosschain/bridges/abstract/BridgeMultiToken.sol +92 -0
- package/lib/openzeppelin-contracts-master/contracts/crosschain/bridges/abstract/BridgeNonFungible.sol +75 -0
- package/lib/openzeppelin-contracts-master/contracts/finance/README.adoc +14 -0
- package/lib/openzeppelin-contracts-master/contracts/finance/VestingWallet.sol +160 -0
- package/lib/openzeppelin-contracts-master/contracts/finance/VestingWalletCliff.sol +54 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/Governor.sol +820 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/IGovernor.sol +449 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/README.adoc +201 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/TimelockController.sol +470 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorCountingFractional.sol +190 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorCountingOverridable.sol +222 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorCountingSimple.sol +96 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorCrosschain.sol +30 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorNoncesKeyed.sol +91 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorPreventLateQuorum.sol +92 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorProposalGuardian.sol +59 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorSequentialProposalId.sol +75 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorSettings.sol +106 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorStorage.sol +134 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorSuperQuorum.sol +59 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorTimelockAccess.sol +346 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorTimelockCompound.sol +162 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorTimelockControl.sol +167 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorVotes.sol +64 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorVotesQuorumFraction.sol +113 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorVotesSuperQuorumFraction.sol +135 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/utils/IVotes.sol +60 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/utils/Votes.sol +245 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/utils/VotesExtended.sol +85 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC1155.sol +6 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC1155MetadataURI.sol +6 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC1155Receiver.sol +6 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC1271.sol +17 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC1363.sol +86 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC1363Receiver.sol +32 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC1363Spender.sol +26 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC165.sol +6 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC1820Implementer.sol +20 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC1820Registry.sol +112 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC1967.sol +24 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC20.sol +6 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC20Metadata.sol +6 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC2309.sol +19 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC2612.sol +8 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC2981.sol +26 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC3156.sol +7 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC3156FlashBorrower.sol +27 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC3156FlashLender.sol +41 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC4626.sol +230 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC4906.sol +20 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC5267.sol +28 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC5313.sol +16 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC5805.sol +9 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC6372.sol +17 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC6909.sol +125 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC721.sol +6 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC721Enumerable.sol +6 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC721Metadata.sol +6 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC721Receiver.sol +6 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC7751.sol +12 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC777.sol +200 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC777Recipient.sol +35 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC777Sender.sol +35 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC7913.sol +18 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/README.adoc +138 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/draft-IERC1822.sol +20 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/draft-IERC4337.sol +255 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/draft-IERC6093.sol +162 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/draft-IERC7579.sol +227 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/draft-IERC7674.sol +17 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/draft-IERC7786.sol +64 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/draft-IERC7802.sol +32 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/draft-IERC7821.sol +44 -0
- package/lib/openzeppelin-contracts-master/contracts/metatx/ERC2771Context.sol +90 -0
- package/lib/openzeppelin-contracts-master/contracts/metatx/ERC2771Forwarder.sol +379 -0
- package/lib/openzeppelin-contracts-master/contracts/metatx/README.adoc +17 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/AccessManagedTarget.sol +34 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/AccessManagerMock.sol +20 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/ArraysMock.sol +171 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/AuthorityMock.sol +69 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/Base64Dirty.sol +19 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/BatchCaller.sol +20 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/CallReceiverMock.sol +107 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/ConstructorMock.sol +34 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/ContextMock.sol +35 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/DummyImplementation.sol +61 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/EIP712Verifier.sol +16 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/ERC1271WalletMock.sol +24 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/ERC165Mock.sol +100 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/ERC2771ContextMock.sol +28 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/ERC3156FlashBorrowerMock.sol +53 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/EtherReceiverMock.sol +17 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/InitializableMock.sol +130 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/MerkleProofCustomHashMock.sol +62 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/MerkleTreeMock.sol +52 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/MulticallHelper.sol +23 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/MultipleInheritanceInitializableMocks.sol +131 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/PausableMock.sol +31 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/ReentrancyAttack.sol +17 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/ReentrancyMock.sol +59 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/ReentrancyTransientMock.sol +59 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/RegressionImplementation.sol +61 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/SingleInheritanceInitializableMocks.sol +49 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/Stateless.sol +64 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/StorageSlotMock.sol +87 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/TimelockReentrant.sol +26 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/TransientSlotMock.sol +61 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/UpgradeableBeaconMock.sol +27 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/VotesExtendedMock.sol +44 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/VotesMock.sol +44 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/account/AccountMock.sol +181 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/account/modules/ERC7579Mock.sol +141 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/account/utils/ERC7579UtilsMock.sol +23 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/compound/CompTimelock.sol +174 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/crosschain/ERC7786GatewayMock.sol +56 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/crosschain/ERC7786RecipientMock.sol +31 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/AccessManagerEnumerable.sol +161 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/ERC20WithAutoMinerReward.sol +22 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/ERC4626Fees.sol +109 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/MyNFT.sol +9 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/access-control/AccessControlERC20MintBase.sol +25 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/access-control/AccessControlERC20MintMissing.sol +24 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/access-control/AccessControlERC20MintOnlyRole.sol +23 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/access-control/AccessControlModified.sol +14 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/access-control/AccessManagedERC20MintBase.sol +16 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/access-control/MyContractOwnable.sol +17 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/account/MyAccountEIP7702.sol +20 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/account/MyFactoryAccount.sol +37 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/governance/MyGovernor.sol +80 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/governance/MyToken.sol +21 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/governance/MyTokenTimestampBased.sol +32 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/governance/MyTokenWrapped.sol +28 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/token/ERC1155/GameItems.sol +21 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/token/ERC1155/MyERC115HolderContract.sol +7 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/token/ERC20/GLDToken.sol +11 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/token/ERC6909/ERC6909GameItems.sol +26 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/token/ERC721/GameItem.sol +19 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/utilities/Base64NFT.sol +27 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/utilities/Multicall.sol +15 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorCountingOverridableMock.sol +18 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorCrosschain.sol +20 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorFractionalMock.sol +14 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorMock.sol +14 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorNoncesKeyedMock.sol +44 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorPreventLateQuorumMock.sol +40 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorProposalGuardianMock.sol +27 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorSequentialProposalIdMock.sol +39 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorStorageMock.sol +79 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorSuperQuorumMock.sol +95 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorTimelockAccessMock.sol +70 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorTimelockCompoundMock.sol +69 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorTimelockControlMock.sol +69 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorVoteMock.sol +20 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorVotesSuperQuorumFractionMock.sol +37 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorWithParamsMock.sol +51 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/proxy/BadBeacon.sol +11 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/proxy/ClashingImplementation.sol +19 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/proxy/ERC1967ProxyUnsafe.sol +13 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/proxy/UUPSUpgradeableMock.sol +35 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC1155ReceiverMock.sol +74 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC1363ForceApproveMock.sol +13 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC1363NoReturnMock.sol +33 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC1363ReceiverMock.sol +52 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC1363ReturnFalseMock.sol +34 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC1363SpenderMock.sol +47 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC20ApprovalMock.sol +10 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC20BridgeableMock.sol +30 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC20DecimalsMock.sol +17 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC20ExcessDecimalsMock.sol +9 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC20FlashMintMock.sol +26 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC20ForceApproveMock.sol +13 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC20GetterHelper.sol +38 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC20Mock.sol +16 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC20MulticallMock.sol +8 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC20NoReturnMock.sol +30 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC20Reentrant.sol +39 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC20ReturnFalseMock.sol +19 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC20VotesAdditionalCheckpointsMock.sol +33 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC20VotesLegacyMock.sol +253 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC20VotesTimestampMock.sol +31 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC4626LimitsMock.sol +23 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC4626Mock.sol +17 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC4626OffsetMock.sol +17 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC4646FeesMock.sol +40 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC721ConsecutiveEnumerableMock.sol +42 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC721ConsecutiveMock.sol +61 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC721ReceiverMock.sol +47 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC721URIStorageMock.sol +17 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/utils/cryptography/ERC7739Mock.sol +12 -0
- package/lib/openzeppelin-contracts-master/contracts/package.json +32 -0
- package/lib/openzeppelin-contracts-master/contracts/proxy/Clones.sol +294 -0
- package/lib/openzeppelin-contracts-master/contracts/proxy/ERC1967/ERC1967Proxy.sol +62 -0
- package/lib/openzeppelin-contracts-master/contracts/proxy/ERC1967/ERC1967Utils.sol +177 -0
- package/lib/openzeppelin-contracts-master/contracts/proxy/Proxy.sol +69 -0
- package/lib/openzeppelin-contracts-master/contracts/proxy/README.adoc +87 -0
- package/lib/openzeppelin-contracts-master/contracts/proxy/beacon/BeaconProxy.sol +57 -0
- package/lib/openzeppelin-contracts-master/contracts/proxy/beacon/IBeacon.sol +16 -0
- package/lib/openzeppelin-contracts-master/contracts/proxy/beacon/UpgradeableBeacon.sol +70 -0
- package/lib/openzeppelin-contracts-master/contracts/proxy/transparent/ProxyAdmin.sol +45 -0
- package/lib/openzeppelin-contracts-master/contracts/proxy/transparent/TransparentUpgradeableProxy.sol +118 -0
- package/lib/openzeppelin-contracts-master/contracts/proxy/utils/Initializable.sol +238 -0
- package/lib/openzeppelin-contracts-master/contracts/proxy/utils/UUPSUpgradeable.sol +148 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC1155/ERC1155.sol +417 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC1155/IERC1155.sol +123 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC1155/IERC1155Receiver.sol +59 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC1155/README.adoc +46 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC1155/extensions/ERC1155Burnable.sol +22 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC1155/extensions/ERC1155Crosschain.sol +53 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC1155/extensions/ERC1155Pausable.sol +38 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC1155/extensions/ERC1155Supply.sol +88 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC1155/extensions/ERC1155URIStorage.sol +58 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol +20 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC1155/utils/ERC1155Holder.sol +42 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC1155/utils/ERC1155Utils.sol +88 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/ERC20.sol +305 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/IERC20.sol +79 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/README.adoc +81 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/extensions/ERC1363.sol +135 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/extensions/ERC20Burnable.sol +39 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/extensions/ERC20Capped.sol +54 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/extensions/ERC20Crosschain.sol +39 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/extensions/ERC20FlashMint.sol +130 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/extensions/ERC20Pausable.sol +33 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/extensions/ERC20Permit.sol +77 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/extensions/ERC20Votes.sol +83 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/extensions/ERC20Wrapper.sol +93 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/extensions/ERC4626.sol +298 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/extensions/IERC20Metadata.sol +26 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/extensions/IERC20Permit.sol +90 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/extensions/draft-ERC20Bridgeable.sol +51 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/extensions/draft-ERC20TemporaryApproval.sol +119 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/utils/ERC1363Utils.sol +95 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/utils/SafeERC20.sol +292 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC6909/ERC6909.sol +224 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC6909/README.adoc +27 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC6909/extensions/ERC6909ContentURI.sol +59 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC6909/extensions/ERC6909Metadata.sol +83 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC6909/extensions/ERC6909TokenSupply.sol +41 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/ERC721.sol +433 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/IERC721.sol +135 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/IERC721Receiver.sol +28 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/README.adoc +72 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/extensions/ERC721Burnable.sol +26 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/extensions/ERC721Consecutive.sol +176 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/extensions/ERC721Crosschain.sol +37 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/extensions/ERC721Enumerable.sol +165 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/extensions/ERC721Pausable.sol +37 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/extensions/ERC721Royalty.sol +26 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/extensions/ERC721URIStorage.sol +62 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/extensions/ERC721Votes.sol +47 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/extensions/ERC721Wrapper.sol +102 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/extensions/IERC721Enumerable.sol +29 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/extensions/IERC721Metadata.sol +27 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/utils/ERC721Holder.sol +26 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/utils/ERC721Utils.sol +50 -0
- package/lib/openzeppelin-contracts-master/contracts/token/common/ERC2981.sol +139 -0
- package/lib/openzeppelin-contracts-master/contracts/token/common/README.adoc +10 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Address.sol +167 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Arrays.sol +888 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Base58.sol +240 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Base64.sol +234 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Blockhash.sol +54 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Bytes.sol +329 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/CAIP10.sol +54 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/CAIP2.sol +51 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Calldata.sol +25 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Comparators.sol +19 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Context.sol +28 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Create2.sol +91 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Create3.sol +134 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/ERC6372Utils.sol +52 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Errors.sol +34 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/LowLevelCall.sol +127 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Memory.sol +149 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Multicall.sol +37 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Nonces.sol +46 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/NoncesKeyed.sol +74 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Packing.sol +1656 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Panic.sol +57 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Pausable.sol +112 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/README.adoc +169 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/RLP.sol +487 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/ReentrancyGuard.sol +119 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/ReentrancyGuardTransient.sol +84 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/RelayedCall.sol +145 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/ShortStrings.sol +122 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/SimulateCall.sol +113 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/SlotDerivation.sol +155 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/StorageSlot.sol +143 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Strings.sol +532 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/TransientSlot.sol +183 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/ECDSA.sol +284 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/EIP712.sol +160 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/Hashes.sol +31 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/MerkleProof.sol +510 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/MessageHashUtils.sol +228 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/P256.sol +408 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/README.adoc +76 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/RSA.sol +154 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/SignatureChecker.sol +191 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/TrieProof.sol +256 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/WebAuthn.sol +269 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/draft-ERC7739Utils.sol +207 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/signers/AbstractSigner.sol +23 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/signers/MultiSignerERC7913.sol +259 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol +208 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/signers/SignerECDSA.sol +56 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/signers/SignerEIP7702.sol +25 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/signers/SignerERC7913.sol +63 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/signers/SignerP256.sol +64 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/signers/SignerRSA.sol +65 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/signers/SignerWebAuthn.sol +46 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/signers/draft-ERC7739.sol +98 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/verifiers/ERC7913P256Verifier.sol +29 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/verifiers/ERC7913RSAVerifier.sol +23 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/verifiers/ERC7913WebAuthnVerifier.sol +35 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/draft-InteroperableAddress.sol +245 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/introspection/ERC165.sol +25 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/introspection/ERC165Checker.sol +142 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/introspection/IERC165.sol +25 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/math/Math.sol +763 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/math/SafeCast.sol +1162 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/math/SignedMath.sol +68 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/structs/Accumulators.sol +135 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/structs/BitMaps.sol +60 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/structs/Checkpoints.sol +833 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/structs/CircularBuffer.sol +152 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/structs/DoubleEndedQueue.sol +238 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/structs/EnumerableMap.sol +1443 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/structs/EnumerableSet.sol +895 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/structs/Heap.sol +259 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/structs/MerkleTree.sol +267 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/types/Time.sol +133 -0
- package/lib/openzeppelin-contracts-master/contracts/vendor/compound/ICompoundTimelock.sol +86 -0
- package/lib/openzeppelin-contracts-master/contracts/vendor/compound/LICENSE +11 -0
- package/lib/openzeppelin-contracts-master/docs/README.md +16 -0
- package/lib/openzeppelin-contracts-master/docs/antora.yml +7 -0
- package/lib/openzeppelin-contracts-master/docs/config.js +21 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/images/access-control-multiple.svg +97 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/images/access-manager-functions.svg +47 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/images/access-manager.svg +99 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/images/erc4626-attack-3a.png +0 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/images/erc4626-attack-3b.png +0 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/images/erc4626-attack-6.png +0 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/images/erc4626-attack.png +0 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/images/erc4626-deposit.png +0 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/images/erc4626-mint.png +0 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/images/erc4626-rate-linear.png +0 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/images/erc4626-rate-loglog.png +0 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/images/erc4626-rate-loglogext.png +0 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/images/tally-exec.png +0 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/images/tally-vote.png +0 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/nav.adoc +29 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/access-control.adoc +339 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/account-abstraction.adoc +100 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/accounts.adoc +354 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/backwards-compatibility.adoc +50 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/eoa-delegation.adoc +143 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/erc1155.adoc +118 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/erc20-supply.adoc +71 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/erc20.adoc +67 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/erc4626.adoc +208 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/erc6909.adoc +47 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/erc721.adoc +58 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/extending-contracts.adoc +67 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/faq.adoc +13 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/governance.adoc +242 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/index.adoc +100 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/multisig.adoc +308 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/tokens.adoc +31 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/upgradeable.adoc +75 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/utilities.adoc +634 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/wizard.adoc +15 -0
- package/lib/openzeppelin-contracts-master/docs/templates/contract.hbs +141 -0
- package/lib/openzeppelin-contracts-master/docs/templates/helpers.js +46 -0
- package/lib/openzeppelin-contracts-master/docs/templates/page.hbs +4 -0
- package/lib/openzeppelin-contracts-master/docs/templates/properties.js +88 -0
- package/lib/openzeppelin-contracts-master/eslint.config.mjs +29 -0
- package/lib/openzeppelin-contracts-master/foundry.toml +20 -0
- package/lib/openzeppelin-contracts-master/fv/Makefile +54 -0
- package/lib/openzeppelin-contracts-master/fv/README.md +60 -0
- package/lib/openzeppelin-contracts-master/fv/diff/access_manager_AccessManager.sol.patch +97 -0
- package/lib/openzeppelin-contracts-master/fv/diff/account_extensions_draft-AccountERC7579.sol.patch +25 -0
- package/lib/openzeppelin-contracts-master/fv/diff/token_ERC721_ERC721.sol.patch +11 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/AccessControlDefaultAdminRulesHarness.sol +46 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/AccessControlHarness.sol +6 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/AccessManagedHarness.sol +36 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/AccessManagerHarness.sol +116 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/AccountHarness.sol +60 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/DoubleEndedQueueHarness.sol +58 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/ERC20FlashMintHarness.sol +36 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/ERC20PermitHarness.sol +16 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/ERC20WrapperHarness.sol +22 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/ERC3156FlashBorrowerHarness.sol +13 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/ERC721Harness.sol +37 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/ERC721ReceiverHarness.sol +11 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/EnumerableMapHarness.sol +55 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/EnumerableSetHarness.sol +35 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/InitializableHarness.sol +23 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/NoncesHarness.sol +14 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/Ownable2StepHarness.sol +10 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/OwnableHarness.sol +10 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/PausableHarness.sol +18 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/TimelockControllerHarness.sol +13 -0
- package/lib/openzeppelin-contracts-master/fv/reports/2021-10.pdf +0 -0
- package/lib/openzeppelin-contracts-master/fv/reports/2022-03.pdf +0 -0
- package/lib/openzeppelin-contracts-master/fv/reports/2022-05.pdf +0 -0
- package/lib/openzeppelin-contracts-master/fv/run.js +68 -0
- package/lib/openzeppelin-contracts-master/fv/specs/AccessControl.conf +8 -0
- package/lib/openzeppelin-contracts-master/fv/specs/AccessControl.spec +119 -0
- package/lib/openzeppelin-contracts-master/fv/specs/AccessControlDefaultAdminRules.conf +8 -0
- package/lib/openzeppelin-contracts-master/fv/specs/AccessControlDefaultAdminRules.spec +467 -0
- package/lib/openzeppelin-contracts-master/fv/specs/AccessManaged.conf +14 -0
- package/lib/openzeppelin-contracts-master/fv/specs/AccessManaged.spec +49 -0
- package/lib/openzeppelin-contracts-master/fv/specs/AccessManager.conf +10 -0
- package/lib/openzeppelin-contracts-master/fv/specs/AccessManager.spec +837 -0
- package/lib/openzeppelin-contracts-master/fv/specs/Account.conf +9 -0
- package/lib/openzeppelin-contracts-master/fv/specs/Account.spec +490 -0
- package/lib/openzeppelin-contracts-master/fv/specs/DoubleEndedQueue.conf +8 -0
- package/lib/openzeppelin-contracts-master/fv/specs/DoubleEndedQueue.spec +300 -0
- package/lib/openzeppelin-contracts-master/fv/specs/ERC20.conf +9 -0
- package/lib/openzeppelin-contracts-master/fv/specs/ERC20.spec +352 -0
- package/lib/openzeppelin-contracts-master/fv/specs/ERC20FlashMint.conf +10 -0
- package/lib/openzeppelin-contracts-master/fv/specs/ERC20FlashMint.spec +55 -0
- package/lib/openzeppelin-contracts-master/fv/specs/ERC20Wrapper.conf +13 -0
- package/lib/openzeppelin-contracts-master/fv/specs/ERC20Wrapper.spec +226 -0
- package/lib/openzeppelin-contracts-master/fv/specs/ERC721.conf +10 -0
- package/lib/openzeppelin-contracts-master/fv/specs/ERC721.spec +695 -0
- package/lib/openzeppelin-contracts-master/fv/specs/EnumerableMap.conf +8 -0
- package/lib/openzeppelin-contracts-master/fv/specs/EnumerableMap.spec +364 -0
- package/lib/openzeppelin-contracts-master/fv/specs/EnumerableSet.conf +8 -0
- package/lib/openzeppelin-contracts-master/fv/specs/EnumerableSet.spec +272 -0
- package/lib/openzeppelin-contracts-master/fv/specs/Initializable.conf +8 -0
- package/lib/openzeppelin-contracts-master/fv/specs/Initializable.spec +176 -0
- package/lib/openzeppelin-contracts-master/fv/specs/Nonces.conf +8 -0
- package/lib/openzeppelin-contracts-master/fv/specs/Nonces.spec +92 -0
- package/lib/openzeppelin-contracts-master/fv/specs/Ownable.conf +8 -0
- package/lib/openzeppelin-contracts-master/fv/specs/Ownable.spec +77 -0
- package/lib/openzeppelin-contracts-master/fv/specs/Ownable2Step.conf +8 -0
- package/lib/openzeppelin-contracts-master/fv/specs/Ownable2Step.spec +108 -0
- package/lib/openzeppelin-contracts-master/fv/specs/Pausable.conf +8 -0
- package/lib/openzeppelin-contracts-master/fv/specs/Pausable.spec +96 -0
- package/lib/openzeppelin-contracts-master/fv/specs/TimelockController.conf +10 -0
- package/lib/openzeppelin-contracts-master/fv/specs/TimelockController.spec +299 -0
- package/lib/openzeppelin-contracts-master/fv/specs/helpers/helpers.spec +13 -0
- package/lib/openzeppelin-contracts-master/fv/specs/methods/IAccessControl.spec +8 -0
- package/lib/openzeppelin-contracts-master/fv/specs/methods/IAccessControlDefaultAdminRules.spec +36 -0
- package/lib/openzeppelin-contracts-master/fv/specs/methods/IAccessManaged.spec +5 -0
- package/lib/openzeppelin-contracts-master/fv/specs/methods/IAccessManager.spec +33 -0
- package/lib/openzeppelin-contracts-master/fv/specs/methods/IAccount.spec +34 -0
- package/lib/openzeppelin-contracts-master/fv/specs/methods/IERC20.spec +11 -0
- package/lib/openzeppelin-contracts-master/fv/specs/methods/IERC2612.spec +5 -0
- package/lib/openzeppelin-contracts-master/fv/specs/methods/IERC3156FlashBorrower.spec +3 -0
- package/lib/openzeppelin-contracts-master/fv/specs/methods/IERC3156FlashLender.spec +5 -0
- package/lib/openzeppelin-contracts-master/fv/specs/methods/IERC5313.spec +3 -0
- package/lib/openzeppelin-contracts-master/fv/specs/methods/IERC721.spec +17 -0
- package/lib/openzeppelin-contracts-master/fv/specs/methods/IERC721Receiver.spec +3 -0
- package/lib/openzeppelin-contracts-master/fv/specs/methods/IOwnable.spec +5 -0
- package/lib/openzeppelin-contracts-master/fv/specs/methods/IOwnable2Step.spec +7 -0
- package/lib/openzeppelin-contracts-master/fv-requirements.txt +4 -0
- package/lib/openzeppelin-contracts-master/hardhat/async-test-sanity.js +10 -0
- package/lib/openzeppelin-contracts-master/hardhat/env-artifacts.js +29 -0
- package/lib/openzeppelin-contracts-master/hardhat/ignore-unreachable-warnings.js +45 -0
- package/lib/openzeppelin-contracts-master/hardhat/remappings.js +18 -0
- package/lib/openzeppelin-contracts-master/hardhat/skip-foundry-tests.js +6 -0
- package/lib/openzeppelin-contracts-master/hardhat/task-test-get-files.js +25 -0
- package/lib/openzeppelin-contracts-master/hardhat.config.js +124 -0
- package/lib/openzeppelin-contracts-master/logo.svg +15 -0
- package/lib/openzeppelin-contracts-master/netlify.toml +3 -0
- package/lib/openzeppelin-contracts-master/package-lock.json +11197 -0
- package/lib/openzeppelin-contracts-master/package.json +109 -0
- package/lib/openzeppelin-contracts-master/remappings.txt +1 -0
- package/lib/openzeppelin-contracts-master/renovate.json +4 -0
- package/lib/openzeppelin-contracts-master/scripts/checks/compare-layout.js +28 -0
- package/lib/openzeppelin-contracts-master/scripts/checks/compareGasReports.js +249 -0
- package/lib/openzeppelin-contracts-master/scripts/checks/coverage.sh +24 -0
- package/lib/openzeppelin-contracts-master/scripts/checks/extract-layout.js +39 -0
- package/lib/openzeppelin-contracts-master/scripts/checks/generation.sh +6 -0
- package/lib/openzeppelin-contracts-master/scripts/checks/inheritance-ordering.js +56 -0
- package/lib/openzeppelin-contracts-master/scripts/checks/pragma-validity.js +45 -0
- package/lib/openzeppelin-contracts-master/scripts/fetch-common-contracts.js +50 -0
- package/lib/openzeppelin-contracts-master/scripts/gen-nav.js +81 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/format-lines.js +16 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/helpers/sanitize.js +5 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/run.js +61 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/Arrays.js +505 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/Arrays.opts.js +9 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/Checkpoints.js +242 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/Checkpoints.opts.js +18 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/Checkpoints.t.js +141 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/Enumerable.opts.js +56 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/EnumerableMap.js +464 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/EnumerableSet.js +470 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/MerkleProof.js +186 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/MerkleProof.opts.js +11 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/Packing.js +92 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/Packing.opts.js +3 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/Packing.t.js +48 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/SafeCast.js +136 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/Slot.opts.js +15 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/SlotDerivation.js +119 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/SlotDerivation.t.js +127 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/StorageSlot.js +77 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/StorageSlotMock.js +57 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/TransientSlot.js +80 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/TransientSlotMock.js +35 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/conversion.js +34 -0
- package/lib/openzeppelin-contracts-master/scripts/get-contracts-metadata.js +55 -0
- package/lib/openzeppelin-contracts-master/scripts/git-user-config.sh +6 -0
- package/lib/openzeppelin-contracts-master/scripts/helpers.js +7 -0
- package/lib/openzeppelin-contracts-master/scripts/minimize-pragma.js +140 -0
- package/lib/openzeppelin-contracts-master/scripts/prepack.sh +23 -0
- package/lib/openzeppelin-contracts-master/scripts/prepare-docs.sh +26 -0
- package/lib/openzeppelin-contracts-master/scripts/release/format-changelog.js +33 -0
- package/lib/openzeppelin-contracts-master/scripts/release/synchronize-versions.js +15 -0
- package/lib/openzeppelin-contracts-master/scripts/release/update-comment.js +34 -0
- package/lib/openzeppelin-contracts-master/scripts/release/version.sh +11 -0
- package/lib/openzeppelin-contracts-master/scripts/release/workflow/check-upgradeable.sh +27 -0
- package/lib/openzeppelin-contracts-master/scripts/release/workflow/exit-prerelease.sh +8 -0
- package/lib/openzeppelin-contracts-master/scripts/release/workflow/github-release.js +48 -0
- package/lib/openzeppelin-contracts-master/scripts/release/workflow/integrity-check.sh +20 -0
- package/lib/openzeppelin-contracts-master/scripts/release/workflow/pack.sh +26 -0
- package/lib/openzeppelin-contracts-master/scripts/release/workflow/publish.sh +26 -0
- package/lib/openzeppelin-contracts-master/scripts/release/workflow/rerun.js +7 -0
- package/lib/openzeppelin-contracts-master/scripts/release/workflow/set-changesets-pr-title.js +17 -0
- package/lib/openzeppelin-contracts-master/scripts/release/workflow/start.sh +35 -0
- package/lib/openzeppelin-contracts-master/scripts/release/workflow/state.js +112 -0
- package/lib/openzeppelin-contracts-master/scripts/remove-ignored-artifacts.js +45 -0
- package/lib/openzeppelin-contracts-master/scripts/set-max-old-space-size.sh +10 -0
- package/lib/openzeppelin-contracts-master/scripts/solc-versions.js +15 -0
- package/lib/openzeppelin-contracts-master/scripts/solhint-custom/index.js +118 -0
- package/lib/openzeppelin-contracts-master/scripts/solhint-custom/package.json +8 -0
- package/lib/openzeppelin-contracts-master/scripts/update-docs-branch.js +65 -0
- package/lib/openzeppelin-contracts-master/scripts/upgradeable/README.md +21 -0
- package/lib/openzeppelin-contracts-master/scripts/upgradeable/alias/Initializable.sol +5 -0
- package/lib/openzeppelin-contracts-master/scripts/upgradeable/alias/UUPSUpgradeable.sol +5 -0
- package/lib/openzeppelin-contracts-master/scripts/upgradeable/patch-apply.sh +19 -0
- package/lib/openzeppelin-contracts-master/scripts/upgradeable/patch-save.sh +18 -0
- package/lib/openzeppelin-contracts-master/scripts/upgradeable/transpile-onto.sh +54 -0
- package/lib/openzeppelin-contracts-master/scripts/upgradeable/transpile.sh +50 -0
- package/lib/openzeppelin-contracts-master/scripts/upgradeable/upgradeable.patch +390 -0
- package/lib/openzeppelin-contracts-master/slither.config.json +4 -0
- package/lib/openzeppelin-contracts-master/solhint.config.js +29 -0
- package/lib/openzeppelin-contracts-master/test/TESTING.md +3 -0
- package/lib/openzeppelin-contracts-master/test/access/AccessControl.behavior.js +874 -0
- package/lib/openzeppelin-contracts-master/test/access/AccessControl.test.js +19 -0
- package/lib/openzeppelin-contracts-master/test/access/Ownable.test.js +79 -0
- package/lib/openzeppelin-contracts-master/test/access/Ownable2Step.test.js +102 -0
- package/lib/openzeppelin-contracts-master/test/access/extensions/AccessControlDefaultAdminRules.test.js +32 -0
- package/lib/openzeppelin-contracts-master/test/access/extensions/AccessControlEnumerable.test.js +24 -0
- package/lib/openzeppelin-contracts-master/test/access/manager/AccessManaged.test.js +146 -0
- package/lib/openzeppelin-contracts-master/test/access/manager/AccessManager.behavior.js +252 -0
- package/lib/openzeppelin-contracts-master/test/access/manager/AccessManager.predicate.js +456 -0
- package/lib/openzeppelin-contracts-master/test/access/manager/AccessManager.test.js +2536 -0
- package/lib/openzeppelin-contracts-master/test/access/manager/AuthorityUtils.test.js +112 -0
- package/lib/openzeppelin-contracts-master/test/account/Account.behavior.js +144 -0
- package/lib/openzeppelin-contracts-master/test/account/Account.test.js +48 -0
- package/lib/openzeppelin-contracts-master/test/account/AccountECDSA.test.js +52 -0
- package/lib/openzeppelin-contracts-master/test/account/AccountEIP7702.t.sol +116 -0
- package/lib/openzeppelin-contracts-master/test/account/AccountEIP7702.test.js +52 -0
- package/lib/openzeppelin-contracts-master/test/account/AccountERC7913.test.js +138 -0
- package/lib/openzeppelin-contracts-master/test/account/AccountMultiSigner.test.js +326 -0
- package/lib/openzeppelin-contracts-master/test/account/AccountMultiSignerWeighted.test.js +312 -0
- package/lib/openzeppelin-contracts-master/test/account/AccountP256.test.js +58 -0
- package/lib/openzeppelin-contracts-master/test/account/AccountRSA.test.js +58 -0
- package/lib/openzeppelin-contracts-master/test/account/AccountWebAuthn.test.js +75 -0
- package/lib/openzeppelin-contracts-master/test/account/examples/AccountEIP7702WithModulesMock.test.js +99 -0
- package/lib/openzeppelin-contracts-master/test/account/extensions/AccountERC7579.behavior.js +724 -0
- package/lib/openzeppelin-contracts-master/test/account/extensions/AccountERC7579.test.js +60 -0
- package/lib/openzeppelin-contracts-master/test/account/extensions/AccountERC7579Hooked.test.js +60 -0
- package/lib/openzeppelin-contracts-master/test/account/extensions/ERC7821.behavior.js +145 -0
- package/lib/openzeppelin-contracts-master/test/account/utils/EIP7702Utils.test.js +53 -0
- package/lib/openzeppelin-contracts-master/test/account/utils/draft-ERC4337Utils.test.js +594 -0
- package/lib/openzeppelin-contracts-master/test/account/utils/draft-ERC7579Utils.t.sol +434 -0
- package/lib/openzeppelin-contracts-master/test/account/utils/draft-ERC7579Utils.test.js +399 -0
- package/lib/openzeppelin-contracts-master/test/crosschain/BridgeERC1155.behavior.js +333 -0
- package/lib/openzeppelin-contracts-master/test/crosschain/BridgeERC1155.test.js +70 -0
- package/lib/openzeppelin-contracts-master/test/crosschain/BridgeERC20.behavior.js +146 -0
- package/lib/openzeppelin-contracts-master/test/crosschain/BridgeERC20.test.js +46 -0
- package/lib/openzeppelin-contracts-master/test/crosschain/BridgeERC721.behavior.js +218 -0
- package/lib/openzeppelin-contracts-master/test/crosschain/BridgeERC721.test.js +48 -0
- package/lib/openzeppelin-contracts-master/test/crosschain/CrosschainExecutor.test.js +144 -0
- package/lib/openzeppelin-contracts-master/test/crosschain/ERC7786Recipient.test.js +55 -0
- package/lib/openzeppelin-contracts-master/test/finance/VestingWallet.behavior.js +87 -0
- package/lib/openzeppelin-contracts-master/test/finance/VestingWallet.test.js +65 -0
- package/lib/openzeppelin-contracts-master/test/finance/VestingWalletCliff.test.js +70 -0
- package/lib/openzeppelin-contracts-master/test/governance/Governor.t.sol +59 -0
- package/lib/openzeppelin-contracts-master/test/governance/Governor.test.js +980 -0
- package/lib/openzeppelin-contracts-master/test/governance/TimelockController.test.js +1279 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorCountingFractional.test.js +248 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorCountingOverridable.test.js +346 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorCrosschain.test.js +158 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorERC721.test.js +131 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorNoncesKeyed.test.js +243 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorPreventLateQuorum.test.js +185 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorProposalGuardian.test.js +132 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorSequentialProposalId.test.js +202 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorStorage.test.js +175 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorSuperQuorum.test.js +168 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorSuperQuorumGreaterThanQuorum.t.sol +79 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorTimelockAccess.test.js +906 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorTimelockCompound.test.js +450 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorTimelockControl.test.js +506 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorVotesQuorumFraction.test.js +165 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorVotesSuperQuorumFraction.test.js +160 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorWithParams.test.js +245 -0
- package/lib/openzeppelin-contracts-master/test/governance/utils/ERC6372.behavior.js +29 -0
- package/lib/openzeppelin-contracts-master/test/governance/utils/Votes.behavior.js +325 -0
- package/lib/openzeppelin-contracts-master/test/governance/utils/Votes.test.js +102 -0
- package/lib/openzeppelin-contracts-master/test/governance/utils/VotesExtended.test.js +152 -0
- package/lib/openzeppelin-contracts-master/test/helpers/access-manager.js +85 -0
- package/lib/openzeppelin-contracts-master/test/helpers/account.js +16 -0
- package/lib/openzeppelin-contracts-master/test/helpers/chains.js +56 -0
- package/lib/openzeppelin-contracts-master/test/helpers/constants.js +7 -0
- package/lib/openzeppelin-contracts-master/test/helpers/deploy.js +14 -0
- package/lib/openzeppelin-contracts-master/test/helpers/eip712-types.js +61 -0
- package/lib/openzeppelin-contracts-master/test/helpers/eip712.js +45 -0
- package/lib/openzeppelin-contracts-master/test/helpers/enums.js +15 -0
- package/lib/openzeppelin-contracts-master/test/helpers/erc4337.js +244 -0
- package/lib/openzeppelin-contracts-master/test/helpers/erc7579.js +58 -0
- package/lib/openzeppelin-contracts-master/test/helpers/erc7739.js +118 -0
- package/lib/openzeppelin-contracts-master/test/helpers/governance.js +218 -0
- package/lib/openzeppelin-contracts-master/test/helpers/iterate.js +41 -0
- package/lib/openzeppelin-contracts-master/test/helpers/math.js +33 -0
- package/lib/openzeppelin-contracts-master/test/helpers/methods.js +14 -0
- package/lib/openzeppelin-contracts-master/test/helpers/precompiles.js +12 -0
- package/lib/openzeppelin-contracts-master/test/helpers/random.js +26 -0
- package/lib/openzeppelin-contracts-master/test/helpers/signers.js +225 -0
- package/lib/openzeppelin-contracts-master/test/helpers/storage.js +48 -0
- package/lib/openzeppelin-contracts-master/test/helpers/strings.js +5 -0
- package/lib/openzeppelin-contracts-master/test/helpers/time.js +33 -0
- package/lib/openzeppelin-contracts-master/test/helpers/trie.js +79 -0
- package/lib/openzeppelin-contracts-master/test/helpers/txpool.js +28 -0
- package/lib/openzeppelin-contracts-master/test/metatx/ERC2771Context.test.js +109 -0
- package/lib/openzeppelin-contracts-master/test/metatx/ERC2771Forwarder.t.sol +279 -0
- package/lib/openzeppelin-contracts-master/test/metatx/ERC2771Forwarder.test.js +398 -0
- package/lib/openzeppelin-contracts-master/test/proxy/Clones.behaviour.js +160 -0
- package/lib/openzeppelin-contracts-master/test/proxy/Clones.t.sol +91 -0
- package/lib/openzeppelin-contracts-master/test/proxy/Clones.test.js +177 -0
- package/lib/openzeppelin-contracts-master/test/proxy/ERC1967/ERC1967Proxy.test.js +36 -0
- package/lib/openzeppelin-contracts-master/test/proxy/ERC1967/ERC1967Utils.test.js +162 -0
- package/lib/openzeppelin-contracts-master/test/proxy/Proxy.behaviour.js +198 -0
- package/lib/openzeppelin-contracts-master/test/proxy/beacon/BeaconProxy.test.js +141 -0
- package/lib/openzeppelin-contracts-master/test/proxy/beacon/UpgradeableBeacon.test.js +55 -0
- package/lib/openzeppelin-contracts-master/test/proxy/transparent/ProxyAdmin.test.js +82 -0
- package/lib/openzeppelin-contracts-master/test/proxy/transparent/TransparentUpgradeableProxy.behaviour.js +367 -0
- package/lib/openzeppelin-contracts-master/test/proxy/transparent/TransparentUpgradeableProxy.test.js +28 -0
- package/lib/openzeppelin-contracts-master/test/proxy/utils/Initializable.test.js +216 -0
- package/lib/openzeppelin-contracts-master/test/proxy/utils/UUPSUpgradeable.test.js +120 -0
- package/lib/openzeppelin-contracts-master/test/sanity.test.js +27 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC1155/ERC1155.behavior.js +865 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC1155/ERC1155.test.js +258 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC1155/extensions/ERC1155Burnable.test.js +66 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC1155/extensions/ERC1155Crosschain.test.js +43 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC1155/extensions/ERC1155Pausable.test.js +105 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC1155/extensions/ERC1155Supply.test.js +119 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC1155/extensions/ERC1155URIStorage.test.js +70 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC1155/utils/ERC1155Holder.test.js +56 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC1155/utils/ERC1155Utils.test.js +299 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/ERC20.behavior.js +269 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/ERC20.test.js +199 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/extensions/ERC1363.test.js +370 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/extensions/ERC20Burnable.test.js +105 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/extensions/ERC20Capped.test.js +55 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/extensions/ERC20Crosschain.test.js +83 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/extensions/ERC20FlashMint.test.js +164 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/extensions/ERC20Pausable.test.js +129 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/extensions/ERC20Permit.test.js +109 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/extensions/ERC20Votes.test.js +546 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/extensions/ERC20Wrapper.test.js +203 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/extensions/ERC4626.t.sol +41 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/extensions/ERC4626.test.js +888 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/extensions/draft-ERC20Bridgeable.test.js +89 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/extensions/draft-ERC20TemporaryApproval.test.js +142 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/utils/SafeERC20.test.js +493 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC6909/ERC6909.behavior.js +216 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC6909/ERC6909.test.js +104 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC6909/extensions/ERC6909ContentURI.test.js +52 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC6909/extensions/ERC6909Metadata.test.js +62 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC6909/extensions/ERC6909TokenSupply.test.js +56 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC721/ERC721.behavior.js +954 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC721/ERC721.test.js +23 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC721/ERC721Enumerable.test.js +28 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC721/extensions/ERC721Burnable.test.js +77 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC721/extensions/ERC721Consecutive.t.sol +187 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC721/extensions/ERC721Consecutive.test.js +228 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC721/extensions/ERC721Crosschain.test.js +44 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC721/extensions/ERC721Pausable.test.js +81 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC721/extensions/ERC721Royalty.test.js +57 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC721/extensions/ERC721URIStorage.test.js +134 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC721/extensions/ERC721Votes.test.js +194 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC721/extensions/ERC721Wrapper.test.js +201 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC721/utils/ERC721Holder.test.js +20 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC721/utils/ERC721Utils.test.js +94 -0
- package/lib/openzeppelin-contracts-master/test/token/common/ERC2981.behavior.js +152 -0
- package/lib/openzeppelin-contracts-master/test/utils/Address.test.js +332 -0
- package/lib/openzeppelin-contracts-master/test/utils/Arrays.t.sol +416 -0
- package/lib/openzeppelin-contracts-master/test/utils/Arrays.test.js +284 -0
- package/lib/openzeppelin-contracts-master/test/utils/Base58.t.sol +24 -0
- package/lib/openzeppelin-contracts-master/test/utils/Base58.test.js +65 -0
- package/lib/openzeppelin-contracts-master/test/utils/Base64.t.sol +36 -0
- package/lib/openzeppelin-contracts-master/test/utils/Base64.test.js +79 -0
- package/lib/openzeppelin-contracts-master/test/utils/Blockhash.t.sol +101 -0
- package/lib/openzeppelin-contracts-master/test/utils/Blockhash.test.js +59 -0
- package/lib/openzeppelin-contracts-master/test/utils/Bytes.t.sol +322 -0
- package/lib/openzeppelin-contracts-master/test/utils/Bytes.test.js +371 -0
- package/lib/openzeppelin-contracts-master/test/utils/CAIP.test.js +56 -0
- package/lib/openzeppelin-contracts-master/test/utils/Calldata.test.js +22 -0
- package/lib/openzeppelin-contracts-master/test/utils/Context.behavior.js +48 -0
- package/lib/openzeppelin-contracts-master/test/utils/Context.test.js +18 -0
- package/lib/openzeppelin-contracts-master/test/utils/Create2.t.sol +17 -0
- package/lib/openzeppelin-contracts-master/test/utils/Create2.test.js +190 -0
- package/lib/openzeppelin-contracts-master/test/utils/Create3.t.sol +25 -0
- package/lib/openzeppelin-contracts-master/test/utils/Create3.test.js +185 -0
- package/lib/openzeppelin-contracts-master/test/utils/ERC6372Utils.test.js +59 -0
- package/lib/openzeppelin-contracts-master/test/utils/LowLevelCall.test.js +257 -0
- package/lib/openzeppelin-contracts-master/test/utils/Memory.t.sol +90 -0
- package/lib/openzeppelin-contracts-master/test/utils/Memory.test.js +94 -0
- package/lib/openzeppelin-contracts-master/test/utils/Multicall.test.js +72 -0
- package/lib/openzeppelin-contracts-master/test/utils/Nonces.behavior.js +189 -0
- package/lib/openzeppelin-contracts-master/test/utils/Nonces.test.js +16 -0
- package/lib/openzeppelin-contracts-master/test/utils/NoncesKeyed.t.sol +51 -0
- package/lib/openzeppelin-contracts-master/test/utils/NoncesKeyed.test.js +17 -0
- package/lib/openzeppelin-contracts-master/test/utils/Packing.t.sol +993 -0
- package/lib/openzeppelin-contracts-master/test/utils/Packing.test.js +70 -0
- package/lib/openzeppelin-contracts-master/test/utils/Panic.test.js +37 -0
- package/lib/openzeppelin-contracts-master/test/utils/Pausable.test.js +90 -0
- package/lib/openzeppelin-contracts-master/test/utils/RLP.t.sol +144 -0
- package/lib/openzeppelin-contracts-master/test/utils/RLP.test.js +224 -0
- package/lib/openzeppelin-contracts-master/test/utils/ReentrancyGuard.test.js +58 -0
- package/lib/openzeppelin-contracts-master/test/utils/RelayedCall.test.js +223 -0
- package/lib/openzeppelin-contracts-master/test/utils/ShortStrings.t.sol +109 -0
- package/lib/openzeppelin-contracts-master/test/utils/ShortStrings.test.js +64 -0
- package/lib/openzeppelin-contracts-master/test/utils/SimulatedCall.test.js +101 -0
- package/lib/openzeppelin-contracts-master/test/utils/SlotDerivation.t.sol +248 -0
- package/lib/openzeppelin-contracts-master/test/utils/SlotDerivation.test.js +58 -0
- package/lib/openzeppelin-contracts-master/test/utils/StorageSlot.test.js +73 -0
- package/lib/openzeppelin-contracts-master/test/utils/Strings.t.sol +50 -0
- package/lib/openzeppelin-contracts-master/test/utils/Strings.test.js +366 -0
- package/lib/openzeppelin-contracts-master/test/utils/TransientSlot.test.js +59 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/ECDSA.test.js +322 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/EIP712.test.js +105 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/ERC1271.behavior.js +111 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/ERC7739.test.js +42 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/ERC7739Utils.test.js +203 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/MerkleProof.test.js +216 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/MessageHashUtils.t.sol +33 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/MessageHashUtils.test.js +149 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/P256.t.sol +44 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/P256.test.js +174 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/RSA.helper.js +17 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/RSA.test.js +102 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/SigVer15_186-3.rsp +3850 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/SignatureChecker.test.js +427 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/TrieProof.test.js +707 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/WebAuthn.t.sol +340 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/ecdsa_secp256r1_sha256_p1363_test.json +3719 -0
- package/lib/openzeppelin-contracts-master/test/utils/draft-InteroperableAddress.t.sol +99 -0
- package/lib/openzeppelin-contracts-master/test/utils/draft-InteroperableAddress.test.js +217 -0
- package/lib/openzeppelin-contracts-master/test/utils/introspection/ERC165.test.js +18 -0
- package/lib/openzeppelin-contracts-master/test/utils/introspection/ERC165Checker.test.js +272 -0
- package/lib/openzeppelin-contracts-master/test/utils/introspection/SupportsInterface.behavior.js +169 -0
- package/lib/openzeppelin-contracts-master/test/utils/math/Math.t.sol +370 -0
- package/lib/openzeppelin-contracts-master/test/utils/math/Math.test.js +746 -0
- package/lib/openzeppelin-contracts-master/test/utils/math/SafeCast.test.js +159 -0
- package/lib/openzeppelin-contracts-master/test/utils/math/SignedMath.t.sol +81 -0
- package/lib/openzeppelin-contracts-master/test/utils/math/SignedMath.test.js +53 -0
- package/lib/openzeppelin-contracts-master/test/utils/structs/Accumulators.t.sol +35 -0
- package/lib/openzeppelin-contracts-master/test/utils/structs/BitMap.test.js +149 -0
- package/lib/openzeppelin-contracts-master/test/utils/structs/Checkpoints.t.sol +440 -0
- package/lib/openzeppelin-contracts-master/test/utils/structs/Checkpoints.test.js +147 -0
- package/lib/openzeppelin-contracts-master/test/utils/structs/CircularBuffer.test.js +83 -0
- package/lib/openzeppelin-contracts-master/test/utils/structs/DoubleEndedQueue.test.js +144 -0
- package/lib/openzeppelin-contracts-master/test/utils/structs/EnumerableMap.behavior.js +214 -0
- package/lib/openzeppelin-contracts-master/test/utils/structs/EnumerableMap.test.js +83 -0
- package/lib/openzeppelin-contracts-master/test/utils/structs/EnumerableSet.behavior.js +175 -0
- package/lib/openzeppelin-contracts-master/test/utils/structs/EnumerableSet.test.js +66 -0
- package/lib/openzeppelin-contracts-master/test/utils/structs/Heap.t.sol +74 -0
- package/lib/openzeppelin-contracts-master/test/utils/structs/Heap.test.js +113 -0
- package/lib/openzeppelin-contracts-master/test/utils/structs/MerkleTree.test.js +180 -0
- package/lib/openzeppelin-contracts-master/test/utils/types/Time.test.js +135 -0
- package/lib/v3-core-main/.gitattributes +1 -0
- package/lib/v3-core-main/.github/stale.yml +25 -0
- package/lib/v3-core-main/.github/workflows/fuzz-testing.yml +60 -0
- package/lib/v3-core-main/.github/workflows/lint.yml +34 -0
- package/lib/v3-core-main/.github/workflows/mythx.yml +65 -0
- package/lib/v3-core-main/.github/workflows/tests.yml +38 -0
- package/lib/v3-core-main/.prettierrc +5 -0
- package/lib/v3-core-main/.solhint.json +6 -0
- package/lib/v3-core-main/.yarnrc +1 -0
- package/lib/v3-core-main/LICENSE +100 -0
- package/lib/v3-core-main/README.md +66 -0
- package/lib/v3-core-main/audits/abdk/audit.pdf +0 -0
- package/lib/v3-core-main/audits/tob/README.md +166 -0
- package/lib/v3-core-main/audits/tob/audit.pdf +0 -0
- package/lib/v3-core-main/audits/tob/contracts/crytic/echidna/E2E_mint_burn.config.yaml +16 -0
- package/lib/v3-core-main/audits/tob/contracts/crytic/echidna/E2E_mint_burn.sol +503 -0
- package/lib/v3-core-main/audits/tob/contracts/crytic/echidna/E2E_swap.config.yaml +10 -0
- package/lib/v3-core-main/audits/tob/contracts/crytic/echidna/E2E_swap.sol +487 -0
- package/lib/v3-core-main/audits/tob/contracts/crytic/echidna/Other.config.yaml +7 -0
- package/lib/v3-core-main/audits/tob/contracts/crytic/echidna/Other.sol +21 -0
- package/lib/v3-core-main/audits/tob/contracts/crytic/echidna/Setup.sol +205 -0
- package/lib/v3-core-main/audits/tob/contracts/crytic/manticore/001.sol +11 -0
- package/lib/v3-core-main/audits/tob/contracts/crytic/manticore/002.sol +12 -0
- package/lib/v3-core-main/audits/tob/contracts/crytic/manticore/003.sol +9 -0
- package/lib/v3-core-main/bug-bounty.md +76 -0
- package/lib/v3-core-main/contracts/NoDelegateCall.sol +27 -0
- package/lib/v3-core-main/contracts/UniswapV3Factory.sol +73 -0
- package/lib/v3-core-main/contracts/UniswapV3Pool.sol +869 -0
- package/lib/v3-core-main/contracts/UniswapV3PoolDeployer.sol +38 -0
- package/lib/v3-core-main/contracts/interfaces/IERC20Minimal.sol +52 -0
- package/lib/v3-core-main/contracts/interfaces/IUniswapV3Factory.sol +78 -0
- package/lib/v3-core-main/contracts/interfaces/IUniswapV3Pool.sol +24 -0
- package/lib/v3-core-main/contracts/interfaces/IUniswapV3PoolDeployer.sol +26 -0
- package/lib/v3-core-main/contracts/interfaces/LICENSE +445 -0
- package/lib/v3-core-main/contracts/interfaces/callback/IUniswapV3FlashCallback.sol +18 -0
- package/lib/v3-core-main/contracts/interfaces/callback/IUniswapV3MintCallback.sol +18 -0
- package/lib/v3-core-main/contracts/interfaces/callback/IUniswapV3SwapCallback.sol +21 -0
- package/lib/v3-core-main/contracts/interfaces/pool/IUniswapV3PoolActions.sol +103 -0
- package/lib/v3-core-main/contracts/interfaces/pool/IUniswapV3PoolDerivedState.sol +40 -0
- package/lib/v3-core-main/contracts/interfaces/pool/IUniswapV3PoolEvents.sol +121 -0
- package/lib/v3-core-main/contracts/interfaces/pool/IUniswapV3PoolImmutables.sol +35 -0
- package/lib/v3-core-main/contracts/interfaces/pool/IUniswapV3PoolOwnerActions.sol +23 -0
- package/lib/v3-core-main/contracts/interfaces/pool/IUniswapV3PoolState.sol +116 -0
- package/lib/v3-core-main/contracts/libraries/BitMath.sol +94 -0
- package/lib/v3-core-main/contracts/libraries/FixedPoint128.sol +8 -0
- package/lib/v3-core-main/contracts/libraries/FixedPoint96.sol +10 -0
- package/lib/v3-core-main/contracts/libraries/FullMath.sol +124 -0
- package/lib/v3-core-main/contracts/libraries/LICENSE +445 -0
- package/lib/v3-core-main/contracts/libraries/LICENSE_MIT +20 -0
- package/lib/v3-core-main/contracts/libraries/LiquidityMath.sol +17 -0
- package/lib/v3-core-main/contracts/libraries/LowGasSafeMath.sol +46 -0
- package/lib/v3-core-main/contracts/libraries/Oracle.sol +325 -0
- package/lib/v3-core-main/contracts/libraries/Position.sol +88 -0
- package/lib/v3-core-main/contracts/libraries/SafeCast.sol +28 -0
- package/lib/v3-core-main/contracts/libraries/SqrtPriceMath.sol +227 -0
- package/lib/v3-core-main/contracts/libraries/SwapMath.sol +98 -0
- package/lib/v3-core-main/contracts/libraries/Tick.sol +185 -0
- package/lib/v3-core-main/contracts/libraries/TickBitmap.sol +78 -0
- package/lib/v3-core-main/contracts/libraries/TickMath.sol +205 -0
- package/lib/v3-core-main/contracts/libraries/TransferHelper.sol +23 -0
- package/lib/v3-core-main/contracts/libraries/UnsafeMath.sol +17 -0
- package/lib/v3-core-main/contracts/test/BitMathEchidnaTest.sol +18 -0
- package/lib/v3-core-main/contracts/test/BitMathTest.sol +26 -0
- package/lib/v3-core-main/contracts/test/FullMathEchidnaTest.sol +67 -0
- package/lib/v3-core-main/contracts/test/FullMathTest.sol +22 -0
- package/lib/v3-core-main/contracts/test/LiquidityMathTest.sol +16 -0
- package/lib/v3-core-main/contracts/test/LowGasSafeMathEchidnaTest.sol +36 -0
- package/lib/v3-core-main/contracts/test/MockTimeUniswapV3Pool.sol +26 -0
- package/lib/v3-core-main/contracts/test/MockTimeUniswapV3PoolDeployer.sol +35 -0
- package/lib/v3-core-main/contracts/test/NoDelegateCallTest.sol +32 -0
- package/lib/v3-core-main/contracts/test/OracleEchidnaTest.sol +137 -0
- package/lib/v3-core-main/contracts/test/OracleTest.sol +100 -0
- package/lib/v3-core-main/contracts/test/SqrtPriceMathEchidnaTest.sol +232 -0
- package/lib/v3-core-main/contracts/test/SqrtPriceMathTest.sol +86 -0
- package/lib/v3-core-main/contracts/test/SwapMathEchidnaTest.sol +52 -0
- package/lib/v3-core-main/contracts/test/SwapMathTest.sol +37 -0
- package/lib/v3-core-main/contracts/test/TestERC20.sol +59 -0
- package/lib/v3-core-main/contracts/test/TestUniswapV3Callee.sol +142 -0
- package/lib/v3-core-main/contracts/test/TestUniswapV3ReentrantCallee.sol +56 -0
- package/lib/v3-core-main/contracts/test/TestUniswapV3Router.sol +91 -0
- package/lib/v3-core-main/contracts/test/TestUniswapV3SwapPay.sol +41 -0
- package/lib/v3-core-main/contracts/test/TickBitmapEchidnaTest.sol +47 -0
- package/lib/v3-core-main/contracts/test/TickBitmapTest.sol +40 -0
- package/lib/v3-core-main/contracts/test/TickEchidnaTest.sol +27 -0
- package/lib/v3-core-main/contracts/test/TickMathEchidnaTest.sol +22 -0
- package/lib/v3-core-main/contracts/test/TickMathTest.sol +34 -0
- package/lib/v3-core-main/contracts/test/TickOverflowSafetyEchidnaTest.sol +111 -0
- package/lib/v3-core-main/contracts/test/TickTest.sol +79 -0
- package/lib/v3-core-main/contracts/test/UniswapV3PoolSwapTest.sol +50 -0
- package/lib/v3-core-main/contracts/test/UnsafeMathEchidnaTest.sol +17 -0
- package/lib/v3-core-main/echidna.config.yml +74 -0
- package/lib/v3-core-main/hardhat.config.ts +68 -0
- package/lib/v3-core-main/package.json +59 -0
- package/lib/v3-core-main/test/BitMath.spec.ts +79 -0
- package/lib/v3-core-main/test/FullMath.spec.ts +182 -0
- package/lib/v3-core-main/test/LiquidityMath.spec.ts +44 -0
- package/lib/v3-core-main/test/NoDelegateCall.spec.ts +54 -0
- package/lib/v3-core-main/test/Oracle.spec.ts +798 -0
- package/lib/v3-core-main/test/SqrtPriceMath.spec.ts +379 -0
- package/lib/v3-core-main/test/SwapMath.spec.ts +324 -0
- package/lib/v3-core-main/test/Tick.spec.ts +329 -0
- package/lib/v3-core-main/test/TickBitmap.spec.ts +227 -0
- package/lib/v3-core-main/test/TickMath.spec.ts +166 -0
- package/lib/v3-core-main/test/UniswapV3Factory.spec.ts +177 -0
- package/lib/v3-core-main/test/UniswapV3Pool.arbitrage.spec.ts +373 -0
- package/lib/v3-core-main/test/UniswapV3Pool.gas.spec.ts +315 -0
- package/lib/v3-core-main/test/UniswapV3Pool.spec.ts +2043 -0
- package/lib/v3-core-main/test/UniswapV3Pool.swaps.spec.ts +588 -0
- package/lib/v3-core-main/test/UniswapV3Router.spec.ts +133 -0
- package/lib/v3-core-main/test/__snapshots__/BitMath.spec.ts.snap +13 -0
- package/lib/v3-core-main/test/__snapshots__/LiquidityMath.spec.ts.snap +5 -0
- package/lib/v3-core-main/test/__snapshots__/NoDelegateCall.spec.ts.snap +3 -0
- package/lib/v3-core-main/test/__snapshots__/Oracle.spec.ts.snap +87 -0
- package/lib/v3-core-main/test/__snapshots__/SqrtPriceMath.spec.ts.snap +17 -0
- package/lib/v3-core-main/test/__snapshots__/SwapMath.spec.ts.snap +17 -0
- package/lib/v3-core-main/test/__snapshots__/TickBitmap.spec.ts.snap +19 -0
- package/lib/v3-core-main/test/__snapshots__/TickMath.spec.ts.snap +165 -0
- package/lib/v3-core-main/test/__snapshots__/UniswapV3Factory.spec.ts.snap +7 -0
- package/lib/v3-core-main/test/__snapshots__/UniswapV3Pool.arbitrage.spec.ts.snap +977 -0
- package/lib/v3-core-main/test/__snapshots__/UniswapV3Pool.gas.spec.ts.snap +169 -0
- package/lib/v3-core-main/test/__snapshots__/UniswapV3Pool.swaps.spec.ts.snap +3541 -0
- package/lib/v3-core-main/test/shared/checkObservationEquals.ts +38 -0
- package/lib/v3-core-main/test/shared/expect.ts +8 -0
- package/lib/v3-core-main/test/shared/fixtures.ts +92 -0
- package/lib/v3-core-main/test/shared/format.ts +10 -0
- package/lib/v3-core-main/test/shared/snapshotGasCost.ts +27 -0
- package/lib/v3-core-main/test/shared/utilities.ts +258 -0
- package/lib/v3-core-main/test/snapshotCumulativesInside.test.ts +73 -0
- package/lib/v3-core-main/tsconfig.json +13 -0
- package/lib/v3-core-main/yarn.lock +9271 -0
- package/lib/v3-periphery-main/.gitattributes +1 -0
- package/lib/v3-periphery-main/.github/stale.yml +25 -0
- package/lib/v3-periphery-main/.github/workflows/lint.yml +33 -0
- package/lib/v3-periphery-main/.github/workflows/tests.yml +39 -0
- package/lib/v3-periphery-main/.prettierignore +1 -0
- package/lib/v3-periphery-main/.prettierrc +5 -0
- package/lib/v3-periphery-main/.solhint.json +6 -0
- package/lib/v3-periphery-main/.yarnrc +1 -0
- package/lib/v3-periphery-main/LICENSE +339 -0
- package/lib/v3-periphery-main/README.md +52 -0
- package/lib/v3-periphery-main/audits/abdk/audit.pdf +0 -0
- package/lib/v3-periphery-main/bug-bounty.md +80 -0
- package/lib/v3-periphery-main/contracts/NonfungiblePositionManager.sol +400 -0
- package/lib/v3-periphery-main/contracts/NonfungibleTokenPositionDescriptor.sol +124 -0
- package/lib/v3-periphery-main/contracts/SwapRouter.sol +244 -0
- package/lib/v3-periphery-main/contracts/V3Migrator.sol +99 -0
- package/lib/v3-periphery-main/contracts/base/BlockTimestamp.sol +12 -0
- package/lib/v3-periphery-main/contracts/base/ERC721Permit.sol +86 -0
- package/lib/v3-periphery-main/contracts/base/LiquidityManagement.sol +90 -0
- package/lib/v3-periphery-main/contracts/base/Multicall.sol +28 -0
- package/lib/v3-periphery-main/contracts/base/PeripheryImmutableState.sol +18 -0
- package/lib/v3-periphery-main/contracts/base/PeripheryPayments.sol +70 -0
- package/lib/v3-periphery-main/contracts/base/PeripheryPaymentsWithFee.sol +55 -0
- package/lib/v3-periphery-main/contracts/base/PeripheryValidation.sol +11 -0
- package/lib/v3-periphery-main/contracts/base/PoolInitializer.sol +32 -0
- package/lib/v3-periphery-main/contracts/base/SelfPermit.sol +63 -0
- package/lib/v3-periphery-main/contracts/examples/PairFlash.sol +149 -0
- package/lib/v3-periphery-main/contracts/interfaces/IERC20Metadata.sol +18 -0
- package/lib/v3-periphery-main/contracts/interfaces/IERC721Permit.sol +32 -0
- package/lib/v3-periphery-main/contracts/interfaces/IMulticall.sol +13 -0
- package/lib/v3-periphery-main/contracts/interfaces/INonfungiblePositionManager.sol +179 -0
- package/lib/v3-periphery-main/contracts/interfaces/INonfungibleTokenPositionDescriptor.sol +17 -0
- package/lib/v3-periphery-main/contracts/interfaces/IPeripheryImmutableState.sol +12 -0
- package/lib/v3-periphery-main/contracts/interfaces/IPeripheryPayments.sol +28 -0
- package/lib/v3-periphery-main/contracts/interfaces/IPeripheryPaymentsWithFee.sol +29 -0
- package/lib/v3-periphery-main/contracts/interfaces/IPoolInitializer.sol +22 -0
- package/lib/v3-periphery-main/contracts/interfaces/IQuoter.sol +51 -0
- package/lib/v3-periphery-main/contracts/interfaces/IQuoterV2.sol +98 -0
- package/lib/v3-periphery-main/contracts/interfaces/ISelfPermit.sol +76 -0
- package/lib/v3-periphery-main/contracts/interfaces/ISwapRouter.sol +67 -0
- package/lib/v3-periphery-main/contracts/interfaces/ITickLens.sol +25 -0
- package/lib/v3-periphery-main/contracts/interfaces/IV3Migrator.sol +34 -0
- package/lib/v3-periphery-main/contracts/interfaces/external/IERC1271.sol +16 -0
- package/lib/v3-periphery-main/contracts/interfaces/external/IERC20PermitAllowed.sol +27 -0
- package/lib/v3-periphery-main/contracts/interfaces/external/IWETH9.sol +13 -0
- package/lib/v3-periphery-main/contracts/lens/Quoter.sol +170 -0
- package/lib/v3-periphery-main/contracts/lens/QuoterV2.sol +273 -0
- package/lib/v3-periphery-main/contracts/lens/README.md +4 -0
- package/lib/v3-periphery-main/contracts/lens/TickLens.sol +42 -0
- package/lib/v3-periphery-main/contracts/lens/UniswapInterfaceMulticall.sol +39 -0
- package/lib/v3-periphery-main/contracts/libraries/BytesLib.sol +101 -0
- package/lib/v3-periphery-main/contracts/libraries/CallbackValidation.sol +36 -0
- package/lib/v3-periphery-main/contracts/libraries/ChainId.sol +13 -0
- package/lib/v3-periphery-main/contracts/libraries/HexStrings.sol +29 -0
- package/lib/v3-periphery-main/contracts/libraries/LiquidityAmounts.sol +137 -0
- package/lib/v3-periphery-main/contracts/libraries/NFTDescriptor.sol +477 -0
- package/lib/v3-periphery-main/contracts/libraries/NFTSVG.sol +406 -0
- package/lib/v3-periphery-main/contracts/libraries/OracleLibrary.sol +180 -0
- package/lib/v3-periphery-main/contracts/libraries/Path.sol +69 -0
- package/lib/v3-periphery-main/contracts/libraries/PoolAddress.sol +48 -0
- package/lib/v3-periphery-main/contracts/libraries/PoolTicksCounter.sol +96 -0
- package/lib/v3-periphery-main/contracts/libraries/PositionKey.sol +13 -0
- package/lib/v3-periphery-main/contracts/libraries/PositionValue.sol +167 -0
- package/lib/v3-periphery-main/contracts/libraries/SqrtPriceMathPartial.sol +62 -0
- package/lib/v3-periphery-main/contracts/libraries/TokenRatioSortOrder.sol +12 -0
- package/lib/v3-periphery-main/contracts/libraries/TransferHelper.sol +60 -0
- package/lib/v3-periphery-main/contracts/test/Base64Test.sol +16 -0
- package/lib/v3-periphery-main/contracts/test/LiquidityAmountsTest.sol +120 -0
- package/lib/v3-periphery-main/contracts/test/MockObservable.sol +48 -0
- package/lib/v3-periphery-main/contracts/test/MockObservations.sol +82 -0
- package/lib/v3-periphery-main/contracts/test/MockTimeNonfungiblePositionManager.sol +23 -0
- package/lib/v3-periphery-main/contracts/test/MockTimeSwapRouter.sol +19 -0
- package/lib/v3-periphery-main/contracts/test/NFTDescriptorTest.sol +75 -0
- package/lib/v3-periphery-main/contracts/test/NonfungiblePositionManagerPositionsGasTest.sol +18 -0
- package/lib/v3-periphery-main/contracts/test/OracleTest.sol +67 -0
- package/lib/v3-periphery-main/contracts/test/PathTest.sol +37 -0
- package/lib/v3-periphery-main/contracts/test/PeripheryImmutableStateTest.sol +8 -0
- package/lib/v3-periphery-main/contracts/test/PoolAddressTest.sol +30 -0
- package/lib/v3-periphery-main/contracts/test/PoolTicksCounterTest.sol +18 -0
- package/lib/v3-periphery-main/contracts/test/PositionValueTest.sol +57 -0
- package/lib/v3-periphery-main/contracts/test/SelfPermitTest.sol +9 -0
- package/lib/v3-periphery-main/contracts/test/TestCallbackValidation.sol +15 -0
- package/lib/v3-periphery-main/contracts/test/TestERC20.sol +10 -0
- package/lib/v3-periphery-main/contracts/test/TestERC20Metadata.sol +14 -0
- package/lib/v3-periphery-main/contracts/test/TestERC20PermitAllowed.sol +24 -0
- package/lib/v3-periphery-main/contracts/test/TestMulticall.sol +30 -0
- package/lib/v3-periphery-main/contracts/test/TestPositionNFTOwner.sol +28 -0
- package/lib/v3-periphery-main/contracts/test/TestUniswapV3Callee.sol +62 -0
- package/lib/v3-periphery-main/contracts/test/TickLensTest.sol +15 -0
- package/lib/v3-periphery-main/deploys.md +25 -0
- package/lib/v3-periphery-main/hardhat.config.ts +104 -0
- package/lib/v3-periphery-main/package.json +68 -0
- package/lib/v3-periphery-main/test/Base64.spec.ts +81 -0
- package/lib/v3-periphery-main/test/CallbackValidation.spec.ts +56 -0
- package/lib/v3-periphery-main/test/LiquidityAmounts.spec.ts +241 -0
- package/lib/v3-periphery-main/test/Multicall.spec.ts +65 -0
- package/lib/v3-periphery-main/test/NFTDescriptor.spec.ts +907 -0
- package/lib/v3-periphery-main/test/NonfungiblePositionManager.spec.ts +1304 -0
- package/lib/v3-periphery-main/test/NonfungibleTokenPositionDescriptor.spec.ts +217 -0
- package/lib/v3-periphery-main/test/OracleLibrary.spec.ts +675 -0
- package/lib/v3-periphery-main/test/PairFlash.spec.ts +168 -0
- package/lib/v3-periphery-main/test/Path.spec.ts +90 -0
- package/lib/v3-periphery-main/test/PeripheryImmutableState.spec.ts +56 -0
- package/lib/v3-periphery-main/test/PoolAddress.spec.ts +72 -0
- package/lib/v3-periphery-main/test/PoolTicksCounter.spec.ts +280 -0
- package/lib/v3-periphery-main/test/PositionValue.spec.ts +490 -0
- package/lib/v3-periphery-main/test/Quoter.spec.ts +201 -0
- package/lib/v3-periphery-main/test/QuoterV2.spec.ts +578 -0
- package/lib/v3-periphery-main/test/SelfPermit.spec.ts +198 -0
- package/lib/v3-periphery-main/test/SwapRouter.gas.spec.ts +453 -0
- package/lib/v3-periphery-main/test/SwapRouter.spec.ts +916 -0
- package/lib/v3-periphery-main/test/TickLens.spec.ts +223 -0
- package/lib/v3-periphery-main/test/V3Migrator.spec.ts +446 -0
- package/lib/v3-periphery-main/test/__snapshots__/Base64.spec.ts.snap +32 -0
- package/lib/v3-periphery-main/test/__snapshots__/LiquidityAmounts.spec.ts.snap +21 -0
- package/lib/v3-periphery-main/test/__snapshots__/Multicall.spec.ts.snap +5 -0
- package/lib/v3-periphery-main/test/__snapshots__/NFTDescriptor.spec.ts.snap +7 -0
- package/lib/v3-periphery-main/test/__snapshots__/NFTDescriptor.svg +1 -0
- package/lib/v3-periphery-main/test/__snapshots__/NonfungiblePositionManager.spec.ts.snap +41 -0
- package/lib/v3-periphery-main/test/__snapshots__/OracleLibrary.spec.ts.snap +3 -0
- package/lib/v3-periphery-main/test/__snapshots__/PairFlash.spec.ts.snap +3 -0
- package/lib/v3-periphery-main/test/__snapshots__/Path.spec.ts.snap +3 -0
- package/lib/v3-periphery-main/test/__snapshots__/PeripheryImmutableState.spec.ts.snap +3 -0
- package/lib/v3-periphery-main/test/__snapshots__/PoolAddress.spec.ts.snap +5 -0
- package/lib/v3-periphery-main/test/__snapshots__/PositionValue.spec.ts.snap +11 -0
- package/lib/v3-periphery-main/test/__snapshots__/QuoterV2.spec.ts.snap +51 -0
- package/lib/v3-periphery-main/test/__snapshots__/SwapRouter.gas.spec.ts.snap +37 -0
- package/lib/v3-periphery-main/test/__snapshots__/SwapRouter.spec.ts.snap +3 -0
- package/lib/v3-periphery-main/test/__snapshots__/TickLens.spec.ts.snap +5 -0
- package/lib/v3-periphery-main/test/__snapshots__/V3Migrator.spec.ts.snap +3 -0
- package/lib/v3-periphery-main/test/contracts/WETH9.json +156 -0
- package/lib/v3-periphery-main/test/shared/base64.ts +7 -0
- package/lib/v3-periphery-main/test/shared/completeFixture.ts +63 -0
- package/lib/v3-periphery-main/test/shared/computePoolAddress.ts +22 -0
- package/lib/v3-periphery-main/test/shared/constants.ts +15 -0
- package/lib/v3-periphery-main/test/shared/encodePriceSqrt.ts +16 -0
- package/lib/v3-periphery-main/test/shared/expandTo18Decimals.ts +5 -0
- package/lib/v3-periphery-main/test/shared/expect.ts +8 -0
- package/lib/v3-periphery-main/test/shared/externalFixtures.ts +57 -0
- package/lib/v3-periphery-main/test/shared/extractJSONFromURI.ts +5 -0
- package/lib/v3-periphery-main/test/shared/formatSqrtRatioX96.spec.ts +30 -0
- package/lib/v3-periphery-main/test/shared/formatSqrtRatioX96.ts +30 -0
- package/lib/v3-periphery-main/test/shared/getPermitNFTSignature.ts +57 -0
- package/lib/v3-periphery-main/test/shared/path.ts +61 -0
- package/lib/v3-periphery-main/test/shared/permit.ts +61 -0
- package/lib/v3-periphery-main/test/shared/poolAtAddress.ts +7 -0
- package/lib/v3-periphery-main/test/shared/quoter.ts +153 -0
- package/lib/v3-periphery-main/test/shared/snapshotGasCost.ts +27 -0
- package/lib/v3-periphery-main/test/shared/ticks.ts +9 -0
- package/lib/v3-periphery-main/test/shared/tokenSort.ts +10 -0
- package/lib/v3-periphery-main/testnet-deploys.md +3 -0
- package/lib/v3-periphery-main/tsconfig.json +14 -0
- package/lib/v3-periphery-main/yarn.lock +8111 -0
- package/package.json +44 -0
- package/src/LPStateStorage.sol +74 -0
- package/src/MinimalPositionDescriptor.sol +38 -0
- package/src/NonfungiblePositionManagerImporter.sol +13 -0
- package/src/QuoterV2Importer.sol +9 -0
- package/src/RapidexV3FactoryImporter.sol +6 -0
- package/src/SwapRouterImporter.sol +9 -0
- package/src/TestToken.sol +60 -0
- package/src/WMST.sol +63 -0
- package/src/flattened/LPStateStorage.flat.sol +76 -0
- package/src/flattened/MinimalPositionDescriptor.flat.sol +40 -0
- package/src/flattened/NonfungiblePositionManagerImporter.flat.sol +2695 -0
- package/src/flattened/QuoterV2Importer.flat.sol +1616 -0
- package/src/flattened/RapidexV3FactoryImporter.flat.sol +3193 -0
- package/src/flattened/SwapRouterImporter.flat.sol +1811 -0
- package/src/flattened/TestToken.flat.sol +62 -0
- package/src/flattened/WMST.flat.sol +65 -0
|
@@ -0,0 +1,3541 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`UniswapV3Pool swap tests close to max price swap exactly 0.0000000000000010000 token0 for token1 1`] = `
|
|
4
|
+
Object {
|
|
5
|
+
"amount0Before": "1",
|
|
6
|
+
"amount0Delta": "1000",
|
|
7
|
+
"amount1Before": "26087635650665564424699143612505016738",
|
|
8
|
+
"amount1Delta": "-26083549850867114346332688477747755628",
|
|
9
|
+
"executionPrice": "2.6084e+34",
|
|
10
|
+
"feeGrowthGlobal0X128Delta": "2381976568446569244235",
|
|
11
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
12
|
+
"poolPriceAfter": "4.1734e+30",
|
|
13
|
+
"poolPriceBefore": "1.7014e+38",
|
|
14
|
+
"tickAfter": 705098,
|
|
15
|
+
"tickBefore": 880340,
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
18
|
+
|
|
19
|
+
exports[`UniswapV3Pool swap tests close to max price swap exactly 0.0000000000000010000 token1 for token0 1`] = `
|
|
20
|
+
Object {
|
|
21
|
+
"amount0Before": "1",
|
|
22
|
+
"amount0Delta": "0",
|
|
23
|
+
"amount1Before": "26087635650665564424699143612505016738",
|
|
24
|
+
"amount1Delta": "1000",
|
|
25
|
+
"executionPrice": "-Infinity",
|
|
26
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
27
|
+
"feeGrowthGlobal1X128Delta": "510423550381407695195",
|
|
28
|
+
"poolPriceAfter": "1.7014e+38",
|
|
29
|
+
"poolPriceBefore": "1.7014e+38",
|
|
30
|
+
"tickAfter": 880340,
|
|
31
|
+
"tickBefore": 880340,
|
|
32
|
+
}
|
|
33
|
+
`;
|
|
34
|
+
|
|
35
|
+
exports[`UniswapV3Pool swap tests close to max price swap exactly 1.0000 token0 for token1 1`] = `
|
|
36
|
+
Object {
|
|
37
|
+
"amount0Before": "1",
|
|
38
|
+
"amount0Delta": "1000000000000000000",
|
|
39
|
+
"amount1Before": "26087635650665564424699143612505016738",
|
|
40
|
+
"amount1Delta": "-26087635650665564420687107504180041533",
|
|
41
|
+
"executionPrice": "2.6088e+19",
|
|
42
|
+
"feeGrowthGlobal0X128Delta": "510423550381413479995299567101531162",
|
|
43
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
44
|
+
"poolPriceAfter": "4.0241",
|
|
45
|
+
"poolPriceBefore": "1.7014e+38",
|
|
46
|
+
"tickAfter": 13923,
|
|
47
|
+
"tickBefore": 880340,
|
|
48
|
+
}
|
|
49
|
+
`;
|
|
50
|
+
|
|
51
|
+
exports[`UniswapV3Pool swap tests close to max price swap exactly 1.0000 token0 for token1 to price 0.50000 1`] = `
|
|
52
|
+
Object {
|
|
53
|
+
"amount0Before": "1",
|
|
54
|
+
"amount0Delta": "1000000000000000000",
|
|
55
|
+
"amount1Before": "26087635650665564424699143612505016738",
|
|
56
|
+
"amount1Delta": "-26087635650665564420687107504180041533",
|
|
57
|
+
"executionPrice": "2.6088e+19",
|
|
58
|
+
"feeGrowthGlobal0X128Delta": "510423550381413479995299567101531162",
|
|
59
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
60
|
+
"poolPriceAfter": "4.0241",
|
|
61
|
+
"poolPriceBefore": "1.7014e+38",
|
|
62
|
+
"tickAfter": 13923,
|
|
63
|
+
"tickBefore": 880340,
|
|
64
|
+
}
|
|
65
|
+
`;
|
|
66
|
+
|
|
67
|
+
exports[`UniswapV3Pool swap tests close to max price swap exactly 1.0000 token1 for token0 1`] = `
|
|
68
|
+
Object {
|
|
69
|
+
"amount0Before": "1",
|
|
70
|
+
"amount0Delta": "0",
|
|
71
|
+
"amount1Before": "26087635650665564424699143612505016738",
|
|
72
|
+
"amount1Delta": "1000000000000000000",
|
|
73
|
+
"executionPrice": "-Infinity",
|
|
74
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
75
|
+
"feeGrowthGlobal1X128Delta": "510423550381407695195061911147652317",
|
|
76
|
+
"poolPriceAfter": "1.7014e+38",
|
|
77
|
+
"poolPriceBefore": "1.7014e+38",
|
|
78
|
+
"tickAfter": 880340,
|
|
79
|
+
"tickBefore": 880340,
|
|
80
|
+
}
|
|
81
|
+
`;
|
|
82
|
+
|
|
83
|
+
exports[`UniswapV3Pool swap tests close to max price swap exactly 1.0000 token1 for token0 to price 2.0000 1`] = `
|
|
84
|
+
Object {
|
|
85
|
+
"poolBalance0": "1",
|
|
86
|
+
"poolBalance1": "26087635650665564424699143612505016738",
|
|
87
|
+
"poolPriceBefore": "1.7014e+38",
|
|
88
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
89
|
+
"tickBefore": 880340,
|
|
90
|
+
}
|
|
91
|
+
`;
|
|
92
|
+
|
|
93
|
+
exports[`UniswapV3Pool swap tests close to max price swap token0 for exactly 0.0000000000000010000 token1 1`] = `
|
|
94
|
+
Object {
|
|
95
|
+
"amount0Before": "1",
|
|
96
|
+
"amount0Delta": "2",
|
|
97
|
+
"amount1Before": "26087635650665564424699143612505016738",
|
|
98
|
+
"amount1Delta": "-1000",
|
|
99
|
+
"executionPrice": "500.00",
|
|
100
|
+
"feeGrowthGlobal0X128Delta": "170141183460469231731",
|
|
101
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
102
|
+
"poolPriceAfter": "1.7014e+38",
|
|
103
|
+
"poolPriceBefore": "1.7014e+38",
|
|
104
|
+
"tickAfter": 880340,
|
|
105
|
+
"tickBefore": 880340,
|
|
106
|
+
}
|
|
107
|
+
`;
|
|
108
|
+
|
|
109
|
+
exports[`UniswapV3Pool swap tests close to max price swap token0 for exactly 1.0000 token1 1`] = `
|
|
110
|
+
Object {
|
|
111
|
+
"amount0Before": "1",
|
|
112
|
+
"amount0Delta": "2",
|
|
113
|
+
"amount1Before": "26087635650665564424699143612505016738",
|
|
114
|
+
"amount1Delta": "-1000000000000000000",
|
|
115
|
+
"executionPrice": "5.0000e+17",
|
|
116
|
+
"feeGrowthGlobal0X128Delta": "170141183460469231731",
|
|
117
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
118
|
+
"poolPriceAfter": "1.7014e+38",
|
|
119
|
+
"poolPriceBefore": "1.7014e+38",
|
|
120
|
+
"tickAfter": 880340,
|
|
121
|
+
"tickBefore": 880340,
|
|
122
|
+
}
|
|
123
|
+
`;
|
|
124
|
+
|
|
125
|
+
exports[`UniswapV3Pool swap tests close to max price swap token0 for exactly 1.0000 token1 to price 0.50000 1`] = `
|
|
126
|
+
Object {
|
|
127
|
+
"amount0Before": "1",
|
|
128
|
+
"amount0Delta": "2",
|
|
129
|
+
"amount1Before": "26087635650665564424699143612505016738",
|
|
130
|
+
"amount1Delta": "-1000000000000000000",
|
|
131
|
+
"executionPrice": "5.0000e+17",
|
|
132
|
+
"feeGrowthGlobal0X128Delta": "170141183460469231731",
|
|
133
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
134
|
+
"poolPriceAfter": "1.7014e+38",
|
|
135
|
+
"poolPriceBefore": "1.7014e+38",
|
|
136
|
+
"tickAfter": 880340,
|
|
137
|
+
"tickBefore": 880340,
|
|
138
|
+
}
|
|
139
|
+
`;
|
|
140
|
+
|
|
141
|
+
exports[`UniswapV3Pool swap tests close to max price swap token0 for token1 to price 0.40000 1`] = `
|
|
142
|
+
Object {
|
|
143
|
+
"amount0Before": "1",
|
|
144
|
+
"amount0Delta": "3171793039286238109",
|
|
145
|
+
"amount1Before": "26087635650665564424699143612505016738",
|
|
146
|
+
"amount1Delta": "-26087635650665564423434232548437664977",
|
|
147
|
+
"executionPrice": "8.2249e+18",
|
|
148
|
+
"feeGrowthGlobal0X128Delta": "1618957864187523123655042148763283097",
|
|
149
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
150
|
+
"poolPriceAfter": "0.40000",
|
|
151
|
+
"poolPriceBefore": "1.7014e+38",
|
|
152
|
+
"tickAfter": -9164,
|
|
153
|
+
"tickBefore": 880340,
|
|
154
|
+
}
|
|
155
|
+
`;
|
|
156
|
+
|
|
157
|
+
exports[`UniswapV3Pool swap tests close to max price swap token0 for token1 to price 2.5000 1`] = `
|
|
158
|
+
Object {
|
|
159
|
+
"amount0Before": "1",
|
|
160
|
+
"amount0Delta": "1268717215714495281",
|
|
161
|
+
"amount1Before": "26087635650665564424699143612505016738",
|
|
162
|
+
"amount1Delta": "-26087635650665564421536865952336637378",
|
|
163
|
+
"executionPrice": "2.0562e+19",
|
|
164
|
+
"feeGrowthGlobal0X128Delta": "647583145675012618257449376796101507",
|
|
165
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
166
|
+
"poolPriceAfter": "2.5000",
|
|
167
|
+
"poolPriceBefore": "1.7014e+38",
|
|
168
|
+
"tickAfter": 9163,
|
|
169
|
+
"tickBefore": 880340,
|
|
170
|
+
}
|
|
171
|
+
`;
|
|
172
|
+
|
|
173
|
+
exports[`UniswapV3Pool swap tests close to max price swap token1 for exactly 0.0000000000000010000 token0 1`] = `
|
|
174
|
+
Object {
|
|
175
|
+
"amount0Before": "1",
|
|
176
|
+
"amount0Delta": "0",
|
|
177
|
+
"amount1Before": "26087635650665564424699143612505016738",
|
|
178
|
+
"amount1Delta": "10740898373457544742072477595619363803",
|
|
179
|
+
"executionPrice": "-Infinity",
|
|
180
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
181
|
+
"feeGrowthGlobal1X128Delta": "5482407482066087054477299856254072312542046383926535301",
|
|
182
|
+
"poolPriceAfter": "3.4026e+38",
|
|
183
|
+
"poolPriceBefore": "1.7014e+38",
|
|
184
|
+
"tickAfter": 887271,
|
|
185
|
+
"tickBefore": 880340,
|
|
186
|
+
}
|
|
187
|
+
`;
|
|
188
|
+
|
|
189
|
+
exports[`UniswapV3Pool swap tests close to max price swap token1 for exactly 1.0000 token0 1`] = `
|
|
190
|
+
Object {
|
|
191
|
+
"amount0Before": "1",
|
|
192
|
+
"amount0Delta": "0",
|
|
193
|
+
"amount1Before": "26087635650665564424699143612505016738",
|
|
194
|
+
"amount1Delta": "10740898373457544742072477595619363803",
|
|
195
|
+
"executionPrice": "-Infinity",
|
|
196
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
197
|
+
"feeGrowthGlobal1X128Delta": "5482407482066087054477299856254072312542046383926535301",
|
|
198
|
+
"poolPriceAfter": "3.4026e+38",
|
|
199
|
+
"poolPriceBefore": "1.7014e+38",
|
|
200
|
+
"tickAfter": 887271,
|
|
201
|
+
"tickBefore": 880340,
|
|
202
|
+
}
|
|
203
|
+
`;
|
|
204
|
+
|
|
205
|
+
exports[`UniswapV3Pool swap tests close to max price swap token1 for exactly 1.0000 token0 to price 2.0000 1`] = `
|
|
206
|
+
Object {
|
|
207
|
+
"poolBalance0": "1",
|
|
208
|
+
"poolBalance1": "26087635650665564424699143612505016738",
|
|
209
|
+
"poolPriceBefore": "1.7014e+38",
|
|
210
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
211
|
+
"tickBefore": 880340,
|
|
212
|
+
}
|
|
213
|
+
`;
|
|
214
|
+
|
|
215
|
+
exports[`UniswapV3Pool swap tests close to max price swap token1 for token0 to price 0.40000 1`] = `
|
|
216
|
+
Object {
|
|
217
|
+
"poolBalance0": "1",
|
|
218
|
+
"poolBalance1": "26087635650665564424699143612505016738",
|
|
219
|
+
"poolPriceBefore": "1.7014e+38",
|
|
220
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
221
|
+
"tickBefore": 880340,
|
|
222
|
+
}
|
|
223
|
+
`;
|
|
224
|
+
|
|
225
|
+
exports[`UniswapV3Pool swap tests close to max price swap token1 for token0 to price 2.5000 1`] = `
|
|
226
|
+
Object {
|
|
227
|
+
"poolBalance0": "1",
|
|
228
|
+
"poolBalance1": "26087635650665564424699143612505016738",
|
|
229
|
+
"poolPriceBefore": "1.7014e+38",
|
|
230
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
231
|
+
"tickBefore": 880340,
|
|
232
|
+
}
|
|
233
|
+
`;
|
|
234
|
+
|
|
235
|
+
exports[`UniswapV3Pool swap tests close to min price swap exactly 0.0000000000000010000 token0 for token1 1`] = `
|
|
236
|
+
Object {
|
|
237
|
+
"amount0Before": "26037782196502120275425782622539039026",
|
|
238
|
+
"amount0Delta": "1000",
|
|
239
|
+
"amount1Before": "1",
|
|
240
|
+
"amount1Delta": "0",
|
|
241
|
+
"executionPrice": "0.0000",
|
|
242
|
+
"feeGrowthGlobal0X128Delta": "170141183460469231731687",
|
|
243
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
244
|
+
"poolPriceAfter": "0.0000000000000000000000000000000000000059000",
|
|
245
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000059000",
|
|
246
|
+
"tickAfter": -880303,
|
|
247
|
+
"tickBefore": -880303,
|
|
248
|
+
}
|
|
249
|
+
`;
|
|
250
|
+
|
|
251
|
+
exports[`UniswapV3Pool swap tests close to min price swap exactly 0.0000000000000010000 token1 for token0 1`] = `
|
|
252
|
+
Object {
|
|
253
|
+
"amount0Before": "26037782196502120275425782622539039026",
|
|
254
|
+
"amount0Delta": "-26033697540846965126433148994127431276",
|
|
255
|
+
"amount1Before": "1",
|
|
256
|
+
"amount1Delta": "1000",
|
|
257
|
+
"executionPrice": "0.000000000000000000000000000000000038412",
|
|
258
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
259
|
+
"feeGrowthGlobal1X128Delta": "2381976568446569244235",
|
|
260
|
+
"poolPriceAfter": "0.00000000000000000000000000000023974",
|
|
261
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000059000",
|
|
262
|
+
"tickAfter": -705093,
|
|
263
|
+
"tickBefore": -880303,
|
|
264
|
+
}
|
|
265
|
+
`;
|
|
266
|
+
|
|
267
|
+
exports[`UniswapV3Pool swap tests close to min price swap exactly 1.0000 token0 for token1 1`] = `
|
|
268
|
+
Object {
|
|
269
|
+
"amount0Before": "26037782196502120275425782622539039026",
|
|
270
|
+
"amount0Delta": "1000000000000000000",
|
|
271
|
+
"amount1Before": "1",
|
|
272
|
+
"amount1Delta": "0",
|
|
273
|
+
"executionPrice": "0.0000",
|
|
274
|
+
"feeGrowthGlobal0X128Delta": "170141183460469231731687303715884105728",
|
|
275
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
276
|
+
"poolPriceAfter": "0.0000000000000000000000000000000000000059000",
|
|
277
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000059000",
|
|
278
|
+
"tickAfter": -880303,
|
|
279
|
+
"tickBefore": -880303,
|
|
280
|
+
}
|
|
281
|
+
`;
|
|
282
|
+
|
|
283
|
+
exports[`UniswapV3Pool swap tests close to min price swap exactly 1.0000 token0 for token1 to price 0.50000 1`] = `
|
|
284
|
+
Object {
|
|
285
|
+
"poolBalance0": "26037782196502120275425782622539039026",
|
|
286
|
+
"poolBalance1": "1",
|
|
287
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000059000",
|
|
288
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
289
|
+
"tickBefore": -880303,
|
|
290
|
+
}
|
|
291
|
+
`;
|
|
292
|
+
|
|
293
|
+
exports[`UniswapV3Pool swap tests close to min price swap exactly 1.0000 token1 for token0 1`] = `
|
|
294
|
+
Object {
|
|
295
|
+
"amount0Before": "26037782196502120275425782622539039026",
|
|
296
|
+
"amount0Delta": "-26037782196502120271413746514214063808",
|
|
297
|
+
"amount1Before": "1",
|
|
298
|
+
"amount1Delta": "1000000000000000000",
|
|
299
|
+
"executionPrice": "0.000000000000000000038406",
|
|
300
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
301
|
+
"feeGrowthGlobal1X128Delta": "510423550381413820277666488039994629",
|
|
302
|
+
"poolPriceAfter": "0.24850",
|
|
303
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000059000",
|
|
304
|
+
"tickAfter": -13924,
|
|
305
|
+
"tickBefore": -880303,
|
|
306
|
+
}
|
|
307
|
+
`;
|
|
308
|
+
|
|
309
|
+
exports[`UniswapV3Pool swap tests close to min price swap exactly 1.0000 token1 for token0 to price 2.0000 1`] = `
|
|
310
|
+
Object {
|
|
311
|
+
"amount0Before": "26037782196502120275425782622539039026",
|
|
312
|
+
"amount0Delta": "-26037782196502120271413746514214063808",
|
|
313
|
+
"amount1Before": "1",
|
|
314
|
+
"amount1Delta": "1000000000000000000",
|
|
315
|
+
"executionPrice": "0.000000000000000000038406",
|
|
316
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
317
|
+
"feeGrowthGlobal1X128Delta": "510423550381413820277666488039994629",
|
|
318
|
+
"poolPriceAfter": "0.24850",
|
|
319
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000059000",
|
|
320
|
+
"tickAfter": -13924,
|
|
321
|
+
"tickBefore": -880303,
|
|
322
|
+
}
|
|
323
|
+
`;
|
|
324
|
+
|
|
325
|
+
exports[`UniswapV3Pool swap tests close to min price swap token0 for exactly 0.0000000000000010000 token1 1`] = `
|
|
326
|
+
Object {
|
|
327
|
+
"amount0Before": "26037782196502120275425782622539039026",
|
|
328
|
+
"amount0Delta": "10790901831095468191587263901270792610",
|
|
329
|
+
"amount1Before": "1",
|
|
330
|
+
"amount1Delta": "0",
|
|
331
|
+
"executionPrice": "0.0000",
|
|
332
|
+
"feeGrowthGlobal0X128Delta": "5507930424444982259736347157352787128931407551935325049",
|
|
333
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
334
|
+
"poolPriceAfter": "0.0000000000000000000000000000000000000029390",
|
|
335
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000059000",
|
|
336
|
+
"tickAfter": -887272,
|
|
337
|
+
"tickBefore": -880303,
|
|
338
|
+
}
|
|
339
|
+
`;
|
|
340
|
+
|
|
341
|
+
exports[`UniswapV3Pool swap tests close to min price swap token0 for exactly 1.0000 token1 1`] = `
|
|
342
|
+
Object {
|
|
343
|
+
"amount0Before": "26037782196502120275425782622539039026",
|
|
344
|
+
"amount0Delta": "10790901831095468191587263901270792610",
|
|
345
|
+
"amount1Before": "1",
|
|
346
|
+
"amount1Delta": "0",
|
|
347
|
+
"executionPrice": "0.0000",
|
|
348
|
+
"feeGrowthGlobal0X128Delta": "5507930424444982259736347157352787128931407551935325049",
|
|
349
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
350
|
+
"poolPriceAfter": "0.0000000000000000000000000000000000000029390",
|
|
351
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000059000",
|
|
352
|
+
"tickAfter": -887272,
|
|
353
|
+
"tickBefore": -880303,
|
|
354
|
+
}
|
|
355
|
+
`;
|
|
356
|
+
|
|
357
|
+
exports[`UniswapV3Pool swap tests close to min price swap token0 for exactly 1.0000 token1 to price 0.50000 1`] = `
|
|
358
|
+
Object {
|
|
359
|
+
"poolBalance0": "26037782196502120275425782622539039026",
|
|
360
|
+
"poolBalance1": "1",
|
|
361
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000059000",
|
|
362
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
363
|
+
"tickBefore": -880303,
|
|
364
|
+
}
|
|
365
|
+
`;
|
|
366
|
+
|
|
367
|
+
exports[`UniswapV3Pool swap tests close to min price swap token0 for token1 to price 0.40000 1`] = `
|
|
368
|
+
Object {
|
|
369
|
+
"poolBalance0": "26037782196502120275425782622539039026",
|
|
370
|
+
"poolBalance1": "1",
|
|
371
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000059000",
|
|
372
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
373
|
+
"tickBefore": -880303,
|
|
374
|
+
}
|
|
375
|
+
`;
|
|
376
|
+
|
|
377
|
+
exports[`UniswapV3Pool swap tests close to min price swap token0 for token1 to price 2.5000 1`] = `
|
|
378
|
+
Object {
|
|
379
|
+
"poolBalance0": "26037782196502120275425782622539039026",
|
|
380
|
+
"poolBalance1": "1",
|
|
381
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000059000",
|
|
382
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
383
|
+
"tickBefore": -880303,
|
|
384
|
+
}
|
|
385
|
+
`;
|
|
386
|
+
|
|
387
|
+
exports[`UniswapV3Pool swap tests close to min price swap token1 for exactly 0.0000000000000010000 token0 1`] = `
|
|
388
|
+
Object {
|
|
389
|
+
"amount0Before": "26037782196502120275425782622539039026",
|
|
390
|
+
"amount0Delta": "-1000",
|
|
391
|
+
"amount1Before": "1",
|
|
392
|
+
"amount1Delta": "2",
|
|
393
|
+
"executionPrice": "0.0020000",
|
|
394
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
395
|
+
"feeGrowthGlobal1X128Delta": "170141183460469231731",
|
|
396
|
+
"poolPriceAfter": "0.0000000000000000000000000000000000000059000",
|
|
397
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000059000",
|
|
398
|
+
"tickAfter": -880303,
|
|
399
|
+
"tickBefore": -880303,
|
|
400
|
+
}
|
|
401
|
+
`;
|
|
402
|
+
|
|
403
|
+
exports[`UniswapV3Pool swap tests close to min price swap token1 for exactly 1.0000 token0 1`] = `
|
|
404
|
+
Object {
|
|
405
|
+
"amount0Before": "26037782196502120275425782622539039026",
|
|
406
|
+
"amount0Delta": "-1000000000000000000",
|
|
407
|
+
"amount1Before": "1",
|
|
408
|
+
"amount1Delta": "2",
|
|
409
|
+
"executionPrice": "0.0000000000000000020000",
|
|
410
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
411
|
+
"feeGrowthGlobal1X128Delta": "170141183460469231731",
|
|
412
|
+
"poolPriceAfter": "0.0000000000000000000000000000000000000059000",
|
|
413
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000059000",
|
|
414
|
+
"tickAfter": -880303,
|
|
415
|
+
"tickBefore": -880303,
|
|
416
|
+
}
|
|
417
|
+
`;
|
|
418
|
+
|
|
419
|
+
exports[`UniswapV3Pool swap tests close to min price swap token1 for exactly 1.0000 token0 to price 2.0000 1`] = `
|
|
420
|
+
Object {
|
|
421
|
+
"amount0Before": "26037782196502120275425782622539039026",
|
|
422
|
+
"amount0Delta": "-1000000000000000000",
|
|
423
|
+
"amount1Before": "1",
|
|
424
|
+
"amount1Delta": "2",
|
|
425
|
+
"executionPrice": "0.0000000000000000020000",
|
|
426
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
427
|
+
"feeGrowthGlobal1X128Delta": "170141183460469231731",
|
|
428
|
+
"poolPriceAfter": "0.0000000000000000000000000000000000000059000",
|
|
429
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000059000",
|
|
430
|
+
"tickAfter": -880303,
|
|
431
|
+
"tickBefore": -880303,
|
|
432
|
+
}
|
|
433
|
+
`;
|
|
434
|
+
|
|
435
|
+
exports[`UniswapV3Pool swap tests close to min price swap token1 for token0 to price 0.40000 1`] = `
|
|
436
|
+
Object {
|
|
437
|
+
"amount0Before": "26037782196502120275425782622539039026",
|
|
438
|
+
"amount0Delta": "-26037782196502120272263504962370659661",
|
|
439
|
+
"amount1Before": "1",
|
|
440
|
+
"amount1Delta": "1268717215714495283",
|
|
441
|
+
"executionPrice": "0.000000000000000000048726",
|
|
442
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
443
|
+
"feeGrowthGlobal1X128Delta": "647583145675012958539816297734564973",
|
|
444
|
+
"poolPriceAfter": "0.40000",
|
|
445
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000059000",
|
|
446
|
+
"tickAfter": -9164,
|
|
447
|
+
"tickBefore": -880303,
|
|
448
|
+
}
|
|
449
|
+
`;
|
|
450
|
+
|
|
451
|
+
exports[`UniswapV3Pool swap tests close to min price swap token1 for token0 to price 2.5000 1`] = `
|
|
452
|
+
Object {
|
|
453
|
+
"amount0Before": "26037782196502120275425782622539039026",
|
|
454
|
+
"amount0Delta": "-26037782196502120274160871558471687260",
|
|
455
|
+
"amount1Before": "1",
|
|
456
|
+
"amount1Delta": "3171793039286238112",
|
|
457
|
+
"executionPrice": "0.00000000000000000012182",
|
|
458
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
459
|
+
"feeGrowthGlobal1X128Delta": "1618957864187523634078592530170978294",
|
|
460
|
+
"poolPriceAfter": "2.5000",
|
|
461
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000059000",
|
|
462
|
+
"tickAfter": 9163,
|
|
463
|
+
"tickBefore": -880303,
|
|
464
|
+
}
|
|
465
|
+
`;
|
|
466
|
+
|
|
467
|
+
exports[`UniswapV3Pool swap tests high fee, 1:1 price, 2e18 max range liquidity swap exactly 0.0000000000000010000 token0 for token1 1`] = `
|
|
468
|
+
Object {
|
|
469
|
+
"amount0Before": "2000000000000000000",
|
|
470
|
+
"amount0Delta": "1000",
|
|
471
|
+
"amount1Before": "2000000000000000000",
|
|
472
|
+
"amount1Delta": "-989",
|
|
473
|
+
"executionPrice": "0.98900",
|
|
474
|
+
"feeGrowthGlobal0X128Delta": "1701411834604692317316",
|
|
475
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
476
|
+
"poolPriceAfter": "1.0000",
|
|
477
|
+
"poolPriceBefore": "1.0000",
|
|
478
|
+
"tickAfter": -1,
|
|
479
|
+
"tickBefore": 0,
|
|
480
|
+
}
|
|
481
|
+
`;
|
|
482
|
+
|
|
483
|
+
exports[`UniswapV3Pool swap tests high fee, 1:1 price, 2e18 max range liquidity swap exactly 0.0000000000000010000 token1 for token0 1`] = `
|
|
484
|
+
Object {
|
|
485
|
+
"amount0Before": "2000000000000000000",
|
|
486
|
+
"amount0Delta": "-989",
|
|
487
|
+
"amount1Before": "2000000000000000000",
|
|
488
|
+
"amount1Delta": "1000",
|
|
489
|
+
"executionPrice": "1.0111",
|
|
490
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
491
|
+
"feeGrowthGlobal1X128Delta": "1701411834604692317316",
|
|
492
|
+
"poolPriceAfter": "1.0000",
|
|
493
|
+
"poolPriceBefore": "1.0000",
|
|
494
|
+
"tickAfter": 0,
|
|
495
|
+
"tickBefore": 0,
|
|
496
|
+
}
|
|
497
|
+
`;
|
|
498
|
+
|
|
499
|
+
exports[`UniswapV3Pool swap tests high fee, 1:1 price, 2e18 max range liquidity swap exactly 1.0000 token0 for token1 1`] = `
|
|
500
|
+
Object {
|
|
501
|
+
"amount0Before": "2000000000000000000",
|
|
502
|
+
"amount0Delta": "1000000000000000000",
|
|
503
|
+
"amount1Before": "2000000000000000000",
|
|
504
|
+
"amount1Delta": "-662207357859531772",
|
|
505
|
+
"executionPrice": "0.66221",
|
|
506
|
+
"feeGrowthGlobal0X128Delta": "1701411834604692317316873037158841057",
|
|
507
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
508
|
+
"poolPriceAfter": "0.44742",
|
|
509
|
+
"poolPriceBefore": "1.0000",
|
|
510
|
+
"tickAfter": -8043,
|
|
511
|
+
"tickBefore": 0,
|
|
512
|
+
}
|
|
513
|
+
`;
|
|
514
|
+
|
|
515
|
+
exports[`UniswapV3Pool swap tests high fee, 1:1 price, 2e18 max range liquidity swap exactly 1.0000 token0 for token1 to price 0.50000 1`] = `
|
|
516
|
+
Object {
|
|
517
|
+
"amount0Before": "2000000000000000000",
|
|
518
|
+
"amount0Delta": "836795075501202120",
|
|
519
|
+
"amount1Before": "2000000000000000000",
|
|
520
|
+
"amount1Delta": "-585786437626904951",
|
|
521
|
+
"executionPrice": "0.70004",
|
|
522
|
+
"feeGrowthGlobal0X128Delta": "1423733044596672457631004491657125052",
|
|
523
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
524
|
+
"poolPriceAfter": "0.50000",
|
|
525
|
+
"poolPriceBefore": "1.0000",
|
|
526
|
+
"tickAfter": -6932,
|
|
527
|
+
"tickBefore": 0,
|
|
528
|
+
}
|
|
529
|
+
`;
|
|
530
|
+
|
|
531
|
+
exports[`UniswapV3Pool swap tests high fee, 1:1 price, 2e18 max range liquidity swap exactly 1.0000 token1 for token0 1`] = `
|
|
532
|
+
Object {
|
|
533
|
+
"amount0Before": "2000000000000000000",
|
|
534
|
+
"amount0Delta": "-662207357859531772",
|
|
535
|
+
"amount1Before": "2000000000000000000",
|
|
536
|
+
"amount1Delta": "1000000000000000000",
|
|
537
|
+
"executionPrice": "1.5101",
|
|
538
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
539
|
+
"feeGrowthGlobal1X128Delta": "1701411834604692317316873037158841057",
|
|
540
|
+
"poolPriceAfter": "2.2350",
|
|
541
|
+
"poolPriceBefore": "1.0000",
|
|
542
|
+
"tickAfter": 8042,
|
|
543
|
+
"tickBefore": 0,
|
|
544
|
+
}
|
|
545
|
+
`;
|
|
546
|
+
|
|
547
|
+
exports[`UniswapV3Pool swap tests high fee, 1:1 price, 2e18 max range liquidity swap exactly 1.0000 token1 for token0 to price 2.0000 1`] = `
|
|
548
|
+
Object {
|
|
549
|
+
"amount0Before": "2000000000000000000",
|
|
550
|
+
"amount0Delta": "-585786437626904951",
|
|
551
|
+
"amount1Before": "2000000000000000000",
|
|
552
|
+
"amount1Delta": "836795075501202120",
|
|
553
|
+
"executionPrice": "1.4285",
|
|
554
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
555
|
+
"feeGrowthGlobal1X128Delta": "1423733044596672457631004491657125052",
|
|
556
|
+
"poolPriceAfter": "2.0000",
|
|
557
|
+
"poolPriceBefore": "1.0000",
|
|
558
|
+
"tickAfter": 6931,
|
|
559
|
+
"tickBefore": 0,
|
|
560
|
+
}
|
|
561
|
+
`;
|
|
562
|
+
|
|
563
|
+
exports[`UniswapV3Pool swap tests high fee, 1:1 price, 2e18 max range liquidity swap token0 for exactly 0.0000000000000010000 token1 1`] = `
|
|
564
|
+
Object {
|
|
565
|
+
"amount0Before": "2000000000000000000",
|
|
566
|
+
"amount0Delta": "1012",
|
|
567
|
+
"amount1Before": "2000000000000000000",
|
|
568
|
+
"amount1Delta": "-1000",
|
|
569
|
+
"executionPrice": "0.98814",
|
|
570
|
+
"feeGrowthGlobal0X128Delta": "1871553018065161549048",
|
|
571
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
572
|
+
"poolPriceAfter": "1.0000",
|
|
573
|
+
"poolPriceBefore": "1.0000",
|
|
574
|
+
"tickAfter": -1,
|
|
575
|
+
"tickBefore": 0,
|
|
576
|
+
}
|
|
577
|
+
`;
|
|
578
|
+
|
|
579
|
+
exports[`UniswapV3Pool swap tests high fee, 1:1 price, 2e18 max range liquidity swap token0 for exactly 1.0000 token1 1`] = `
|
|
580
|
+
Object {
|
|
581
|
+
"amount0Before": "2000000000000000000",
|
|
582
|
+
"amount0Delta": "2020202020202020203",
|
|
583
|
+
"amount1Before": "2000000000000000000",
|
|
584
|
+
"amount1Delta": "-1000000000000000000",
|
|
585
|
+
"executionPrice": "0.49500",
|
|
586
|
+
"feeGrowthGlobal0X128Delta": "3437195625464025050172418213103875650",
|
|
587
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
588
|
+
"poolPriceAfter": "0.25000",
|
|
589
|
+
"poolPriceBefore": "1.0000",
|
|
590
|
+
"tickAfter": -13864,
|
|
591
|
+
"tickBefore": 0,
|
|
592
|
+
}
|
|
593
|
+
`;
|
|
594
|
+
|
|
595
|
+
exports[`UniswapV3Pool swap tests high fee, 1:1 price, 2e18 max range liquidity swap token0 for exactly 1.0000 token1 to price 0.50000 1`] = `
|
|
596
|
+
Object {
|
|
597
|
+
"amount0Before": "2000000000000000000",
|
|
598
|
+
"amount0Delta": "836795075501202120",
|
|
599
|
+
"amount1Before": "2000000000000000000",
|
|
600
|
+
"amount1Delta": "-585786437626904951",
|
|
601
|
+
"executionPrice": "0.70004",
|
|
602
|
+
"feeGrowthGlobal0X128Delta": "1423733044596672457631004491657125052",
|
|
603
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
604
|
+
"poolPriceAfter": "0.50000",
|
|
605
|
+
"poolPriceBefore": "1.0000",
|
|
606
|
+
"tickAfter": -6932,
|
|
607
|
+
"tickBefore": 0,
|
|
608
|
+
}
|
|
609
|
+
`;
|
|
610
|
+
|
|
611
|
+
exports[`UniswapV3Pool swap tests high fee, 1:1 price, 2e18 max range liquidity swap token0 for token1 to price 0.40000 1`] = `
|
|
612
|
+
Object {
|
|
613
|
+
"amount0Before": "2000000000000000000",
|
|
614
|
+
"amount0Delta": "1174017838553918518",
|
|
615
|
+
"amount1Before": "2000000000000000000",
|
|
616
|
+
"amount1Delta": "-735088935932648267",
|
|
617
|
+
"executionPrice": "0.62613",
|
|
618
|
+
"feeGrowthGlobal0X128Delta": "1997487844552658120479227965844634309",
|
|
619
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
620
|
+
"poolPriceAfter": "0.40000",
|
|
621
|
+
"poolPriceBefore": "1.0000",
|
|
622
|
+
"tickAfter": -9164,
|
|
623
|
+
"tickBefore": 0,
|
|
624
|
+
}
|
|
625
|
+
`;
|
|
626
|
+
|
|
627
|
+
exports[`UniswapV3Pool swap tests high fee, 1:1 price, 2e18 max range liquidity swap token0 for token1 to price 2.5000 1`] = `
|
|
628
|
+
Object {
|
|
629
|
+
"poolBalance0": "2000000000000000000",
|
|
630
|
+
"poolBalance1": "2000000000000000000",
|
|
631
|
+
"poolPriceBefore": "1.0000",
|
|
632
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
633
|
+
"tickBefore": 0,
|
|
634
|
+
}
|
|
635
|
+
`;
|
|
636
|
+
|
|
637
|
+
exports[`UniswapV3Pool swap tests high fee, 1:1 price, 2e18 max range liquidity swap token1 for exactly 0.0000000000000010000 token0 1`] = `
|
|
638
|
+
Object {
|
|
639
|
+
"amount0Before": "2000000000000000000",
|
|
640
|
+
"amount0Delta": "-1000",
|
|
641
|
+
"amount1Before": "2000000000000000000",
|
|
642
|
+
"amount1Delta": "1012",
|
|
643
|
+
"executionPrice": "1.0120",
|
|
644
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
645
|
+
"feeGrowthGlobal1X128Delta": "1871553018065161549048",
|
|
646
|
+
"poolPriceAfter": "1.0000",
|
|
647
|
+
"poolPriceBefore": "1.0000",
|
|
648
|
+
"tickAfter": 0,
|
|
649
|
+
"tickBefore": 0,
|
|
650
|
+
}
|
|
651
|
+
`;
|
|
652
|
+
|
|
653
|
+
exports[`UniswapV3Pool swap tests high fee, 1:1 price, 2e18 max range liquidity swap token1 for exactly 1.0000 token0 1`] = `
|
|
654
|
+
Object {
|
|
655
|
+
"amount0Before": "2000000000000000000",
|
|
656
|
+
"amount0Delta": "-1000000000000000000",
|
|
657
|
+
"amount1Before": "2000000000000000000",
|
|
658
|
+
"amount1Delta": "2020202020202020203",
|
|
659
|
+
"executionPrice": "2.0202",
|
|
660
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
661
|
+
"feeGrowthGlobal1X128Delta": "3437195625464025050172418213103875650",
|
|
662
|
+
"poolPriceAfter": "4.0000",
|
|
663
|
+
"poolPriceBefore": "1.0000",
|
|
664
|
+
"tickAfter": 13863,
|
|
665
|
+
"tickBefore": 0,
|
|
666
|
+
}
|
|
667
|
+
`;
|
|
668
|
+
|
|
669
|
+
exports[`UniswapV3Pool swap tests high fee, 1:1 price, 2e18 max range liquidity swap token1 for exactly 1.0000 token0 to price 2.0000 1`] = `
|
|
670
|
+
Object {
|
|
671
|
+
"amount0Before": "2000000000000000000",
|
|
672
|
+
"amount0Delta": "-585786437626904951",
|
|
673
|
+
"amount1Before": "2000000000000000000",
|
|
674
|
+
"amount1Delta": "836795075501202120",
|
|
675
|
+
"executionPrice": "1.4285",
|
|
676
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
677
|
+
"feeGrowthGlobal1X128Delta": "1423733044596672457631004491657125052",
|
|
678
|
+
"poolPriceAfter": "2.0000",
|
|
679
|
+
"poolPriceBefore": "1.0000",
|
|
680
|
+
"tickAfter": 6931,
|
|
681
|
+
"tickBefore": 0,
|
|
682
|
+
}
|
|
683
|
+
`;
|
|
684
|
+
|
|
685
|
+
exports[`UniswapV3Pool swap tests high fee, 1:1 price, 2e18 max range liquidity swap token1 for token0 to price 0.40000 1`] = `
|
|
686
|
+
Object {
|
|
687
|
+
"poolBalance0": "2000000000000000000",
|
|
688
|
+
"poolBalance1": "2000000000000000000",
|
|
689
|
+
"poolPriceBefore": "1.0000",
|
|
690
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
691
|
+
"tickBefore": 0,
|
|
692
|
+
}
|
|
693
|
+
`;
|
|
694
|
+
|
|
695
|
+
exports[`UniswapV3Pool swap tests high fee, 1:1 price, 2e18 max range liquidity swap token1 for token0 to price 2.5000 1`] = `
|
|
696
|
+
Object {
|
|
697
|
+
"amount0Before": "2000000000000000000",
|
|
698
|
+
"amount0Delta": "-735088935932648267",
|
|
699
|
+
"amount1Before": "2000000000000000000",
|
|
700
|
+
"amount1Delta": "1174017838553918518",
|
|
701
|
+
"executionPrice": "1.5971",
|
|
702
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
703
|
+
"feeGrowthGlobal1X128Delta": "1997487844552658120479227965844634309",
|
|
704
|
+
"poolPriceAfter": "2.5000",
|
|
705
|
+
"poolPriceBefore": "1.0000",
|
|
706
|
+
"tickAfter": 9163,
|
|
707
|
+
"tickBefore": 0,
|
|
708
|
+
}
|
|
709
|
+
`;
|
|
710
|
+
|
|
711
|
+
exports[`UniswapV3Pool swap tests initialized at the max ratio swap exactly 0.0000000000000010000 token0 for token1 1`] = `
|
|
712
|
+
Object {
|
|
713
|
+
"amount0Before": "0",
|
|
714
|
+
"amount0Delta": "1000",
|
|
715
|
+
"amount1Before": "36796311329002736532545403775337522448",
|
|
716
|
+
"amount1Delta": "-36792225529204286454178948640580261338",
|
|
717
|
+
"executionPrice": "3.6792e+34",
|
|
718
|
+
"feeGrowthGlobal0X128Delta": "2381976568446569244235",
|
|
719
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
720
|
+
"poolPriceAfter": "4.1734e+30",
|
|
721
|
+
"poolPriceBefore": "3.4026e+38",
|
|
722
|
+
"tickAfter": 705098,
|
|
723
|
+
"tickBefore": 887271,
|
|
724
|
+
}
|
|
725
|
+
`;
|
|
726
|
+
|
|
727
|
+
exports[`UniswapV3Pool swap tests initialized at the max ratio swap exactly 0.0000000000000010000 token1 for token0 1`] = `
|
|
728
|
+
Object {
|
|
729
|
+
"poolBalance0": "0",
|
|
730
|
+
"poolBalance1": "36796311329002736532545403775337522448",
|
|
731
|
+
"poolPriceBefore": "3.4026e+38",
|
|
732
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
733
|
+
"tickBefore": 887271,
|
|
734
|
+
}
|
|
735
|
+
`;
|
|
736
|
+
|
|
737
|
+
exports[`UniswapV3Pool swap tests initialized at the max ratio swap exactly 1.0000 token0 for token1 1`] = `
|
|
738
|
+
Object {
|
|
739
|
+
"amount0Before": "0",
|
|
740
|
+
"amount0Delta": "1000000000000000000",
|
|
741
|
+
"amount1Before": "36796311329002736532545403775337522448",
|
|
742
|
+
"amount1Delta": "-36796311329002736528533367667012547243",
|
|
743
|
+
"executionPrice": "3.6796e+19",
|
|
744
|
+
"feeGrowthGlobal0X128Delta": "510423550381413479995299567101531162",
|
|
745
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
746
|
+
"poolPriceAfter": "4.0241",
|
|
747
|
+
"poolPriceBefore": "3.4026e+38",
|
|
748
|
+
"tickAfter": 13923,
|
|
749
|
+
"tickBefore": 887271,
|
|
750
|
+
}
|
|
751
|
+
`;
|
|
752
|
+
|
|
753
|
+
exports[`UniswapV3Pool swap tests initialized at the max ratio swap exactly 1.0000 token0 for token1 to price 0.50000 1`] = `
|
|
754
|
+
Object {
|
|
755
|
+
"amount0Before": "0",
|
|
756
|
+
"amount0Delta": "1000000000000000000",
|
|
757
|
+
"amount1Before": "36796311329002736532545403775337522448",
|
|
758
|
+
"amount1Delta": "-36796311329002736528533367667012547243",
|
|
759
|
+
"executionPrice": "3.6796e+19",
|
|
760
|
+
"feeGrowthGlobal0X128Delta": "510423550381413479995299567101531162",
|
|
761
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
762
|
+
"poolPriceAfter": "4.0241",
|
|
763
|
+
"poolPriceBefore": "3.4026e+38",
|
|
764
|
+
"tickAfter": 13923,
|
|
765
|
+
"tickBefore": 887271,
|
|
766
|
+
}
|
|
767
|
+
`;
|
|
768
|
+
|
|
769
|
+
exports[`UniswapV3Pool swap tests initialized at the max ratio swap exactly 1.0000 token1 for token0 1`] = `
|
|
770
|
+
Object {
|
|
771
|
+
"poolBalance0": "0",
|
|
772
|
+
"poolBalance1": "36796311329002736532545403775337522448",
|
|
773
|
+
"poolPriceBefore": "3.4026e+38",
|
|
774
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
775
|
+
"tickBefore": 887271,
|
|
776
|
+
}
|
|
777
|
+
`;
|
|
778
|
+
|
|
779
|
+
exports[`UniswapV3Pool swap tests initialized at the max ratio swap exactly 1.0000 token1 for token0 to price 2.0000 1`] = `
|
|
780
|
+
Object {
|
|
781
|
+
"poolBalance0": "0",
|
|
782
|
+
"poolBalance1": "36796311329002736532545403775337522448",
|
|
783
|
+
"poolPriceBefore": "3.4026e+38",
|
|
784
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
785
|
+
"tickBefore": 887271,
|
|
786
|
+
}
|
|
787
|
+
`;
|
|
788
|
+
|
|
789
|
+
exports[`UniswapV3Pool swap tests initialized at the max ratio swap token0 for exactly 0.0000000000000010000 token1 1`] = `
|
|
790
|
+
Object {
|
|
791
|
+
"amount0Before": "0",
|
|
792
|
+
"amount0Delta": "2",
|
|
793
|
+
"amount1Before": "36796311329002736532545403775337522448",
|
|
794
|
+
"amount1Delta": "-1000",
|
|
795
|
+
"executionPrice": "500.00",
|
|
796
|
+
"feeGrowthGlobal0X128Delta": "170141183460469231731",
|
|
797
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
798
|
+
"poolPriceAfter": "3.3849e+38",
|
|
799
|
+
"poolPriceBefore": "3.4026e+38",
|
|
800
|
+
"tickAfter": 887219,
|
|
801
|
+
"tickBefore": 887271,
|
|
802
|
+
}
|
|
803
|
+
`;
|
|
804
|
+
|
|
805
|
+
exports[`UniswapV3Pool swap tests initialized at the max ratio swap token0 for exactly 1.0000 token1 1`] = `
|
|
806
|
+
Object {
|
|
807
|
+
"amount0Before": "0",
|
|
808
|
+
"amount0Delta": "2",
|
|
809
|
+
"amount1Before": "36796311329002736532545403775337522448",
|
|
810
|
+
"amount1Delta": "-1000000000000000000",
|
|
811
|
+
"executionPrice": "5.0000e+17",
|
|
812
|
+
"feeGrowthGlobal0X128Delta": "170141183460469231731",
|
|
813
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
814
|
+
"poolPriceAfter": "3.3849e+38",
|
|
815
|
+
"poolPriceBefore": "3.4026e+38",
|
|
816
|
+
"tickAfter": 887219,
|
|
817
|
+
"tickBefore": 887271,
|
|
818
|
+
}
|
|
819
|
+
`;
|
|
820
|
+
|
|
821
|
+
exports[`UniswapV3Pool swap tests initialized at the max ratio swap token0 for exactly 1.0000 token1 to price 0.50000 1`] = `
|
|
822
|
+
Object {
|
|
823
|
+
"amount0Before": "0",
|
|
824
|
+
"amount0Delta": "2",
|
|
825
|
+
"amount1Before": "36796311329002736532545403775337522448",
|
|
826
|
+
"amount1Delta": "-1000000000000000000",
|
|
827
|
+
"executionPrice": "5.0000e+17",
|
|
828
|
+
"feeGrowthGlobal0X128Delta": "170141183460469231731",
|
|
829
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
830
|
+
"poolPriceAfter": "3.3849e+38",
|
|
831
|
+
"poolPriceBefore": "3.4026e+38",
|
|
832
|
+
"tickAfter": 887219,
|
|
833
|
+
"tickBefore": 887271,
|
|
834
|
+
}
|
|
835
|
+
`;
|
|
836
|
+
|
|
837
|
+
exports[`UniswapV3Pool swap tests initialized at the max ratio swap token0 for token1 to price 0.40000 1`] = `
|
|
838
|
+
Object {
|
|
839
|
+
"amount0Before": "0",
|
|
840
|
+
"amount0Delta": "3171793039286238109",
|
|
841
|
+
"amount1Before": "36796311329002736532545403775337522448",
|
|
842
|
+
"amount1Delta": "-36796311329002736531280492711270170687",
|
|
843
|
+
"executionPrice": "1.1601e+19",
|
|
844
|
+
"feeGrowthGlobal0X128Delta": "1618957864187523123655042148763283097",
|
|
845
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
846
|
+
"poolPriceAfter": "0.40000",
|
|
847
|
+
"poolPriceBefore": "3.4026e+38",
|
|
848
|
+
"tickAfter": -9164,
|
|
849
|
+
"tickBefore": 887271,
|
|
850
|
+
}
|
|
851
|
+
`;
|
|
852
|
+
|
|
853
|
+
exports[`UniswapV3Pool swap tests initialized at the max ratio swap token0 for token1 to price 2.5000 1`] = `
|
|
854
|
+
Object {
|
|
855
|
+
"amount0Before": "0",
|
|
856
|
+
"amount0Delta": "1268717215714495281",
|
|
857
|
+
"amount1Before": "36796311329002736532545403775337522448",
|
|
858
|
+
"amount1Delta": "-36796311329002736529383126115169143088",
|
|
859
|
+
"executionPrice": "2.9003e+19",
|
|
860
|
+
"feeGrowthGlobal0X128Delta": "647583145675012618257449376796101507",
|
|
861
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
862
|
+
"poolPriceAfter": "2.5000",
|
|
863
|
+
"poolPriceBefore": "3.4026e+38",
|
|
864
|
+
"tickAfter": 9163,
|
|
865
|
+
"tickBefore": 887271,
|
|
866
|
+
}
|
|
867
|
+
`;
|
|
868
|
+
|
|
869
|
+
exports[`UniswapV3Pool swap tests initialized at the max ratio swap token1 for exactly 0.0000000000000010000 token0 1`] = `
|
|
870
|
+
Object {
|
|
871
|
+
"poolBalance0": "0",
|
|
872
|
+
"poolBalance1": "36796311329002736532545403775337522448",
|
|
873
|
+
"poolPriceBefore": "3.4026e+38",
|
|
874
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
875
|
+
"tickBefore": 887271,
|
|
876
|
+
}
|
|
877
|
+
`;
|
|
878
|
+
|
|
879
|
+
exports[`UniswapV3Pool swap tests initialized at the max ratio swap token1 for exactly 1.0000 token0 1`] = `
|
|
880
|
+
Object {
|
|
881
|
+
"poolBalance0": "0",
|
|
882
|
+
"poolBalance1": "36796311329002736532545403775337522448",
|
|
883
|
+
"poolPriceBefore": "3.4026e+38",
|
|
884
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
885
|
+
"tickBefore": 887271,
|
|
886
|
+
}
|
|
887
|
+
`;
|
|
888
|
+
|
|
889
|
+
exports[`UniswapV3Pool swap tests initialized at the max ratio swap token1 for exactly 1.0000 token0 to price 2.0000 1`] = `
|
|
890
|
+
Object {
|
|
891
|
+
"poolBalance0": "0",
|
|
892
|
+
"poolBalance1": "36796311329002736532545403775337522448",
|
|
893
|
+
"poolPriceBefore": "3.4026e+38",
|
|
894
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
895
|
+
"tickBefore": 887271,
|
|
896
|
+
}
|
|
897
|
+
`;
|
|
898
|
+
|
|
899
|
+
exports[`UniswapV3Pool swap tests initialized at the max ratio swap token1 for token0 to price 0.40000 1`] = `
|
|
900
|
+
Object {
|
|
901
|
+
"poolBalance0": "0",
|
|
902
|
+
"poolBalance1": "36796311329002736532545403775337522448",
|
|
903
|
+
"poolPriceBefore": "3.4026e+38",
|
|
904
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
905
|
+
"tickBefore": 887271,
|
|
906
|
+
}
|
|
907
|
+
`;
|
|
908
|
+
|
|
909
|
+
exports[`UniswapV3Pool swap tests initialized at the max ratio swap token1 for token0 to price 2.5000 1`] = `
|
|
910
|
+
Object {
|
|
911
|
+
"poolBalance0": "0",
|
|
912
|
+
"poolBalance1": "36796311329002736532545403775337522448",
|
|
913
|
+
"poolPriceBefore": "3.4026e+38",
|
|
914
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
915
|
+
"tickBefore": 887271,
|
|
916
|
+
}
|
|
917
|
+
`;
|
|
918
|
+
|
|
919
|
+
exports[`UniswapV3Pool swap tests initialized at the min ratio swap exactly 0.0000000000000010000 token0 for token1 1`] = `
|
|
920
|
+
Object {
|
|
921
|
+
"poolBalance0": "36796311322104302062438284732106019258",
|
|
922
|
+
"poolBalance1": "0",
|
|
923
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000029390",
|
|
924
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
925
|
+
"tickBefore": -887272,
|
|
926
|
+
}
|
|
927
|
+
`;
|
|
928
|
+
|
|
929
|
+
exports[`UniswapV3Pool swap tests initialized at the min ratio swap exactly 0.0000000000000010000 token1 for token0 1`] = `
|
|
930
|
+
Object {
|
|
931
|
+
"amount0Before": "36796311322104302062438284732106019258",
|
|
932
|
+
"amount0Delta": "-36792226666449146913445651103694411508",
|
|
933
|
+
"amount1Before": "0",
|
|
934
|
+
"amount1Delta": "1000",
|
|
935
|
+
"executionPrice": "0.000000000000000000000000000000000027180",
|
|
936
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
937
|
+
"feeGrowthGlobal1X128Delta": "2381976568446569244235",
|
|
938
|
+
"poolPriceAfter": "0.00000000000000000000000000000023974",
|
|
939
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000029390",
|
|
940
|
+
"tickAfter": -705093,
|
|
941
|
+
"tickBefore": -887272,
|
|
942
|
+
}
|
|
943
|
+
`;
|
|
944
|
+
|
|
945
|
+
exports[`UniswapV3Pool swap tests initialized at the min ratio swap exactly 1.0000 token0 for token1 1`] = `
|
|
946
|
+
Object {
|
|
947
|
+
"poolBalance0": "36796311322104302062438284732106019258",
|
|
948
|
+
"poolBalance1": "0",
|
|
949
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000029390",
|
|
950
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
951
|
+
"tickBefore": -887272,
|
|
952
|
+
}
|
|
953
|
+
`;
|
|
954
|
+
|
|
955
|
+
exports[`UniswapV3Pool swap tests initialized at the min ratio swap exactly 1.0000 token0 for token1 to price 0.50000 1`] = `
|
|
956
|
+
Object {
|
|
957
|
+
"poolBalance0": "36796311322104302062438284732106019258",
|
|
958
|
+
"poolBalance1": "0",
|
|
959
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000029390",
|
|
960
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
961
|
+
"tickBefore": -887272,
|
|
962
|
+
}
|
|
963
|
+
`;
|
|
964
|
+
|
|
965
|
+
exports[`UniswapV3Pool swap tests initialized at the min ratio swap exactly 1.0000 token1 for token0 1`] = `
|
|
966
|
+
Object {
|
|
967
|
+
"amount0Before": "36796311322104302062438284732106019258",
|
|
968
|
+
"amount0Delta": "-36796311322104302058426248623781044040",
|
|
969
|
+
"amount1Before": "0",
|
|
970
|
+
"amount1Delta": "1000000000000000000",
|
|
971
|
+
"executionPrice": "0.000000000000000000027177",
|
|
972
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
973
|
+
"feeGrowthGlobal1X128Delta": "510423550381413820277666488039994629",
|
|
974
|
+
"poolPriceAfter": "0.24850",
|
|
975
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000029390",
|
|
976
|
+
"tickAfter": -13924,
|
|
977
|
+
"tickBefore": -887272,
|
|
978
|
+
}
|
|
979
|
+
`;
|
|
980
|
+
|
|
981
|
+
exports[`UniswapV3Pool swap tests initialized at the min ratio swap exactly 1.0000 token1 for token0 to price 2.0000 1`] = `
|
|
982
|
+
Object {
|
|
983
|
+
"amount0Before": "36796311322104302062438284732106019258",
|
|
984
|
+
"amount0Delta": "-36796311322104302058426248623781044040",
|
|
985
|
+
"amount1Before": "0",
|
|
986
|
+
"amount1Delta": "1000000000000000000",
|
|
987
|
+
"executionPrice": "0.000000000000000000027177",
|
|
988
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
989
|
+
"feeGrowthGlobal1X128Delta": "510423550381413820277666488039994629",
|
|
990
|
+
"poolPriceAfter": "0.24850",
|
|
991
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000029390",
|
|
992
|
+
"tickAfter": -13924,
|
|
993
|
+
"tickBefore": -887272,
|
|
994
|
+
}
|
|
995
|
+
`;
|
|
996
|
+
|
|
997
|
+
exports[`UniswapV3Pool swap tests initialized at the min ratio swap token0 for exactly 0.0000000000000010000 token1 1`] = `
|
|
998
|
+
Object {
|
|
999
|
+
"poolBalance0": "36796311322104302062438284732106019258",
|
|
1000
|
+
"poolBalance1": "0",
|
|
1001
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000029390",
|
|
1002
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
1003
|
+
"tickBefore": -887272,
|
|
1004
|
+
}
|
|
1005
|
+
`;
|
|
1006
|
+
|
|
1007
|
+
exports[`UniswapV3Pool swap tests initialized at the min ratio swap token0 for exactly 1.0000 token1 1`] = `
|
|
1008
|
+
Object {
|
|
1009
|
+
"poolBalance0": "36796311322104302062438284732106019258",
|
|
1010
|
+
"poolBalance1": "0",
|
|
1011
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000029390",
|
|
1012
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
1013
|
+
"tickBefore": -887272,
|
|
1014
|
+
}
|
|
1015
|
+
`;
|
|
1016
|
+
|
|
1017
|
+
exports[`UniswapV3Pool swap tests initialized at the min ratio swap token0 for exactly 1.0000 token1 to price 0.50000 1`] = `
|
|
1018
|
+
Object {
|
|
1019
|
+
"poolBalance0": "36796311322104302062438284732106019258",
|
|
1020
|
+
"poolBalance1": "0",
|
|
1021
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000029390",
|
|
1022
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
1023
|
+
"tickBefore": -887272,
|
|
1024
|
+
}
|
|
1025
|
+
`;
|
|
1026
|
+
|
|
1027
|
+
exports[`UniswapV3Pool swap tests initialized at the min ratio swap token0 for token1 to price 0.40000 1`] = `
|
|
1028
|
+
Object {
|
|
1029
|
+
"poolBalance0": "36796311322104302062438284732106019258",
|
|
1030
|
+
"poolBalance1": "0",
|
|
1031
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000029390",
|
|
1032
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
1033
|
+
"tickBefore": -887272,
|
|
1034
|
+
}
|
|
1035
|
+
`;
|
|
1036
|
+
|
|
1037
|
+
exports[`UniswapV3Pool swap tests initialized at the min ratio swap token0 for token1 to price 2.5000 1`] = `
|
|
1038
|
+
Object {
|
|
1039
|
+
"poolBalance0": "36796311322104302062438284732106019258",
|
|
1040
|
+
"poolBalance1": "0",
|
|
1041
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000029390",
|
|
1042
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
1043
|
+
"tickBefore": -887272,
|
|
1044
|
+
}
|
|
1045
|
+
`;
|
|
1046
|
+
|
|
1047
|
+
exports[`UniswapV3Pool swap tests initialized at the min ratio swap token1 for exactly 0.0000000000000010000 token0 1`] = `
|
|
1048
|
+
Object {
|
|
1049
|
+
"amount0Before": "36796311322104302062438284732106019258",
|
|
1050
|
+
"amount0Delta": "-1000",
|
|
1051
|
+
"amount1Before": "0",
|
|
1052
|
+
"amount1Delta": "2",
|
|
1053
|
+
"executionPrice": "0.0020000",
|
|
1054
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
1055
|
+
"feeGrowthGlobal1X128Delta": "170141183460469231731",
|
|
1056
|
+
"poolPriceAfter": "0.0000000000000000000000000000000000000029543",
|
|
1057
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000029390",
|
|
1058
|
+
"tickAfter": -887220,
|
|
1059
|
+
"tickBefore": -887272,
|
|
1060
|
+
}
|
|
1061
|
+
`;
|
|
1062
|
+
|
|
1063
|
+
exports[`UniswapV3Pool swap tests initialized at the min ratio swap token1 for exactly 1.0000 token0 1`] = `
|
|
1064
|
+
Object {
|
|
1065
|
+
"amount0Before": "36796311322104302062438284732106019258",
|
|
1066
|
+
"amount0Delta": "-1000000000000000000",
|
|
1067
|
+
"amount1Before": "0",
|
|
1068
|
+
"amount1Delta": "2",
|
|
1069
|
+
"executionPrice": "0.0000000000000000020000",
|
|
1070
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
1071
|
+
"feeGrowthGlobal1X128Delta": "170141183460469231731",
|
|
1072
|
+
"poolPriceAfter": "0.0000000000000000000000000000000000000029543",
|
|
1073
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000029390",
|
|
1074
|
+
"tickAfter": -887220,
|
|
1075
|
+
"tickBefore": -887272,
|
|
1076
|
+
}
|
|
1077
|
+
`;
|
|
1078
|
+
|
|
1079
|
+
exports[`UniswapV3Pool swap tests initialized at the min ratio swap token1 for exactly 1.0000 token0 to price 2.0000 1`] = `
|
|
1080
|
+
Object {
|
|
1081
|
+
"amount0Before": "36796311322104302062438284732106019258",
|
|
1082
|
+
"amount0Delta": "-1000000000000000000",
|
|
1083
|
+
"amount1Before": "0",
|
|
1084
|
+
"amount1Delta": "2",
|
|
1085
|
+
"executionPrice": "0.0000000000000000020000",
|
|
1086
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
1087
|
+
"feeGrowthGlobal1X128Delta": "170141183460469231731",
|
|
1088
|
+
"poolPriceAfter": "0.0000000000000000000000000000000000000029543",
|
|
1089
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000029390",
|
|
1090
|
+
"tickAfter": -887220,
|
|
1091
|
+
"tickBefore": -887272,
|
|
1092
|
+
}
|
|
1093
|
+
`;
|
|
1094
|
+
|
|
1095
|
+
exports[`UniswapV3Pool swap tests initialized at the min ratio swap token1 for token0 to price 0.40000 1`] = `
|
|
1096
|
+
Object {
|
|
1097
|
+
"amount0Before": "36796311322104302062438284732106019258",
|
|
1098
|
+
"amount0Delta": "-36796311322104302059276007071937639893",
|
|
1099
|
+
"amount1Before": "0",
|
|
1100
|
+
"amount1Delta": "1268717215714495283",
|
|
1101
|
+
"executionPrice": "0.000000000000000000034479",
|
|
1102
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
1103
|
+
"feeGrowthGlobal1X128Delta": "647583145675012958539816297734564973",
|
|
1104
|
+
"poolPriceAfter": "0.40000",
|
|
1105
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000029390",
|
|
1106
|
+
"tickAfter": -9164,
|
|
1107
|
+
"tickBefore": -887272,
|
|
1108
|
+
}
|
|
1109
|
+
`;
|
|
1110
|
+
|
|
1111
|
+
exports[`UniswapV3Pool swap tests initialized at the min ratio swap token1 for token0 to price 2.5000 1`] = `
|
|
1112
|
+
Object {
|
|
1113
|
+
"amount0Before": "36796311322104302062438284732106019258",
|
|
1114
|
+
"amount0Delta": "-36796311322104302061173373668038667492",
|
|
1115
|
+
"amount1Before": "0",
|
|
1116
|
+
"amount1Delta": "3171793039286238112",
|
|
1117
|
+
"executionPrice": "0.000000000000000000086199",
|
|
1118
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
1119
|
+
"feeGrowthGlobal1X128Delta": "1618957864187523634078592530170978294",
|
|
1120
|
+
"poolPriceAfter": "2.5000",
|
|
1121
|
+
"poolPriceBefore": "0.0000000000000000000000000000000000000029390",
|
|
1122
|
+
"tickAfter": 9163,
|
|
1123
|
+
"tickBefore": -887272,
|
|
1124
|
+
}
|
|
1125
|
+
`;
|
|
1126
|
+
|
|
1127
|
+
exports[`UniswapV3Pool swap tests low fee, 1:1 price, 2e18 max range liquidity swap exactly 0.0000000000000010000 token0 for token1 1`] = `
|
|
1128
|
+
Object {
|
|
1129
|
+
"amount0Before": "2000000000000000000",
|
|
1130
|
+
"amount0Delta": "1000",
|
|
1131
|
+
"amount1Before": "2000000000000000000",
|
|
1132
|
+
"amount1Delta": "-998",
|
|
1133
|
+
"executionPrice": "0.99800",
|
|
1134
|
+
"feeGrowthGlobal0X128Delta": "170141183460469231731",
|
|
1135
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
1136
|
+
"poolPriceAfter": "1.0000",
|
|
1137
|
+
"poolPriceBefore": "1.0000",
|
|
1138
|
+
"tickAfter": -1,
|
|
1139
|
+
"tickBefore": 0,
|
|
1140
|
+
}
|
|
1141
|
+
`;
|
|
1142
|
+
|
|
1143
|
+
exports[`UniswapV3Pool swap tests low fee, 1:1 price, 2e18 max range liquidity swap exactly 0.0000000000000010000 token1 for token0 1`] = `
|
|
1144
|
+
Object {
|
|
1145
|
+
"amount0Before": "2000000000000000000",
|
|
1146
|
+
"amount0Delta": "-998",
|
|
1147
|
+
"amount1Before": "2000000000000000000",
|
|
1148
|
+
"amount1Delta": "1000",
|
|
1149
|
+
"executionPrice": "1.0020",
|
|
1150
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
1151
|
+
"feeGrowthGlobal1X128Delta": "170141183460469231731",
|
|
1152
|
+
"poolPriceAfter": "1.0000",
|
|
1153
|
+
"poolPriceBefore": "1.0000",
|
|
1154
|
+
"tickAfter": 0,
|
|
1155
|
+
"tickBefore": 0,
|
|
1156
|
+
}
|
|
1157
|
+
`;
|
|
1158
|
+
|
|
1159
|
+
exports[`UniswapV3Pool swap tests low fee, 1:1 price, 2e18 max range liquidity swap exactly 1.0000 token0 for token1 1`] = `
|
|
1160
|
+
Object {
|
|
1161
|
+
"amount0Before": "2000000000000000000",
|
|
1162
|
+
"amount0Delta": "1000000000000000000",
|
|
1163
|
+
"amount1Before": "2000000000000000000",
|
|
1164
|
+
"amount1Delta": "-666444407401233536",
|
|
1165
|
+
"executionPrice": "0.66644",
|
|
1166
|
+
"feeGrowthGlobal0X128Delta": "85070591730234956148210572796405514",
|
|
1167
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
1168
|
+
"poolPriceAfter": "0.44459",
|
|
1169
|
+
"poolPriceBefore": "1.0000",
|
|
1170
|
+
"tickAfter": -8107,
|
|
1171
|
+
"tickBefore": 0,
|
|
1172
|
+
}
|
|
1173
|
+
`;
|
|
1174
|
+
|
|
1175
|
+
exports[`UniswapV3Pool swap tests low fee, 1:1 price, 2e18 max range liquidity swap exactly 1.0000 token0 for token1 to price 0.50000 1`] = `
|
|
1176
|
+
Object {
|
|
1177
|
+
"amount0Before": "2000000000000000000",
|
|
1178
|
+
"amount0Delta": "828841545518949575",
|
|
1179
|
+
"amount1Before": "2000000000000000000",
|
|
1180
|
+
"amount1Delta": "-585786437626904950",
|
|
1181
|
+
"executionPrice": "0.70675",
|
|
1182
|
+
"feeGrowthGlobal0X128Delta": "70510040727899606087499539976421836",
|
|
1183
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
1184
|
+
"poolPriceAfter": "0.50000",
|
|
1185
|
+
"poolPriceBefore": "1.0000",
|
|
1186
|
+
"tickAfter": -6932,
|
|
1187
|
+
"tickBefore": 0,
|
|
1188
|
+
}
|
|
1189
|
+
`;
|
|
1190
|
+
|
|
1191
|
+
exports[`UniswapV3Pool swap tests low fee, 1:1 price, 2e18 max range liquidity swap exactly 1.0000 token1 for token0 1`] = `
|
|
1192
|
+
Object {
|
|
1193
|
+
"amount0Before": "2000000000000000000",
|
|
1194
|
+
"amount0Delta": "-666444407401233536",
|
|
1195
|
+
"amount1Before": "2000000000000000000",
|
|
1196
|
+
"amount1Delta": "1000000000000000000",
|
|
1197
|
+
"executionPrice": "1.5005",
|
|
1198
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
1199
|
+
"feeGrowthGlobal1X128Delta": "85070591730234956148210572796405515",
|
|
1200
|
+
"poolPriceAfter": "2.2493",
|
|
1201
|
+
"poolPriceBefore": "1.0000",
|
|
1202
|
+
"tickAfter": 8106,
|
|
1203
|
+
"tickBefore": 0,
|
|
1204
|
+
}
|
|
1205
|
+
`;
|
|
1206
|
+
|
|
1207
|
+
exports[`UniswapV3Pool swap tests low fee, 1:1 price, 2e18 max range liquidity swap exactly 1.0000 token1 for token0 to price 2.0000 1`] = `
|
|
1208
|
+
Object {
|
|
1209
|
+
"amount0Before": "2000000000000000000",
|
|
1210
|
+
"amount0Delta": "-585786437626904950",
|
|
1211
|
+
"amount1Before": "2000000000000000000",
|
|
1212
|
+
"amount1Delta": "828841545518949574",
|
|
1213
|
+
"executionPrice": "1.4149",
|
|
1214
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
1215
|
+
"feeGrowthGlobal1X128Delta": "70510040727899435946316079507190105",
|
|
1216
|
+
"poolPriceAfter": "2.0000",
|
|
1217
|
+
"poolPriceBefore": "1.0000",
|
|
1218
|
+
"tickAfter": 6931,
|
|
1219
|
+
"tickBefore": 0,
|
|
1220
|
+
}
|
|
1221
|
+
`;
|
|
1222
|
+
|
|
1223
|
+
exports[`UniswapV3Pool swap tests low fee, 1:1 price, 2e18 max range liquidity swap token0 for exactly 0.0000000000000010000 token1 1`] = `
|
|
1224
|
+
Object {
|
|
1225
|
+
"amount0Before": "2000000000000000000",
|
|
1226
|
+
"amount0Delta": "1002",
|
|
1227
|
+
"amount1Before": "2000000000000000000",
|
|
1228
|
+
"amount1Delta": "-1000",
|
|
1229
|
+
"executionPrice": "0.99800",
|
|
1230
|
+
"feeGrowthGlobal0X128Delta": "170141183460469231731",
|
|
1231
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
1232
|
+
"poolPriceAfter": "1.0000",
|
|
1233
|
+
"poolPriceBefore": "1.0000",
|
|
1234
|
+
"tickAfter": -1,
|
|
1235
|
+
"tickBefore": 0,
|
|
1236
|
+
}
|
|
1237
|
+
`;
|
|
1238
|
+
|
|
1239
|
+
exports[`UniswapV3Pool swap tests low fee, 1:1 price, 2e18 max range liquidity swap token0 for exactly 1.0000 token1 1`] = `
|
|
1240
|
+
Object {
|
|
1241
|
+
"amount0Before": "2000000000000000000",
|
|
1242
|
+
"amount0Delta": "2001000500250125077",
|
|
1243
|
+
"amount1Before": "2000000000000000000",
|
|
1244
|
+
"amount1Delta": "-1000000000000000000",
|
|
1245
|
+
"executionPrice": "0.49975",
|
|
1246
|
+
"feeGrowthGlobal0X128Delta": "170226296608774038574344664756091446",
|
|
1247
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
1248
|
+
"poolPriceAfter": "0.25000",
|
|
1249
|
+
"poolPriceBefore": "1.0000",
|
|
1250
|
+
"tickAfter": -13864,
|
|
1251
|
+
"tickBefore": 0,
|
|
1252
|
+
}
|
|
1253
|
+
`;
|
|
1254
|
+
|
|
1255
|
+
exports[`UniswapV3Pool swap tests low fee, 1:1 price, 2e18 max range liquidity swap token0 for exactly 1.0000 token1 to price 0.50000 1`] = `
|
|
1256
|
+
Object {
|
|
1257
|
+
"amount0Before": "2000000000000000000",
|
|
1258
|
+
"amount0Delta": "828841545518949575",
|
|
1259
|
+
"amount1Before": "2000000000000000000",
|
|
1260
|
+
"amount1Delta": "-585786437626904950",
|
|
1261
|
+
"executionPrice": "0.70675",
|
|
1262
|
+
"feeGrowthGlobal0X128Delta": "70510040727899606087499539976421836",
|
|
1263
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
1264
|
+
"poolPriceAfter": "0.50000",
|
|
1265
|
+
"poolPriceBefore": "1.0000",
|
|
1266
|
+
"tickAfter": -6932,
|
|
1267
|
+
"tickBefore": 0,
|
|
1268
|
+
}
|
|
1269
|
+
`;
|
|
1270
|
+
|
|
1271
|
+
exports[`UniswapV3Pool swap tests low fee, 1:1 price, 2e18 max range liquidity swap token0 for token1 to price 0.40000 1`] = `
|
|
1272
|
+
Object {
|
|
1273
|
+
"amount0Before": "2000000000000000000",
|
|
1274
|
+
"amount0Delta": "1162859089713235953",
|
|
1275
|
+
"amount1Before": "2000000000000000000",
|
|
1276
|
+
"amount1Delta": "-735088935932648266",
|
|
1277
|
+
"executionPrice": "0.63214",
|
|
1278
|
+
"feeGrowthGlobal0X128Delta": "98925110860787308007692432636113977",
|
|
1279
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
1280
|
+
"poolPriceAfter": "0.40000",
|
|
1281
|
+
"poolPriceBefore": "1.0000",
|
|
1282
|
+
"tickAfter": -9164,
|
|
1283
|
+
"tickBefore": 0,
|
|
1284
|
+
}
|
|
1285
|
+
`;
|
|
1286
|
+
|
|
1287
|
+
exports[`UniswapV3Pool swap tests low fee, 1:1 price, 2e18 max range liquidity swap token0 for token1 to price 2.5000 1`] = `
|
|
1288
|
+
Object {
|
|
1289
|
+
"poolBalance0": "2000000000000000000",
|
|
1290
|
+
"poolBalance1": "2000000000000000000",
|
|
1291
|
+
"poolPriceBefore": "1.0000",
|
|
1292
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
1293
|
+
"tickBefore": 0,
|
|
1294
|
+
}
|
|
1295
|
+
`;
|
|
1296
|
+
|
|
1297
|
+
exports[`UniswapV3Pool swap tests low fee, 1:1 price, 2e18 max range liquidity swap token1 for exactly 0.0000000000000010000 token0 1`] = `
|
|
1298
|
+
Object {
|
|
1299
|
+
"amount0Before": "2000000000000000000",
|
|
1300
|
+
"amount0Delta": "-1000",
|
|
1301
|
+
"amount1Before": "2000000000000000000",
|
|
1302
|
+
"amount1Delta": "1002",
|
|
1303
|
+
"executionPrice": "1.0020",
|
|
1304
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
1305
|
+
"feeGrowthGlobal1X128Delta": "170141183460469231731",
|
|
1306
|
+
"poolPriceAfter": "1.0000",
|
|
1307
|
+
"poolPriceBefore": "1.0000",
|
|
1308
|
+
"tickAfter": 0,
|
|
1309
|
+
"tickBefore": 0,
|
|
1310
|
+
}
|
|
1311
|
+
`;
|
|
1312
|
+
|
|
1313
|
+
exports[`UniswapV3Pool swap tests low fee, 1:1 price, 2e18 max range liquidity swap token1 for exactly 1.0000 token0 1`] = `
|
|
1314
|
+
Object {
|
|
1315
|
+
"amount0Before": "2000000000000000000",
|
|
1316
|
+
"amount0Delta": "-1000000000000000000",
|
|
1317
|
+
"amount1Before": "2000000000000000000",
|
|
1318
|
+
"amount1Delta": "2001000500250125079",
|
|
1319
|
+
"executionPrice": "2.0010",
|
|
1320
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
1321
|
+
"feeGrowthGlobal1X128Delta": "170226296608774378856711585694554910",
|
|
1322
|
+
"poolPriceAfter": "4.0000",
|
|
1323
|
+
"poolPriceBefore": "1.0000",
|
|
1324
|
+
"tickAfter": 13863,
|
|
1325
|
+
"tickBefore": 0,
|
|
1326
|
+
}
|
|
1327
|
+
`;
|
|
1328
|
+
|
|
1329
|
+
exports[`UniswapV3Pool swap tests low fee, 1:1 price, 2e18 max range liquidity swap token1 for exactly 1.0000 token0 to price 2.0000 1`] = `
|
|
1330
|
+
Object {
|
|
1331
|
+
"amount0Before": "2000000000000000000",
|
|
1332
|
+
"amount0Delta": "-585786437626904950",
|
|
1333
|
+
"amount1Before": "2000000000000000000",
|
|
1334
|
+
"amount1Delta": "828841545518949574",
|
|
1335
|
+
"executionPrice": "1.4149",
|
|
1336
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
1337
|
+
"feeGrowthGlobal1X128Delta": "70510040727899435946316079507190105",
|
|
1338
|
+
"poolPriceAfter": "2.0000",
|
|
1339
|
+
"poolPriceBefore": "1.0000",
|
|
1340
|
+
"tickAfter": 6931,
|
|
1341
|
+
"tickBefore": 0,
|
|
1342
|
+
}
|
|
1343
|
+
`;
|
|
1344
|
+
|
|
1345
|
+
exports[`UniswapV3Pool swap tests low fee, 1:1 price, 2e18 max range liquidity swap token1 for token0 to price 0.40000 1`] = `
|
|
1346
|
+
Object {
|
|
1347
|
+
"poolBalance0": "2000000000000000000",
|
|
1348
|
+
"poolBalance1": "2000000000000000000",
|
|
1349
|
+
"poolPriceBefore": "1.0000",
|
|
1350
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
1351
|
+
"tickBefore": 0,
|
|
1352
|
+
}
|
|
1353
|
+
`;
|
|
1354
|
+
|
|
1355
|
+
exports[`UniswapV3Pool swap tests low fee, 1:1 price, 2e18 max range liquidity swap token1 for token0 to price 2.5000 1`] = `
|
|
1356
|
+
Object {
|
|
1357
|
+
"amount0Before": "2000000000000000000",
|
|
1358
|
+
"amount0Delta": "-735088935932648266",
|
|
1359
|
+
"amount1Before": "2000000000000000000",
|
|
1360
|
+
"amount1Delta": "1162859089713235954",
|
|
1361
|
+
"executionPrice": "1.5819",
|
|
1362
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
1363
|
+
"feeGrowthGlobal1X128Delta": "98925110860787308007692432636113978",
|
|
1364
|
+
"poolPriceAfter": "2.5000",
|
|
1365
|
+
"poolPriceBefore": "1.0000",
|
|
1366
|
+
"tickAfter": 9163,
|
|
1367
|
+
"tickBefore": 0,
|
|
1368
|
+
}
|
|
1369
|
+
`;
|
|
1370
|
+
|
|
1371
|
+
exports[`UniswapV3Pool swap tests low fee, large liquidity around current price (stable swap) swap exactly 0.0000000000000010000 token0 for token1 1`] = `
|
|
1372
|
+
Object {
|
|
1373
|
+
"amount0Before": "999700069986003",
|
|
1374
|
+
"amount0Delta": "1000",
|
|
1375
|
+
"amount1Before": "999700069986003",
|
|
1376
|
+
"amount1Delta": "-998",
|
|
1377
|
+
"executionPrice": "0.99800",
|
|
1378
|
+
"feeGrowthGlobal0X128Delta": "170141183460469231731",
|
|
1379
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
1380
|
+
"poolPriceAfter": "1.0000",
|
|
1381
|
+
"poolPriceBefore": "1.0000",
|
|
1382
|
+
"tickAfter": -1,
|
|
1383
|
+
"tickBefore": 0,
|
|
1384
|
+
}
|
|
1385
|
+
`;
|
|
1386
|
+
|
|
1387
|
+
exports[`UniswapV3Pool swap tests low fee, large liquidity around current price (stable swap) swap exactly 0.0000000000000010000 token1 for token0 1`] = `
|
|
1388
|
+
Object {
|
|
1389
|
+
"amount0Before": "999700069986003",
|
|
1390
|
+
"amount0Delta": "-998",
|
|
1391
|
+
"amount1Before": "999700069986003",
|
|
1392
|
+
"amount1Delta": "1000",
|
|
1393
|
+
"executionPrice": "1.0020",
|
|
1394
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
1395
|
+
"feeGrowthGlobal1X128Delta": "170141183460469231731",
|
|
1396
|
+
"poolPriceAfter": "1.0000",
|
|
1397
|
+
"poolPriceBefore": "1.0000",
|
|
1398
|
+
"tickAfter": 0,
|
|
1399
|
+
"tickBefore": 0,
|
|
1400
|
+
}
|
|
1401
|
+
`;
|
|
1402
|
+
|
|
1403
|
+
exports[`UniswapV3Pool swap tests low fee, large liquidity around current price (stable swap) swap exactly 1.0000 token0 for token1 1`] = `
|
|
1404
|
+
Object {
|
|
1405
|
+
"amount0Before": "999700069986003",
|
|
1406
|
+
"amount0Delta": "1000700370186095",
|
|
1407
|
+
"amount1Before": "999700069986003",
|
|
1408
|
+
"amount1Delta": "-999700069986002",
|
|
1409
|
+
"executionPrice": "0.99900",
|
|
1410
|
+
"feeGrowthGlobal0X128Delta": "85130172636557991529041720559172",
|
|
1411
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
1412
|
+
"poolPriceAfter": "0.0000000000000000000000000000000000000029390",
|
|
1413
|
+
"poolPriceBefore": "1.0000",
|
|
1414
|
+
"tickAfter": -887272,
|
|
1415
|
+
"tickBefore": 0,
|
|
1416
|
+
}
|
|
1417
|
+
`;
|
|
1418
|
+
|
|
1419
|
+
exports[`UniswapV3Pool swap tests low fee, large liquidity around current price (stable swap) swap exactly 1.0000 token0 for token1 to price 0.50000 1`] = `
|
|
1420
|
+
Object {
|
|
1421
|
+
"amount0Before": "999700069986003",
|
|
1422
|
+
"amount0Delta": "1000700370186095",
|
|
1423
|
+
"amount1Before": "999700069986003",
|
|
1424
|
+
"amount1Delta": "-999700069986002",
|
|
1425
|
+
"executionPrice": "0.99900",
|
|
1426
|
+
"feeGrowthGlobal0X128Delta": "85130172636557991529041720559172",
|
|
1427
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
1428
|
+
"poolPriceAfter": "0.50000",
|
|
1429
|
+
"poolPriceBefore": "1.0000",
|
|
1430
|
+
"tickAfter": -6932,
|
|
1431
|
+
"tickBefore": 0,
|
|
1432
|
+
}
|
|
1433
|
+
`;
|
|
1434
|
+
|
|
1435
|
+
exports[`UniswapV3Pool swap tests low fee, large liquidity around current price (stable swap) swap exactly 1.0000 token1 for token0 1`] = `
|
|
1436
|
+
Object {
|
|
1437
|
+
"amount0Before": "999700069986003",
|
|
1438
|
+
"amount0Delta": "-999700069986002",
|
|
1439
|
+
"amount1Before": "999700069986003",
|
|
1440
|
+
"amount1Delta": "1000700370186095",
|
|
1441
|
+
"executionPrice": "1.0010",
|
|
1442
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
1443
|
+
"feeGrowthGlobal1X128Delta": "85130172636557991529041720559172",
|
|
1444
|
+
"poolPriceAfter": "3.4026e+38",
|
|
1445
|
+
"poolPriceBefore": "1.0000",
|
|
1446
|
+
"tickAfter": 887271,
|
|
1447
|
+
"tickBefore": 0,
|
|
1448
|
+
}
|
|
1449
|
+
`;
|
|
1450
|
+
|
|
1451
|
+
exports[`UniswapV3Pool swap tests low fee, large liquidity around current price (stable swap) swap exactly 1.0000 token1 for token0 to price 2.0000 1`] = `
|
|
1452
|
+
Object {
|
|
1453
|
+
"amount0Before": "999700069986003",
|
|
1454
|
+
"amount0Delta": "-999700069986002",
|
|
1455
|
+
"amount1Before": "999700069986003",
|
|
1456
|
+
"amount1Delta": "1000700370186095",
|
|
1457
|
+
"executionPrice": "1.0010",
|
|
1458
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
1459
|
+
"feeGrowthGlobal1X128Delta": "85130172636557991529041720559172",
|
|
1460
|
+
"poolPriceAfter": "2.0000",
|
|
1461
|
+
"poolPriceBefore": "1.0000",
|
|
1462
|
+
"tickAfter": 6931,
|
|
1463
|
+
"tickBefore": 0,
|
|
1464
|
+
}
|
|
1465
|
+
`;
|
|
1466
|
+
|
|
1467
|
+
exports[`UniswapV3Pool swap tests low fee, large liquidity around current price (stable swap) swap token0 for exactly 0.0000000000000010000 token1 1`] = `
|
|
1468
|
+
Object {
|
|
1469
|
+
"amount0Before": "999700069986003",
|
|
1470
|
+
"amount0Delta": "1002",
|
|
1471
|
+
"amount1Before": "999700069986003",
|
|
1472
|
+
"amount1Delta": "-1000",
|
|
1473
|
+
"executionPrice": "0.99800",
|
|
1474
|
+
"feeGrowthGlobal0X128Delta": "170141183460469231731",
|
|
1475
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
1476
|
+
"poolPriceAfter": "1.0000",
|
|
1477
|
+
"poolPriceBefore": "1.0000",
|
|
1478
|
+
"tickAfter": -1,
|
|
1479
|
+
"tickBefore": 0,
|
|
1480
|
+
}
|
|
1481
|
+
`;
|
|
1482
|
+
|
|
1483
|
+
exports[`UniswapV3Pool swap tests low fee, large liquidity around current price (stable swap) swap token0 for exactly 1.0000 token1 1`] = `
|
|
1484
|
+
Object {
|
|
1485
|
+
"amount0Before": "999700069986003",
|
|
1486
|
+
"amount0Delta": "1000700370186095",
|
|
1487
|
+
"amount1Before": "999700069986003",
|
|
1488
|
+
"amount1Delta": "-999700069986002",
|
|
1489
|
+
"executionPrice": "0.99900",
|
|
1490
|
+
"feeGrowthGlobal0X128Delta": "85130172636557991529041720559172",
|
|
1491
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
1492
|
+
"poolPriceAfter": "0.0000000000000000000000000000000000000029390",
|
|
1493
|
+
"poolPriceBefore": "1.0000",
|
|
1494
|
+
"tickAfter": -887272,
|
|
1495
|
+
"tickBefore": 0,
|
|
1496
|
+
}
|
|
1497
|
+
`;
|
|
1498
|
+
|
|
1499
|
+
exports[`UniswapV3Pool swap tests low fee, large liquidity around current price (stable swap) swap token0 for exactly 1.0000 token1 to price 0.50000 1`] = `
|
|
1500
|
+
Object {
|
|
1501
|
+
"amount0Before": "999700069986003",
|
|
1502
|
+
"amount0Delta": "1000700370186095",
|
|
1503
|
+
"amount1Before": "999700069986003",
|
|
1504
|
+
"amount1Delta": "-999700069986002",
|
|
1505
|
+
"executionPrice": "0.99900",
|
|
1506
|
+
"feeGrowthGlobal0X128Delta": "85130172636557991529041720559172",
|
|
1507
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
1508
|
+
"poolPriceAfter": "0.50000",
|
|
1509
|
+
"poolPriceBefore": "1.0000",
|
|
1510
|
+
"tickAfter": -6932,
|
|
1511
|
+
"tickBefore": 0,
|
|
1512
|
+
}
|
|
1513
|
+
`;
|
|
1514
|
+
|
|
1515
|
+
exports[`UniswapV3Pool swap tests low fee, large liquidity around current price (stable swap) swap token0 for token1 to price 0.40000 1`] = `
|
|
1516
|
+
Object {
|
|
1517
|
+
"amount0Before": "999700069986003",
|
|
1518
|
+
"amount0Delta": "1000700370186095",
|
|
1519
|
+
"amount1Before": "999700069986003",
|
|
1520
|
+
"amount1Delta": "-999700069986002",
|
|
1521
|
+
"executionPrice": "0.99900",
|
|
1522
|
+
"feeGrowthGlobal0X128Delta": "85130172636557991529041720559172",
|
|
1523
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
1524
|
+
"poolPriceAfter": "0.40000",
|
|
1525
|
+
"poolPriceBefore": "1.0000",
|
|
1526
|
+
"tickAfter": -9164,
|
|
1527
|
+
"tickBefore": 0,
|
|
1528
|
+
}
|
|
1529
|
+
`;
|
|
1530
|
+
|
|
1531
|
+
exports[`UniswapV3Pool swap tests low fee, large liquidity around current price (stable swap) swap token0 for token1 to price 2.5000 1`] = `
|
|
1532
|
+
Object {
|
|
1533
|
+
"poolBalance0": "999700069986003",
|
|
1534
|
+
"poolBalance1": "999700069986003",
|
|
1535
|
+
"poolPriceBefore": "1.0000",
|
|
1536
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
1537
|
+
"tickBefore": 0,
|
|
1538
|
+
}
|
|
1539
|
+
`;
|
|
1540
|
+
|
|
1541
|
+
exports[`UniswapV3Pool swap tests low fee, large liquidity around current price (stable swap) swap token1 for exactly 0.0000000000000010000 token0 1`] = `
|
|
1542
|
+
Object {
|
|
1543
|
+
"amount0Before": "999700069986003",
|
|
1544
|
+
"amount0Delta": "-1000",
|
|
1545
|
+
"amount1Before": "999700069986003",
|
|
1546
|
+
"amount1Delta": "1002",
|
|
1547
|
+
"executionPrice": "1.0020",
|
|
1548
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
1549
|
+
"feeGrowthGlobal1X128Delta": "170141183460469231731",
|
|
1550
|
+
"poolPriceAfter": "1.0000",
|
|
1551
|
+
"poolPriceBefore": "1.0000",
|
|
1552
|
+
"tickAfter": 0,
|
|
1553
|
+
"tickBefore": 0,
|
|
1554
|
+
}
|
|
1555
|
+
`;
|
|
1556
|
+
|
|
1557
|
+
exports[`UniswapV3Pool swap tests low fee, large liquidity around current price (stable swap) swap token1 for exactly 1.0000 token0 1`] = `
|
|
1558
|
+
Object {
|
|
1559
|
+
"amount0Before": "999700069986003",
|
|
1560
|
+
"amount0Delta": "-999700069986002",
|
|
1561
|
+
"amount1Before": "999700069986003",
|
|
1562
|
+
"amount1Delta": "1000700370186095",
|
|
1563
|
+
"executionPrice": "1.0010",
|
|
1564
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
1565
|
+
"feeGrowthGlobal1X128Delta": "85130172636557991529041720559172",
|
|
1566
|
+
"poolPriceAfter": "3.4026e+38",
|
|
1567
|
+
"poolPriceBefore": "1.0000",
|
|
1568
|
+
"tickAfter": 887271,
|
|
1569
|
+
"tickBefore": 0,
|
|
1570
|
+
}
|
|
1571
|
+
`;
|
|
1572
|
+
|
|
1573
|
+
exports[`UniswapV3Pool swap tests low fee, large liquidity around current price (stable swap) swap token1 for exactly 1.0000 token0 to price 2.0000 1`] = `
|
|
1574
|
+
Object {
|
|
1575
|
+
"amount0Before": "999700069986003",
|
|
1576
|
+
"amount0Delta": "-999700069986002",
|
|
1577
|
+
"amount1Before": "999700069986003",
|
|
1578
|
+
"amount1Delta": "1000700370186095",
|
|
1579
|
+
"executionPrice": "1.0010",
|
|
1580
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
1581
|
+
"feeGrowthGlobal1X128Delta": "85130172636557991529041720559172",
|
|
1582
|
+
"poolPriceAfter": "2.0000",
|
|
1583
|
+
"poolPriceBefore": "1.0000",
|
|
1584
|
+
"tickAfter": 6931,
|
|
1585
|
+
"tickBefore": 0,
|
|
1586
|
+
}
|
|
1587
|
+
`;
|
|
1588
|
+
|
|
1589
|
+
exports[`UniswapV3Pool swap tests low fee, large liquidity around current price (stable swap) swap token1 for token0 to price 0.40000 1`] = `
|
|
1590
|
+
Object {
|
|
1591
|
+
"poolBalance0": "999700069986003",
|
|
1592
|
+
"poolBalance1": "999700069986003",
|
|
1593
|
+
"poolPriceBefore": "1.0000",
|
|
1594
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
1595
|
+
"tickBefore": 0,
|
|
1596
|
+
}
|
|
1597
|
+
`;
|
|
1598
|
+
|
|
1599
|
+
exports[`UniswapV3Pool swap tests low fee, large liquidity around current price (stable swap) swap token1 for token0 to price 2.5000 1`] = `
|
|
1600
|
+
Object {
|
|
1601
|
+
"amount0Before": "999700069986003",
|
|
1602
|
+
"amount0Delta": "-999700069986002",
|
|
1603
|
+
"amount1Before": "999700069986003",
|
|
1604
|
+
"amount1Delta": "1000700370186095",
|
|
1605
|
+
"executionPrice": "1.0010",
|
|
1606
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
1607
|
+
"feeGrowthGlobal1X128Delta": "85130172636557991529041720559172",
|
|
1608
|
+
"poolPriceAfter": "2.5000",
|
|
1609
|
+
"poolPriceBefore": "1.0000",
|
|
1610
|
+
"tickAfter": 9163,
|
|
1611
|
+
"tickBefore": 0,
|
|
1612
|
+
}
|
|
1613
|
+
`;
|
|
1614
|
+
|
|
1615
|
+
exports[`UniswapV3Pool swap tests max full range liquidity at 1:1 price with default fee swap exactly 0.0000000000000010000 token0 for token1 1`] = `
|
|
1616
|
+
Object {
|
|
1617
|
+
"amount0Before": "11505743598341114571255423385623647",
|
|
1618
|
+
"amount0Delta": "1000",
|
|
1619
|
+
"amount1Before": "11505743598341114571255423385506404",
|
|
1620
|
+
"amount1Delta": "0",
|
|
1621
|
+
"executionPrice": "0.0000",
|
|
1622
|
+
"feeGrowthGlobal0X128Delta": "29575000",
|
|
1623
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
1624
|
+
"poolPriceAfter": "1.0000",
|
|
1625
|
+
"poolPriceBefore": "1.0000",
|
|
1626
|
+
"tickAfter": -1,
|
|
1627
|
+
"tickBefore": 0,
|
|
1628
|
+
}
|
|
1629
|
+
`;
|
|
1630
|
+
|
|
1631
|
+
exports[`UniswapV3Pool swap tests max full range liquidity at 1:1 price with default fee swap exactly 0.0000000000000010000 token1 for token0 1`] = `
|
|
1632
|
+
Object {
|
|
1633
|
+
"amount0Before": "11505743598341114571255423385623647",
|
|
1634
|
+
"amount0Delta": "0",
|
|
1635
|
+
"amount1Before": "11505743598341114571255423385506404",
|
|
1636
|
+
"amount1Delta": "1000",
|
|
1637
|
+
"executionPrice": "-Infinity",
|
|
1638
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
1639
|
+
"feeGrowthGlobal1X128Delta": "29575000",
|
|
1640
|
+
"poolPriceAfter": "1.0000",
|
|
1641
|
+
"poolPriceBefore": "1.0000",
|
|
1642
|
+
"tickAfter": 0,
|
|
1643
|
+
"tickBefore": 0,
|
|
1644
|
+
}
|
|
1645
|
+
`;
|
|
1646
|
+
|
|
1647
|
+
exports[`UniswapV3Pool swap tests max full range liquidity at 1:1 price with default fee swap exactly 1.0000 token0 for token1 1`] = `
|
|
1648
|
+
Object {
|
|
1649
|
+
"amount0Before": "11505743598341114571255423385623647",
|
|
1650
|
+
"amount0Delta": "1000000000000000000",
|
|
1651
|
+
"amount1Before": "11505743598341114571255423385506404",
|
|
1652
|
+
"amount1Delta": "-996999999999999318",
|
|
1653
|
+
"executionPrice": "0.99700",
|
|
1654
|
+
"feeGrowthGlobal0X128Delta": "88725000000017597125",
|
|
1655
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
1656
|
+
"poolPriceAfter": "1.0000",
|
|
1657
|
+
"poolPriceBefore": "1.0000",
|
|
1658
|
+
"tickAfter": -1,
|
|
1659
|
+
"tickBefore": 0,
|
|
1660
|
+
}
|
|
1661
|
+
`;
|
|
1662
|
+
|
|
1663
|
+
exports[`UniswapV3Pool swap tests max full range liquidity at 1:1 price with default fee swap exactly 1.0000 token0 for token1 to price 0.50000 1`] = `
|
|
1664
|
+
Object {
|
|
1665
|
+
"amount0Before": "11505743598341114571255423385623647",
|
|
1666
|
+
"amount0Delta": "1000000000000000000",
|
|
1667
|
+
"amount1Before": "11505743598341114571255423385506404",
|
|
1668
|
+
"amount1Delta": "-996999999999999318",
|
|
1669
|
+
"executionPrice": "0.99700",
|
|
1670
|
+
"feeGrowthGlobal0X128Delta": "88725000000017597125",
|
|
1671
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
1672
|
+
"poolPriceAfter": "1.0000",
|
|
1673
|
+
"poolPriceBefore": "1.0000",
|
|
1674
|
+
"tickAfter": -1,
|
|
1675
|
+
"tickBefore": 0,
|
|
1676
|
+
}
|
|
1677
|
+
`;
|
|
1678
|
+
|
|
1679
|
+
exports[`UniswapV3Pool swap tests max full range liquidity at 1:1 price with default fee swap exactly 1.0000 token1 for token0 1`] = `
|
|
1680
|
+
Object {
|
|
1681
|
+
"amount0Before": "11505743598341114571255423385623647",
|
|
1682
|
+
"amount0Delta": "-996999999999999232",
|
|
1683
|
+
"amount1Before": "11505743598341114571255423385506404",
|
|
1684
|
+
"amount1Delta": "1000000000000000000",
|
|
1685
|
+
"executionPrice": "1.0030",
|
|
1686
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
1687
|
+
"feeGrowthGlobal1X128Delta": "88725000000020140575",
|
|
1688
|
+
"poolPriceAfter": "1.0000",
|
|
1689
|
+
"poolPriceBefore": "1.0000",
|
|
1690
|
+
"tickAfter": 0,
|
|
1691
|
+
"tickBefore": 0,
|
|
1692
|
+
}
|
|
1693
|
+
`;
|
|
1694
|
+
|
|
1695
|
+
exports[`UniswapV3Pool swap tests max full range liquidity at 1:1 price with default fee swap exactly 1.0000 token1 for token0 to price 2.0000 1`] = `
|
|
1696
|
+
Object {
|
|
1697
|
+
"amount0Before": "11505743598341114571255423385623647",
|
|
1698
|
+
"amount0Delta": "-996999999999999232",
|
|
1699
|
+
"amount1Before": "11505743598341114571255423385506404",
|
|
1700
|
+
"amount1Delta": "1000000000000000000",
|
|
1701
|
+
"executionPrice": "1.0030",
|
|
1702
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
1703
|
+
"feeGrowthGlobal1X128Delta": "88725000000020140575",
|
|
1704
|
+
"poolPriceAfter": "1.0000",
|
|
1705
|
+
"poolPriceBefore": "1.0000",
|
|
1706
|
+
"tickAfter": 0,
|
|
1707
|
+
"tickBefore": 0,
|
|
1708
|
+
}
|
|
1709
|
+
`;
|
|
1710
|
+
|
|
1711
|
+
exports[`UniswapV3Pool swap tests max full range liquidity at 1:1 price with default fee swap token0 for exactly 0.0000000000000010000 token1 1`] = `
|
|
1712
|
+
Object {
|
|
1713
|
+
"amount0Before": "11505743598341114571255423385623647",
|
|
1714
|
+
"amount0Delta": "145660",
|
|
1715
|
+
"amount1Before": "11505743598341114571255423385506404",
|
|
1716
|
+
"amount1Delta": "-1000",
|
|
1717
|
+
"executionPrice": "0.0068653",
|
|
1718
|
+
"feeGrowthGlobal0X128Delta": "12924275",
|
|
1719
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
1720
|
+
"poolPriceAfter": "1.0000",
|
|
1721
|
+
"poolPriceBefore": "1.0000",
|
|
1722
|
+
"tickAfter": -1,
|
|
1723
|
+
"tickBefore": 0,
|
|
1724
|
+
}
|
|
1725
|
+
`;
|
|
1726
|
+
|
|
1727
|
+
exports[`UniswapV3Pool swap tests max full range liquidity at 1:1 price with default fee swap token0 for exactly 1.0000 token1 1`] = `
|
|
1728
|
+
Object {
|
|
1729
|
+
"amount0Before": "11505743598341114571255423385623647",
|
|
1730
|
+
"amount0Delta": "1003009027081361181",
|
|
1731
|
+
"amount1Before": "11505743598341114571255423385506404",
|
|
1732
|
+
"amount1Delta": "-1000000000000000000",
|
|
1733
|
+
"executionPrice": "0.99700",
|
|
1734
|
+
"feeGrowthGlobal0X128Delta": "88991975927793784300",
|
|
1735
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
1736
|
+
"poolPriceAfter": "1.0000",
|
|
1737
|
+
"poolPriceBefore": "1.0000",
|
|
1738
|
+
"tickAfter": -1,
|
|
1739
|
+
"tickBefore": 0,
|
|
1740
|
+
}
|
|
1741
|
+
`;
|
|
1742
|
+
|
|
1743
|
+
exports[`UniswapV3Pool swap tests max full range liquidity at 1:1 price with default fee swap token0 for exactly 1.0000 token1 to price 0.50000 1`] = `
|
|
1744
|
+
Object {
|
|
1745
|
+
"amount0Before": "11505743598341114571255423385623647",
|
|
1746
|
+
"amount0Delta": "1003009027081361181",
|
|
1747
|
+
"amount1Before": "11505743598341114571255423385506404",
|
|
1748
|
+
"amount1Delta": "-1000000000000000000",
|
|
1749
|
+
"executionPrice": "0.99700",
|
|
1750
|
+
"feeGrowthGlobal0X128Delta": "88991975927793784300",
|
|
1751
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
1752
|
+
"poolPriceAfter": "1.0000",
|
|
1753
|
+
"poolPriceBefore": "1.0000",
|
|
1754
|
+
"tickAfter": -1,
|
|
1755
|
+
"tickBefore": 0,
|
|
1756
|
+
}
|
|
1757
|
+
`;
|
|
1758
|
+
|
|
1759
|
+
exports[`UniswapV3Pool swap tests max full range liquidity at 1:1 price with default fee swap token0 for token1 to price 0.40000 1`] = `
|
|
1760
|
+
Object {
|
|
1761
|
+
"amount0Before": "11505743598341114571255423385623647",
|
|
1762
|
+
"amount0Delta": "6706554036096900675845906992672697",
|
|
1763
|
+
"amount1Before": "11505743598341114571255423385506404",
|
|
1764
|
+
"amount1Delta": "-4228872409409224753601131225116702",
|
|
1765
|
+
"executionPrice": "0.63056",
|
|
1766
|
+
"feeGrowthGlobal0X128Delta": "595039006852697512464428097924911949",
|
|
1767
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
1768
|
+
"poolPriceAfter": "0.40000",
|
|
1769
|
+
"poolPriceBefore": "1.0000",
|
|
1770
|
+
"tickAfter": -9164,
|
|
1771
|
+
"tickBefore": 0,
|
|
1772
|
+
}
|
|
1773
|
+
`;
|
|
1774
|
+
|
|
1775
|
+
exports[`UniswapV3Pool swap tests max full range liquidity at 1:1 price with default fee swap token0 for token1 to price 2.5000 1`] = `
|
|
1776
|
+
Object {
|
|
1777
|
+
"poolBalance0": "11505743598341114571255423385623647",
|
|
1778
|
+
"poolBalance1": "11505743598341114571255423385506404",
|
|
1779
|
+
"poolPriceBefore": "1.0000",
|
|
1780
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
1781
|
+
"tickBefore": 0,
|
|
1782
|
+
}
|
|
1783
|
+
`;
|
|
1784
|
+
|
|
1785
|
+
exports[`UniswapV3Pool swap tests max full range liquidity at 1:1 price with default fee swap token1 for exactly 0.0000000000000010000 token0 1`] = `
|
|
1786
|
+
Object {
|
|
1787
|
+
"amount0Before": "11505743598341114571255423385623647",
|
|
1788
|
+
"amount0Delta": "-1000",
|
|
1789
|
+
"amount1Before": "11505743598341114571255423385506404",
|
|
1790
|
+
"amount1Delta": "145660",
|
|
1791
|
+
"executionPrice": "145.66",
|
|
1792
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
1793
|
+
"feeGrowthGlobal1X128Delta": "12924275",
|
|
1794
|
+
"poolPriceAfter": "1.0000",
|
|
1795
|
+
"poolPriceBefore": "1.0000",
|
|
1796
|
+
"tickAfter": 0,
|
|
1797
|
+
"tickBefore": 0,
|
|
1798
|
+
}
|
|
1799
|
+
`;
|
|
1800
|
+
|
|
1801
|
+
exports[`UniswapV3Pool swap tests max full range liquidity at 1:1 price with default fee swap token1 for exactly 1.0000 token0 1`] = `
|
|
1802
|
+
Object {
|
|
1803
|
+
"amount0Before": "11505743598341114571255423385623647",
|
|
1804
|
+
"amount0Delta": "-1000000000000000000",
|
|
1805
|
+
"amount1Before": "11505743598341114571255423385506404",
|
|
1806
|
+
"amount1Delta": "1003009027081361094",
|
|
1807
|
+
"executionPrice": "1.0030",
|
|
1808
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
1809
|
+
"feeGrowthGlobal1X128Delta": "88991975927793784300",
|
|
1810
|
+
"poolPriceAfter": "1.0000",
|
|
1811
|
+
"poolPriceBefore": "1.0000",
|
|
1812
|
+
"tickAfter": 0,
|
|
1813
|
+
"tickBefore": 0,
|
|
1814
|
+
}
|
|
1815
|
+
`;
|
|
1816
|
+
|
|
1817
|
+
exports[`UniswapV3Pool swap tests max full range liquidity at 1:1 price with default fee swap token1 for exactly 1.0000 token0 to price 2.0000 1`] = `
|
|
1818
|
+
Object {
|
|
1819
|
+
"amount0Before": "11505743598341114571255423385623647",
|
|
1820
|
+
"amount0Delta": "-1000000000000000000",
|
|
1821
|
+
"amount1Before": "11505743598341114571255423385506404",
|
|
1822
|
+
"amount1Delta": "1003009027081361094",
|
|
1823
|
+
"executionPrice": "1.0030",
|
|
1824
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
1825
|
+
"feeGrowthGlobal1X128Delta": "88991975927793784300",
|
|
1826
|
+
"poolPriceAfter": "1.0000",
|
|
1827
|
+
"poolPriceBefore": "1.0000",
|
|
1828
|
+
"tickAfter": 0,
|
|
1829
|
+
"tickBefore": 0,
|
|
1830
|
+
}
|
|
1831
|
+
`;
|
|
1832
|
+
|
|
1833
|
+
exports[`UniswapV3Pool swap tests max full range liquidity at 1:1 price with default fee swap token1 for token0 to price 0.40000 1`] = `
|
|
1834
|
+
Object {
|
|
1835
|
+
"poolBalance0": "11505743598341114571255423385623647",
|
|
1836
|
+
"poolBalance1": "11505743598341114571255423385506404",
|
|
1837
|
+
"poolPriceBefore": "1.0000",
|
|
1838
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
1839
|
+
"tickBefore": 0,
|
|
1840
|
+
}
|
|
1841
|
+
`;
|
|
1842
|
+
|
|
1843
|
+
exports[`UniswapV3Pool swap tests max full range liquidity at 1:1 price with default fee swap token1 for token0 to price 2.5000 1`] = `
|
|
1844
|
+
Object {
|
|
1845
|
+
"amount0Before": "11505743598341114571255423385623647",
|
|
1846
|
+
"amount0Delta": "-4228872409409224753601131224936259",
|
|
1847
|
+
"amount1Before": "11505743598341114571255423385506404",
|
|
1848
|
+
"amount1Delta": "6706554036096900675845906992220230",
|
|
1849
|
+
"executionPrice": "1.5859",
|
|
1850
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
1851
|
+
"feeGrowthGlobal1X128Delta": "595039006852697512464428097884749099",
|
|
1852
|
+
"poolPriceAfter": "2.5000",
|
|
1853
|
+
"poolPriceBefore": "1.0000",
|
|
1854
|
+
"tickAfter": 9163,
|
|
1855
|
+
"tickBefore": 0,
|
|
1856
|
+
}
|
|
1857
|
+
`;
|
|
1858
|
+
|
|
1859
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 0 liquidity, all liquidity around current price swap exactly 0.0000000000000010000 token0 for token1 1`] = `
|
|
1860
|
+
Object {
|
|
1861
|
+
"amount0Before": "1994009290088178439",
|
|
1862
|
+
"amount0Delta": "1000",
|
|
1863
|
+
"amount1Before": "1994009290088178439",
|
|
1864
|
+
"amount1Delta": "-991",
|
|
1865
|
+
"executionPrice": "0.99100",
|
|
1866
|
+
"feeGrowthGlobal0X128Delta": "510423550381407695195",
|
|
1867
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
1868
|
+
"poolPriceAfter": "0.99402",
|
|
1869
|
+
"poolPriceBefore": "1.0000",
|
|
1870
|
+
"tickAfter": -61,
|
|
1871
|
+
"tickBefore": 0,
|
|
1872
|
+
}
|
|
1873
|
+
`;
|
|
1874
|
+
|
|
1875
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 0 liquidity, all liquidity around current price swap exactly 0.0000000000000010000 token1 for token0 1`] = `
|
|
1876
|
+
Object {
|
|
1877
|
+
"amount0Before": "1994009290088178439",
|
|
1878
|
+
"amount0Delta": "-991",
|
|
1879
|
+
"amount1Before": "1994009290088178439",
|
|
1880
|
+
"amount1Delta": "1000",
|
|
1881
|
+
"executionPrice": "1.0091",
|
|
1882
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
1883
|
+
"feeGrowthGlobal1X128Delta": "510423550381407695195",
|
|
1884
|
+
"poolPriceAfter": "1.0060",
|
|
1885
|
+
"poolPriceBefore": "1.0000",
|
|
1886
|
+
"tickAfter": 60,
|
|
1887
|
+
"tickBefore": 0,
|
|
1888
|
+
}
|
|
1889
|
+
`;
|
|
1890
|
+
|
|
1891
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 0 liquidity, all liquidity around current price swap exactly 1.0000 token0 for token1 1`] = `
|
|
1892
|
+
Object {
|
|
1893
|
+
"amount0Before": "1994009290088178439",
|
|
1894
|
+
"amount0Delta": "1000000000000000000",
|
|
1895
|
+
"amount1Before": "1994009290088178439",
|
|
1896
|
+
"amount1Delta": "-662011820624678025",
|
|
1897
|
+
"executionPrice": "0.66201",
|
|
1898
|
+
"feeGrowthGlobal0X128Delta": "510423550381407695195061911147652317",
|
|
1899
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
1900
|
+
"poolPriceAfter": "0.44355",
|
|
1901
|
+
"poolPriceBefore": "1.0000",
|
|
1902
|
+
"tickAfter": -8130,
|
|
1903
|
+
"tickBefore": 0,
|
|
1904
|
+
}
|
|
1905
|
+
`;
|
|
1906
|
+
|
|
1907
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 0 liquidity, all liquidity around current price swap exactly 1.0000 token0 for token1 to price 0.50000 1`] = `
|
|
1908
|
+
Object {
|
|
1909
|
+
"amount0Before": "1994009290088178439",
|
|
1910
|
+
"amount0Delta": "824893095908431542",
|
|
1911
|
+
"amount1Before": "1994009290088178439",
|
|
1912
|
+
"amount1Delta": "-579795727715083389",
|
|
1913
|
+
"executionPrice": "0.70287",
|
|
1914
|
+
"feeGrowthGlobal0X128Delta": "421044862698692740725170743495410672",
|
|
1915
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
1916
|
+
"poolPriceAfter": "0.50000",
|
|
1917
|
+
"poolPriceBefore": "1.0000",
|
|
1918
|
+
"tickAfter": -6932,
|
|
1919
|
+
"tickBefore": 0,
|
|
1920
|
+
}
|
|
1921
|
+
`;
|
|
1922
|
+
|
|
1923
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 0 liquidity, all liquidity around current price swap exactly 1.0000 token1 for token0 1`] = `
|
|
1924
|
+
Object {
|
|
1925
|
+
"amount0Before": "1994009290088178439",
|
|
1926
|
+
"amount0Delta": "-662011820624678025",
|
|
1927
|
+
"amount1Before": "1994009290088178439",
|
|
1928
|
+
"amount1Delta": "1000000000000000000",
|
|
1929
|
+
"executionPrice": "1.5105",
|
|
1930
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
1931
|
+
"feeGrowthGlobal1X128Delta": "510423550381407695195061911147652317",
|
|
1932
|
+
"poolPriceAfter": "2.2545",
|
|
1933
|
+
"poolPriceBefore": "1.0000",
|
|
1934
|
+
"tickAfter": 8129,
|
|
1935
|
+
"tickBefore": 0,
|
|
1936
|
+
}
|
|
1937
|
+
`;
|
|
1938
|
+
|
|
1939
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 0 liquidity, all liquidity around current price swap exactly 1.0000 token1 for token0 to price 2.0000 1`] = `
|
|
1940
|
+
Object {
|
|
1941
|
+
"amount0Before": "1994009290088178439",
|
|
1942
|
+
"amount0Delta": "-579795727715083389",
|
|
1943
|
+
"amount1Before": "1994009290088178439",
|
|
1944
|
+
"amount1Delta": "824893095908431542",
|
|
1945
|
+
"executionPrice": "1.4227",
|
|
1946
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
1947
|
+
"feeGrowthGlobal1X128Delta": "421044862698692740725170743495410672",
|
|
1948
|
+
"poolPriceAfter": "2.0000",
|
|
1949
|
+
"poolPriceBefore": "1.0000",
|
|
1950
|
+
"tickAfter": 6931,
|
|
1951
|
+
"tickBefore": 0,
|
|
1952
|
+
}
|
|
1953
|
+
`;
|
|
1954
|
+
|
|
1955
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 0 liquidity, all liquidity around current price swap token0 for exactly 0.0000000000000010000 token1 1`] = `
|
|
1956
|
+
Object {
|
|
1957
|
+
"amount0Before": "1994009290088178439",
|
|
1958
|
+
"amount0Delta": "1011",
|
|
1959
|
+
"amount1Before": "1994009290088178439",
|
|
1960
|
+
"amount1Delta": "-1000",
|
|
1961
|
+
"executionPrice": "0.98912",
|
|
1962
|
+
"feeGrowthGlobal0X128Delta": "680564733841876926926",
|
|
1963
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
1964
|
+
"poolPriceAfter": "0.99402",
|
|
1965
|
+
"poolPriceBefore": "1.0000",
|
|
1966
|
+
"tickAfter": -61,
|
|
1967
|
+
"tickBefore": 0,
|
|
1968
|
+
}
|
|
1969
|
+
`;
|
|
1970
|
+
|
|
1971
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 0 liquidity, all liquidity around current price swap token0 for exactly 1.0000 token1 1`] = `
|
|
1972
|
+
Object {
|
|
1973
|
+
"amount0Before": "1994009290088178439",
|
|
1974
|
+
"amount0Delta": "2024171064311638316",
|
|
1975
|
+
"amount1Before": "1994009290088178439",
|
|
1976
|
+
"amount1Delta": "-1000000000000000000",
|
|
1977
|
+
"executionPrice": "0.49403",
|
|
1978
|
+
"feeGrowthGlobal0X128Delta": "1033184581225259164735720748018047287",
|
|
1979
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
1980
|
+
"poolPriceAfter": "0.24701",
|
|
1981
|
+
"poolPriceBefore": "1.0000",
|
|
1982
|
+
"tickAfter": -13984,
|
|
1983
|
+
"tickBefore": 0,
|
|
1984
|
+
}
|
|
1985
|
+
`;
|
|
1986
|
+
|
|
1987
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 0 liquidity, all liquidity around current price swap token0 for exactly 1.0000 token1 to price 0.50000 1`] = `
|
|
1988
|
+
Object {
|
|
1989
|
+
"amount0Before": "1994009290088178439",
|
|
1990
|
+
"amount0Delta": "824893095908431542",
|
|
1991
|
+
"amount1Before": "1994009290088178439",
|
|
1992
|
+
"amount1Delta": "-579795727715083389",
|
|
1993
|
+
"executionPrice": "0.70287",
|
|
1994
|
+
"feeGrowthGlobal0X128Delta": "421044862698692740725170743495410672",
|
|
1995
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
1996
|
+
"poolPriceAfter": "0.50000",
|
|
1997
|
+
"poolPriceBefore": "1.0000",
|
|
1998
|
+
"tickAfter": -6932,
|
|
1999
|
+
"tickBefore": 0,
|
|
2000
|
+
}
|
|
2001
|
+
`;
|
|
2002
|
+
|
|
2003
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 0 liquidity, all liquidity around current price swap token0 for token1 to price 0.40000 1`] = `
|
|
2004
|
+
Object {
|
|
2005
|
+
"amount0Before": "1994009290088178439",
|
|
2006
|
+
"amount0Delta": "1159748196632793863",
|
|
2007
|
+
"amount1Before": "1994009290088178439",
|
|
2008
|
+
"amount1Delta": "-729098226020826705",
|
|
2009
|
+
"executionPrice": "0.62867",
|
|
2010
|
+
"feeGrowthGlobal0X128Delta": "591962792073745646583043420635066071",
|
|
2011
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
2012
|
+
"poolPriceAfter": "0.40000",
|
|
2013
|
+
"poolPriceBefore": "1.0000",
|
|
2014
|
+
"tickAfter": -9164,
|
|
2015
|
+
"tickBefore": 0,
|
|
2016
|
+
}
|
|
2017
|
+
`;
|
|
2018
|
+
|
|
2019
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 0 liquidity, all liquidity around current price swap token0 for token1 to price 2.5000 1`] = `
|
|
2020
|
+
Object {
|
|
2021
|
+
"poolBalance0": "1994009290088178439",
|
|
2022
|
+
"poolBalance1": "1994009290088178439",
|
|
2023
|
+
"poolPriceBefore": "1.0000",
|
|
2024
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
2025
|
+
"tickBefore": 0,
|
|
2026
|
+
}
|
|
2027
|
+
`;
|
|
2028
|
+
|
|
2029
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 0 liquidity, all liquidity around current price swap token1 for exactly 0.0000000000000010000 token0 1`] = `
|
|
2030
|
+
Object {
|
|
2031
|
+
"amount0Before": "1994009290088178439",
|
|
2032
|
+
"amount0Delta": "-1000",
|
|
2033
|
+
"amount1Before": "1994009290088178439",
|
|
2034
|
+
"amount1Delta": "1011",
|
|
2035
|
+
"executionPrice": "1.0110",
|
|
2036
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
2037
|
+
"feeGrowthGlobal1X128Delta": "680564733841876926926",
|
|
2038
|
+
"poolPriceAfter": "1.0060",
|
|
2039
|
+
"poolPriceBefore": "1.0000",
|
|
2040
|
+
"tickAfter": 60,
|
|
2041
|
+
"tickBefore": 0,
|
|
2042
|
+
}
|
|
2043
|
+
`;
|
|
2044
|
+
|
|
2045
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 0 liquidity, all liquidity around current price swap token1 for exactly 1.0000 token0 1`] = `
|
|
2046
|
+
Object {
|
|
2047
|
+
"amount0Before": "1994009290088178439",
|
|
2048
|
+
"amount0Delta": "-1000000000000000000",
|
|
2049
|
+
"amount1Before": "1994009290088178439",
|
|
2050
|
+
"amount1Delta": "2024171064311638316",
|
|
2051
|
+
"executionPrice": "2.0242",
|
|
2052
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
2053
|
+
"feeGrowthGlobal1X128Delta": "1033184581225259164735720748018047287",
|
|
2054
|
+
"poolPriceAfter": "4.0484",
|
|
2055
|
+
"poolPriceBefore": "1.0000",
|
|
2056
|
+
"tickAfter": 13983,
|
|
2057
|
+
"tickBefore": 0,
|
|
2058
|
+
}
|
|
2059
|
+
`;
|
|
2060
|
+
|
|
2061
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 0 liquidity, all liquidity around current price swap token1 for exactly 1.0000 token0 to price 2.0000 1`] = `
|
|
2062
|
+
Object {
|
|
2063
|
+
"amount0Before": "1994009290088178439",
|
|
2064
|
+
"amount0Delta": "-579795727715083389",
|
|
2065
|
+
"amount1Before": "1994009290088178439",
|
|
2066
|
+
"amount1Delta": "824893095908431542",
|
|
2067
|
+
"executionPrice": "1.4227",
|
|
2068
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
2069
|
+
"feeGrowthGlobal1X128Delta": "421044862698692740725170743495410672",
|
|
2070
|
+
"poolPriceAfter": "2.0000",
|
|
2071
|
+
"poolPriceBefore": "1.0000",
|
|
2072
|
+
"tickAfter": 6931,
|
|
2073
|
+
"tickBefore": 0,
|
|
2074
|
+
}
|
|
2075
|
+
`;
|
|
2076
|
+
|
|
2077
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 0 liquidity, all liquidity around current price swap token1 for token0 to price 0.40000 1`] = `
|
|
2078
|
+
Object {
|
|
2079
|
+
"poolBalance0": "1994009290088178439",
|
|
2080
|
+
"poolBalance1": "1994009290088178439",
|
|
2081
|
+
"poolPriceBefore": "1.0000",
|
|
2082
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
2083
|
+
"tickBefore": 0,
|
|
2084
|
+
}
|
|
2085
|
+
`;
|
|
2086
|
+
|
|
2087
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 0 liquidity, all liquidity around current price swap token1 for token0 to price 2.5000 1`] = `
|
|
2088
|
+
Object {
|
|
2089
|
+
"amount0Before": "1994009290088178439",
|
|
2090
|
+
"amount0Delta": "-729098226020826705",
|
|
2091
|
+
"amount1Before": "1994009290088178439",
|
|
2092
|
+
"amount1Delta": "1159748196632793863",
|
|
2093
|
+
"executionPrice": "1.5907",
|
|
2094
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
2095
|
+
"feeGrowthGlobal1X128Delta": "591962792073745646583043420635066071",
|
|
2096
|
+
"poolPriceAfter": "2.5000",
|
|
2097
|
+
"poolPriceBefore": "1.0000",
|
|
2098
|
+
"tickAfter": 9163,
|
|
2099
|
+
"tickBefore": 0,
|
|
2100
|
+
}
|
|
2101
|
+
`;
|
|
2102
|
+
|
|
2103
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 2e18 max range liquidity swap exactly 0.0000000000000010000 token0 for token1 1`] = `
|
|
2104
|
+
Object {
|
|
2105
|
+
"amount0Before": "2000000000000000000",
|
|
2106
|
+
"amount0Delta": "1000",
|
|
2107
|
+
"amount1Before": "2000000000000000000",
|
|
2108
|
+
"amount1Delta": "-996",
|
|
2109
|
+
"executionPrice": "0.99600",
|
|
2110
|
+
"feeGrowthGlobal0X128Delta": "510423550381407695195",
|
|
2111
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
2112
|
+
"poolPriceAfter": "1.0000",
|
|
2113
|
+
"poolPriceBefore": "1.0000",
|
|
2114
|
+
"tickAfter": -1,
|
|
2115
|
+
"tickBefore": 0,
|
|
2116
|
+
}
|
|
2117
|
+
`;
|
|
2118
|
+
|
|
2119
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 2e18 max range liquidity swap exactly 0.0000000000000010000 token1 for token0 1`] = `
|
|
2120
|
+
Object {
|
|
2121
|
+
"amount0Before": "2000000000000000000",
|
|
2122
|
+
"amount0Delta": "-996",
|
|
2123
|
+
"amount1Before": "2000000000000000000",
|
|
2124
|
+
"amount1Delta": "1000",
|
|
2125
|
+
"executionPrice": "1.0040",
|
|
2126
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
2127
|
+
"feeGrowthGlobal1X128Delta": "510423550381407695195",
|
|
2128
|
+
"poolPriceAfter": "1.0000",
|
|
2129
|
+
"poolPriceBefore": "1.0000",
|
|
2130
|
+
"tickAfter": 0,
|
|
2131
|
+
"tickBefore": 0,
|
|
2132
|
+
}
|
|
2133
|
+
`;
|
|
2134
|
+
|
|
2135
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 2e18 max range liquidity swap exactly 1.0000 token0 for token1 1`] = `
|
|
2136
|
+
Object {
|
|
2137
|
+
"amount0Before": "2000000000000000000",
|
|
2138
|
+
"amount0Delta": "1000000000000000000",
|
|
2139
|
+
"amount1Before": "2000000000000000000",
|
|
2140
|
+
"amount1Delta": "-665331998665331998",
|
|
2141
|
+
"executionPrice": "0.66533",
|
|
2142
|
+
"feeGrowthGlobal0X128Delta": "510423550381407695195061911147652317",
|
|
2143
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
2144
|
+
"poolPriceAfter": "0.44533",
|
|
2145
|
+
"poolPriceBefore": "1.0000",
|
|
2146
|
+
"tickAfter": -8090,
|
|
2147
|
+
"tickBefore": 0,
|
|
2148
|
+
}
|
|
2149
|
+
`;
|
|
2150
|
+
|
|
2151
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 2e18 max range liquidity swap exactly 1.0000 token0 for token1 to price 0.50000 1`] = `
|
|
2152
|
+
Object {
|
|
2153
|
+
"amount0Before": "2000000000000000000",
|
|
2154
|
+
"amount0Delta": "830919884399388263",
|
|
2155
|
+
"amount1Before": "2000000000000000000",
|
|
2156
|
+
"amount1Delta": "-585786437626904951",
|
|
2157
|
+
"executionPrice": "0.70499",
|
|
2158
|
+
"feeGrowthGlobal0X128Delta": "424121077477644648929101317621422688",
|
|
2159
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
2160
|
+
"poolPriceAfter": "0.50000",
|
|
2161
|
+
"poolPriceBefore": "1.0000",
|
|
2162
|
+
"tickAfter": -6932,
|
|
2163
|
+
"tickBefore": 0,
|
|
2164
|
+
}
|
|
2165
|
+
`;
|
|
2166
|
+
|
|
2167
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 2e18 max range liquidity swap exactly 1.0000 token1 for token0 1`] = `
|
|
2168
|
+
Object {
|
|
2169
|
+
"amount0Before": "2000000000000000000",
|
|
2170
|
+
"amount0Delta": "-665331998665331998",
|
|
2171
|
+
"amount1Before": "2000000000000000000",
|
|
2172
|
+
"amount1Delta": "1000000000000000000",
|
|
2173
|
+
"executionPrice": "1.5030",
|
|
2174
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
2175
|
+
"feeGrowthGlobal1X128Delta": "510423550381407695195061911147652317",
|
|
2176
|
+
"poolPriceAfter": "2.2455",
|
|
2177
|
+
"poolPriceBefore": "1.0000",
|
|
2178
|
+
"tickAfter": 8089,
|
|
2179
|
+
"tickBefore": 0,
|
|
2180
|
+
}
|
|
2181
|
+
`;
|
|
2182
|
+
|
|
2183
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 2e18 max range liquidity swap exactly 1.0000 token1 for token0 to price 2.0000 1`] = `
|
|
2184
|
+
Object {
|
|
2185
|
+
"amount0Before": "2000000000000000000",
|
|
2186
|
+
"amount0Delta": "-585786437626904951",
|
|
2187
|
+
"amount1Before": "2000000000000000000",
|
|
2188
|
+
"amount1Delta": "830919884399388263",
|
|
2189
|
+
"executionPrice": "1.4185",
|
|
2190
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
2191
|
+
"feeGrowthGlobal1X128Delta": "424121077477644648929101317621422688",
|
|
2192
|
+
"poolPriceAfter": "2.0000",
|
|
2193
|
+
"poolPriceBefore": "1.0000",
|
|
2194
|
+
"tickAfter": 6931,
|
|
2195
|
+
"tickBefore": 0,
|
|
2196
|
+
}
|
|
2197
|
+
`;
|
|
2198
|
+
|
|
2199
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 2e18 max range liquidity swap token0 for exactly 0.0000000000000010000 token1 1`] = `
|
|
2200
|
+
Object {
|
|
2201
|
+
"amount0Before": "2000000000000000000",
|
|
2202
|
+
"amount0Delta": "1005",
|
|
2203
|
+
"amount1Before": "2000000000000000000",
|
|
2204
|
+
"amount1Delta": "-1000",
|
|
2205
|
+
"executionPrice": "0.99502",
|
|
2206
|
+
"feeGrowthGlobal0X128Delta": "680564733841876926926",
|
|
2207
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
2208
|
+
"poolPriceAfter": "1.0000",
|
|
2209
|
+
"poolPriceBefore": "1.0000",
|
|
2210
|
+
"tickAfter": -1,
|
|
2211
|
+
"tickBefore": 0,
|
|
2212
|
+
}
|
|
2213
|
+
`;
|
|
2214
|
+
|
|
2215
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 2e18 max range liquidity swap token0 for exactly 1.0000 token1 1`] = `
|
|
2216
|
+
Object {
|
|
2217
|
+
"amount0Before": "2000000000000000000",
|
|
2218
|
+
"amount0Delta": "2006018054162487463",
|
|
2219
|
+
"amount1Before": "2000000000000000000",
|
|
2220
|
+
"amount1Delta": "-1000000000000000000",
|
|
2221
|
+
"executionPrice": "0.49850",
|
|
2222
|
+
"feeGrowthGlobal0X128Delta": "1023918857334819954209013958517557896",
|
|
2223
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
2224
|
+
"poolPriceAfter": "0.25000",
|
|
2225
|
+
"poolPriceBefore": "1.0000",
|
|
2226
|
+
"tickAfter": -13864,
|
|
2227
|
+
"tickBefore": 0,
|
|
2228
|
+
}
|
|
2229
|
+
`;
|
|
2230
|
+
|
|
2231
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 2e18 max range liquidity swap token0 for exactly 1.0000 token1 to price 0.50000 1`] = `
|
|
2232
|
+
Object {
|
|
2233
|
+
"amount0Before": "2000000000000000000",
|
|
2234
|
+
"amount0Delta": "830919884399388263",
|
|
2235
|
+
"amount1Before": "2000000000000000000",
|
|
2236
|
+
"amount1Delta": "-585786437626904951",
|
|
2237
|
+
"executionPrice": "0.70499",
|
|
2238
|
+
"feeGrowthGlobal0X128Delta": "424121077477644648929101317621422688",
|
|
2239
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
2240
|
+
"poolPriceAfter": "0.50000",
|
|
2241
|
+
"poolPriceBefore": "1.0000",
|
|
2242
|
+
"tickAfter": -6932,
|
|
2243
|
+
"tickBefore": 0,
|
|
2244
|
+
}
|
|
2245
|
+
`;
|
|
2246
|
+
|
|
2247
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 2e18 max range liquidity swap token0 for token1 to price 0.40000 1`] = `
|
|
2248
|
+
Object {
|
|
2249
|
+
"amount0Before": "2000000000000000000",
|
|
2250
|
+
"amount0Delta": "1165774985123750584",
|
|
2251
|
+
"amount1Before": "2000000000000000000",
|
|
2252
|
+
"amount1Delta": "-735088935932648267",
|
|
2253
|
+
"executionPrice": "0.63056",
|
|
2254
|
+
"feeGrowthGlobal0X128Delta": "595039006852697554786973994761078087",
|
|
2255
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
2256
|
+
"poolPriceAfter": "0.40000",
|
|
2257
|
+
"poolPriceBefore": "1.0000",
|
|
2258
|
+
"tickAfter": -9164,
|
|
2259
|
+
"tickBefore": 0,
|
|
2260
|
+
}
|
|
2261
|
+
`;
|
|
2262
|
+
|
|
2263
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 2e18 max range liquidity swap token0 for token1 to price 2.5000 1`] = `
|
|
2264
|
+
Object {
|
|
2265
|
+
"poolBalance0": "2000000000000000000",
|
|
2266
|
+
"poolBalance1": "2000000000000000000",
|
|
2267
|
+
"poolPriceBefore": "1.0000",
|
|
2268
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
2269
|
+
"tickBefore": 0,
|
|
2270
|
+
}
|
|
2271
|
+
`;
|
|
2272
|
+
|
|
2273
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 2e18 max range liquidity swap token1 for exactly 0.0000000000000010000 token0 1`] = `
|
|
2274
|
+
Object {
|
|
2275
|
+
"amount0Before": "2000000000000000000",
|
|
2276
|
+
"amount0Delta": "-1000",
|
|
2277
|
+
"amount1Before": "2000000000000000000",
|
|
2278
|
+
"amount1Delta": "1005",
|
|
2279
|
+
"executionPrice": "1.0050",
|
|
2280
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
2281
|
+
"feeGrowthGlobal1X128Delta": "680564733841876926926",
|
|
2282
|
+
"poolPriceAfter": "1.0000",
|
|
2283
|
+
"poolPriceBefore": "1.0000",
|
|
2284
|
+
"tickAfter": 0,
|
|
2285
|
+
"tickBefore": 0,
|
|
2286
|
+
}
|
|
2287
|
+
`;
|
|
2288
|
+
|
|
2289
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 2e18 max range liquidity swap token1 for exactly 1.0000 token0 1`] = `
|
|
2290
|
+
Object {
|
|
2291
|
+
"amount0Before": "2000000000000000000",
|
|
2292
|
+
"amount0Delta": "-1000000000000000000",
|
|
2293
|
+
"amount1Before": "2000000000000000000",
|
|
2294
|
+
"amount1Delta": "2006018054162487463",
|
|
2295
|
+
"executionPrice": "2.0060",
|
|
2296
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
2297
|
+
"feeGrowthGlobal1X128Delta": "1023918857334819954209013958517557896",
|
|
2298
|
+
"poolPriceAfter": "4.0000",
|
|
2299
|
+
"poolPriceBefore": "1.0000",
|
|
2300
|
+
"tickAfter": 13863,
|
|
2301
|
+
"tickBefore": 0,
|
|
2302
|
+
}
|
|
2303
|
+
`;
|
|
2304
|
+
|
|
2305
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 2e18 max range liquidity swap token1 for exactly 1.0000 token0 to price 2.0000 1`] = `
|
|
2306
|
+
Object {
|
|
2307
|
+
"amount0Before": "2000000000000000000",
|
|
2308
|
+
"amount0Delta": "-585786437626904951",
|
|
2309
|
+
"amount1Before": "2000000000000000000",
|
|
2310
|
+
"amount1Delta": "830919884399388263",
|
|
2311
|
+
"executionPrice": "1.4185",
|
|
2312
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
2313
|
+
"feeGrowthGlobal1X128Delta": "424121077477644648929101317621422688",
|
|
2314
|
+
"poolPriceAfter": "2.0000",
|
|
2315
|
+
"poolPriceBefore": "1.0000",
|
|
2316
|
+
"tickAfter": 6931,
|
|
2317
|
+
"tickBefore": 0,
|
|
2318
|
+
}
|
|
2319
|
+
`;
|
|
2320
|
+
|
|
2321
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 2e18 max range liquidity swap token1 for token0 to price 0.40000 1`] = `
|
|
2322
|
+
Object {
|
|
2323
|
+
"poolBalance0": "2000000000000000000",
|
|
2324
|
+
"poolBalance1": "2000000000000000000",
|
|
2325
|
+
"poolPriceBefore": "1.0000",
|
|
2326
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
2327
|
+
"tickBefore": 0,
|
|
2328
|
+
}
|
|
2329
|
+
`;
|
|
2330
|
+
|
|
2331
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, 2e18 max range liquidity swap token1 for token0 to price 2.5000 1`] = `
|
|
2332
|
+
Object {
|
|
2333
|
+
"amount0Before": "2000000000000000000",
|
|
2334
|
+
"amount0Delta": "-735088935932648267",
|
|
2335
|
+
"amount1Before": "2000000000000000000",
|
|
2336
|
+
"amount1Delta": "1165774985123750584",
|
|
2337
|
+
"executionPrice": "1.5859",
|
|
2338
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
2339
|
+
"feeGrowthGlobal1X128Delta": "595039006852697554786973994761078087",
|
|
2340
|
+
"poolPriceAfter": "2.5000",
|
|
2341
|
+
"poolPriceBefore": "1.0000",
|
|
2342
|
+
"tickAfter": 9163,
|
|
2343
|
+
"tickBefore": 0,
|
|
2344
|
+
}
|
|
2345
|
+
`;
|
|
2346
|
+
|
|
2347
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, additional liquidity around current price swap exactly 0.0000000000000010000 token0 for token1 1`] = `
|
|
2348
|
+
Object {
|
|
2349
|
+
"amount0Before": "3994009290088178439",
|
|
2350
|
+
"amount0Delta": "1000",
|
|
2351
|
+
"amount1Before": "3994009290088178439",
|
|
2352
|
+
"amount1Delta": "-996",
|
|
2353
|
+
"executionPrice": "0.99600",
|
|
2354
|
+
"feeGrowthGlobal0X128Delta": "510423550381407695195",
|
|
2355
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
2356
|
+
"poolPriceAfter": "1.0000",
|
|
2357
|
+
"poolPriceBefore": "1.0000",
|
|
2358
|
+
"tickAfter": -1,
|
|
2359
|
+
"tickBefore": 0,
|
|
2360
|
+
}
|
|
2361
|
+
`;
|
|
2362
|
+
|
|
2363
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, additional liquidity around current price swap exactly 0.0000000000000010000 token1 for token0 1`] = `
|
|
2364
|
+
Object {
|
|
2365
|
+
"amount0Before": "3994009290088178439",
|
|
2366
|
+
"amount0Delta": "-996",
|
|
2367
|
+
"amount1Before": "3994009290088178439",
|
|
2368
|
+
"amount1Delta": "1000",
|
|
2369
|
+
"executionPrice": "1.0040",
|
|
2370
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
2371
|
+
"feeGrowthGlobal1X128Delta": "510423550381407695195",
|
|
2372
|
+
"poolPriceAfter": "1.0000",
|
|
2373
|
+
"poolPriceBefore": "1.0000",
|
|
2374
|
+
"tickAfter": 0,
|
|
2375
|
+
"tickBefore": 0,
|
|
2376
|
+
}
|
|
2377
|
+
`;
|
|
2378
|
+
|
|
2379
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, additional liquidity around current price swap exactly 1.0000 token0 for token1 1`] = `
|
|
2380
|
+
Object {
|
|
2381
|
+
"amount0Before": "3994009290088178439",
|
|
2382
|
+
"amount0Delta": "1000000000000000000",
|
|
2383
|
+
"amount1Before": "3994009290088178439",
|
|
2384
|
+
"amount1Delta": "-795933705287758544",
|
|
2385
|
+
"executionPrice": "0.79593",
|
|
2386
|
+
"feeGrowthGlobal0X128Delta": "256749882580179971840679703106063897",
|
|
2387
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
2388
|
+
"poolPriceAfter": "0.63923",
|
|
2389
|
+
"poolPriceBefore": "1.0000",
|
|
2390
|
+
"tickAfter": -4476,
|
|
2391
|
+
"tickBefore": 0,
|
|
2392
|
+
}
|
|
2393
|
+
`;
|
|
2394
|
+
|
|
2395
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, additional liquidity around current price swap exactly 1.0000 token0 for token1 to price 0.50000 1`] = `
|
|
2396
|
+
Object {
|
|
2397
|
+
"amount0Before": "3994009290088178439",
|
|
2398
|
+
"amount0Delta": "1000000000000000000",
|
|
2399
|
+
"amount1Before": "3994009290088178439",
|
|
2400
|
+
"amount1Delta": "-795933705287758544",
|
|
2401
|
+
"executionPrice": "0.79593",
|
|
2402
|
+
"feeGrowthGlobal0X128Delta": "256749882580179971840679703106063897",
|
|
2403
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
2404
|
+
"poolPriceAfter": "0.63923",
|
|
2405
|
+
"poolPriceBefore": "1.0000",
|
|
2406
|
+
"tickAfter": -4476,
|
|
2407
|
+
"tickBefore": 0,
|
|
2408
|
+
}
|
|
2409
|
+
`;
|
|
2410
|
+
|
|
2411
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, additional liquidity around current price swap exactly 1.0000 token1 for token0 1`] = `
|
|
2412
|
+
Object {
|
|
2413
|
+
"amount0Before": "3994009290088178439",
|
|
2414
|
+
"amount0Delta": "-795933705287758544",
|
|
2415
|
+
"amount1Before": "3994009290088178439",
|
|
2416
|
+
"amount1Delta": "1000000000000000000",
|
|
2417
|
+
"executionPrice": "1.2564",
|
|
2418
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
2419
|
+
"feeGrowthGlobal1X128Delta": "256749882580179971840679703106063897",
|
|
2420
|
+
"poolPriceAfter": "1.5644",
|
|
2421
|
+
"poolPriceBefore": "1.0000",
|
|
2422
|
+
"tickAfter": 4475,
|
|
2423
|
+
"tickBefore": 0,
|
|
2424
|
+
}
|
|
2425
|
+
`;
|
|
2426
|
+
|
|
2427
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, additional liquidity around current price swap exactly 1.0000 token1 for token0 to price 2.0000 1`] = `
|
|
2428
|
+
Object {
|
|
2429
|
+
"amount0Before": "3994009290088178439",
|
|
2430
|
+
"amount0Delta": "-795933705287758544",
|
|
2431
|
+
"amount1Before": "3994009290088178439",
|
|
2432
|
+
"amount1Delta": "1000000000000000000",
|
|
2433
|
+
"executionPrice": "1.2564",
|
|
2434
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
2435
|
+
"feeGrowthGlobal1X128Delta": "256749882580179971840679703106063897",
|
|
2436
|
+
"poolPriceAfter": "1.5644",
|
|
2437
|
+
"poolPriceBefore": "1.0000",
|
|
2438
|
+
"tickAfter": 4475,
|
|
2439
|
+
"tickBefore": 0,
|
|
2440
|
+
}
|
|
2441
|
+
`;
|
|
2442
|
+
|
|
2443
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, additional liquidity around current price swap token0 for exactly 0.0000000000000010000 token1 1`] = `
|
|
2444
|
+
Object {
|
|
2445
|
+
"amount0Before": "3994009290088178439",
|
|
2446
|
+
"amount0Delta": "1005",
|
|
2447
|
+
"amount1Before": "3994009290088178439",
|
|
2448
|
+
"amount1Delta": "-1000",
|
|
2449
|
+
"executionPrice": "0.99502",
|
|
2450
|
+
"feeGrowthGlobal0X128Delta": "680564733841876926926",
|
|
2451
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
2452
|
+
"poolPriceAfter": "1.0000",
|
|
2453
|
+
"poolPriceBefore": "1.0000",
|
|
2454
|
+
"tickAfter": -1,
|
|
2455
|
+
"tickBefore": 0,
|
|
2456
|
+
}
|
|
2457
|
+
`;
|
|
2458
|
+
|
|
2459
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, additional liquidity around current price swap token0 for exactly 1.0000 token1 1`] = `
|
|
2460
|
+
Object {
|
|
2461
|
+
"amount0Before": "3994009290088178439",
|
|
2462
|
+
"amount0Delta": "1342022152495072924",
|
|
2463
|
+
"amount1Before": "3994009290088178439",
|
|
2464
|
+
"amount1Delta": "-1000000000000000000",
|
|
2465
|
+
"executionPrice": "0.74514",
|
|
2466
|
+
"feeGrowthGlobal0X128Delta": "344037963272993171369654596359692757",
|
|
2467
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
2468
|
+
"poolPriceAfter": "0.56026",
|
|
2469
|
+
"poolPriceBefore": "1.0000",
|
|
2470
|
+
"tickAfter": -5794,
|
|
2471
|
+
"tickBefore": 0,
|
|
2472
|
+
}
|
|
2473
|
+
`;
|
|
2474
|
+
|
|
2475
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, additional liquidity around current price swap token0 for exactly 1.0000 token1 to price 0.50000 1`] = `
|
|
2476
|
+
Object {
|
|
2477
|
+
"amount0Before": "3994009290088178439",
|
|
2478
|
+
"amount0Delta": "1342022152495072924",
|
|
2479
|
+
"amount1Before": "3994009290088178439",
|
|
2480
|
+
"amount1Delta": "-1000000000000000000",
|
|
2481
|
+
"executionPrice": "0.74514",
|
|
2482
|
+
"feeGrowthGlobal0X128Delta": "344037963272993171369654596359692757",
|
|
2483
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
2484
|
+
"poolPriceAfter": "0.56026",
|
|
2485
|
+
"poolPriceBefore": "1.0000",
|
|
2486
|
+
"tickAfter": -5794,
|
|
2487
|
+
"tickBefore": 0,
|
|
2488
|
+
}
|
|
2489
|
+
`;
|
|
2490
|
+
|
|
2491
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, additional liquidity around current price swap token0 for token1 to price 0.40000 1`] = `
|
|
2492
|
+
Object {
|
|
2493
|
+
"amount0Before": "3994009290088178439",
|
|
2494
|
+
"amount0Delta": "2325523181756544449",
|
|
2495
|
+
"amount1Before": "3994009290088178439",
|
|
2496
|
+
"amount1Delta": "-1464187161953474971",
|
|
2497
|
+
"executionPrice": "0.62962",
|
|
2498
|
+
"feeGrowthGlobal0X128Delta": "595039006852697724928157455230309818",
|
|
2499
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
2500
|
+
"poolPriceAfter": "0.40000",
|
|
2501
|
+
"poolPriceBefore": "1.0000",
|
|
2502
|
+
"tickAfter": -9164,
|
|
2503
|
+
"tickBefore": 0,
|
|
2504
|
+
}
|
|
2505
|
+
`;
|
|
2506
|
+
|
|
2507
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, additional liquidity around current price swap token0 for token1 to price 2.5000 1`] = `
|
|
2508
|
+
Object {
|
|
2509
|
+
"poolBalance0": "3994009290088178439",
|
|
2510
|
+
"poolBalance1": "3994009290088178439",
|
|
2511
|
+
"poolPriceBefore": "1.0000",
|
|
2512
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
2513
|
+
"tickBefore": 0,
|
|
2514
|
+
}
|
|
2515
|
+
`;
|
|
2516
|
+
|
|
2517
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, additional liquidity around current price swap token1 for exactly 0.0000000000000010000 token0 1`] = `
|
|
2518
|
+
Object {
|
|
2519
|
+
"amount0Before": "3994009290088178439",
|
|
2520
|
+
"amount0Delta": "-1000",
|
|
2521
|
+
"amount1Before": "3994009290088178439",
|
|
2522
|
+
"amount1Delta": "1005",
|
|
2523
|
+
"executionPrice": "1.0050",
|
|
2524
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
2525
|
+
"feeGrowthGlobal1X128Delta": "680564733841876926926",
|
|
2526
|
+
"poolPriceAfter": "1.0000",
|
|
2527
|
+
"poolPriceBefore": "1.0000",
|
|
2528
|
+
"tickAfter": 0,
|
|
2529
|
+
"tickBefore": 0,
|
|
2530
|
+
}
|
|
2531
|
+
`;
|
|
2532
|
+
|
|
2533
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, additional liquidity around current price swap token1 for exactly 1.0000 token0 1`] = `
|
|
2534
|
+
Object {
|
|
2535
|
+
"amount0Before": "3994009290088178439",
|
|
2536
|
+
"amount0Delta": "-1000000000000000000",
|
|
2537
|
+
"amount1Before": "3994009290088178439",
|
|
2538
|
+
"amount1Delta": "1342022152495072924",
|
|
2539
|
+
"executionPrice": "1.3420",
|
|
2540
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
2541
|
+
"feeGrowthGlobal1X128Delta": "344037963272993171369654596359692757",
|
|
2542
|
+
"poolPriceAfter": "1.7849",
|
|
2543
|
+
"poolPriceBefore": "1.0000",
|
|
2544
|
+
"tickAfter": 5793,
|
|
2545
|
+
"tickBefore": 0,
|
|
2546
|
+
}
|
|
2547
|
+
`;
|
|
2548
|
+
|
|
2549
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, additional liquidity around current price swap token1 for exactly 1.0000 token0 to price 2.0000 1`] = `
|
|
2550
|
+
Object {
|
|
2551
|
+
"amount0Before": "3994009290088178439",
|
|
2552
|
+
"amount0Delta": "-1000000000000000000",
|
|
2553
|
+
"amount1Before": "3994009290088178439",
|
|
2554
|
+
"amount1Delta": "1342022152495072924",
|
|
2555
|
+
"executionPrice": "1.3420",
|
|
2556
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
2557
|
+
"feeGrowthGlobal1X128Delta": "344037963272993171369654596359692757",
|
|
2558
|
+
"poolPriceAfter": "1.7849",
|
|
2559
|
+
"poolPriceBefore": "1.0000",
|
|
2560
|
+
"tickAfter": 5793,
|
|
2561
|
+
"tickBefore": 0,
|
|
2562
|
+
}
|
|
2563
|
+
`;
|
|
2564
|
+
|
|
2565
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, additional liquidity around current price swap token1 for token0 to price 0.40000 1`] = `
|
|
2566
|
+
Object {
|
|
2567
|
+
"poolBalance0": "3994009290088178439",
|
|
2568
|
+
"poolBalance1": "3994009290088178439",
|
|
2569
|
+
"poolPriceBefore": "1.0000",
|
|
2570
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
2571
|
+
"tickBefore": 0,
|
|
2572
|
+
}
|
|
2573
|
+
`;
|
|
2574
|
+
|
|
2575
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:1 price, additional liquidity around current price swap token1 for token0 to price 2.5000 1`] = `
|
|
2576
|
+
Object {
|
|
2577
|
+
"amount0Before": "3994009290088178439",
|
|
2578
|
+
"amount0Delta": "-1464187161953474971",
|
|
2579
|
+
"amount1Before": "3994009290088178439",
|
|
2580
|
+
"amount1Delta": "2325523181756544449",
|
|
2581
|
+
"executionPrice": "1.5883",
|
|
2582
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
2583
|
+
"feeGrowthGlobal1X128Delta": "595039006852697724928157455230309818",
|
|
2584
|
+
"poolPriceAfter": "2.5000",
|
|
2585
|
+
"poolPriceBefore": "1.0000",
|
|
2586
|
+
"tickAfter": 9163,
|
|
2587
|
+
"tickBefore": 0,
|
|
2588
|
+
}
|
|
2589
|
+
`;
|
|
2590
|
+
|
|
2591
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:10 price, 2e18 max range liquidity swap exactly 0.0000000000000010000 token0 for token1 1`] = `
|
|
2592
|
+
Object {
|
|
2593
|
+
"amount0Before": "6324555320336758664",
|
|
2594
|
+
"amount0Delta": "1000",
|
|
2595
|
+
"amount1Before": "632455532033675867",
|
|
2596
|
+
"amount1Delta": "-99",
|
|
2597
|
+
"executionPrice": "0.099000",
|
|
2598
|
+
"feeGrowthGlobal0X128Delta": "510423550381407695195",
|
|
2599
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
2600
|
+
"poolPriceAfter": "0.10000",
|
|
2601
|
+
"poolPriceBefore": "0.10000",
|
|
2602
|
+
"tickAfter": -23028,
|
|
2603
|
+
"tickBefore": -23028,
|
|
2604
|
+
}
|
|
2605
|
+
`;
|
|
2606
|
+
|
|
2607
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:10 price, 2e18 max range liquidity swap exactly 0.0000000000000010000 token1 for token0 1`] = `
|
|
2608
|
+
Object {
|
|
2609
|
+
"amount0Before": "6324555320336758664",
|
|
2610
|
+
"amount0Delta": "-9969",
|
|
2611
|
+
"amount1Before": "632455532033675867",
|
|
2612
|
+
"amount1Delta": "1000",
|
|
2613
|
+
"executionPrice": "0.10031",
|
|
2614
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
2615
|
+
"feeGrowthGlobal1X128Delta": "510423550381407695195",
|
|
2616
|
+
"poolPriceAfter": "0.10000",
|
|
2617
|
+
"poolPriceBefore": "0.10000",
|
|
2618
|
+
"tickAfter": -23028,
|
|
2619
|
+
"tickBefore": -23028,
|
|
2620
|
+
}
|
|
2621
|
+
`;
|
|
2622
|
+
|
|
2623
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:10 price, 2e18 max range liquidity swap exactly 1.0000 token0 for token1 1`] = `
|
|
2624
|
+
Object {
|
|
2625
|
+
"amount0Before": "6324555320336758664",
|
|
2626
|
+
"amount0Delta": "1000000000000000000",
|
|
2627
|
+
"amount1Before": "632455532033675867",
|
|
2628
|
+
"amount1Delta": "-86123526743846551",
|
|
2629
|
+
"executionPrice": "0.086124",
|
|
2630
|
+
"feeGrowthGlobal0X128Delta": "510423550381407695195061911147652317",
|
|
2631
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
2632
|
+
"poolPriceAfter": "0.074620",
|
|
2633
|
+
"poolPriceBefore": "0.10000",
|
|
2634
|
+
"tickAfter": -25955,
|
|
2635
|
+
"tickBefore": -23028,
|
|
2636
|
+
}
|
|
2637
|
+
`;
|
|
2638
|
+
|
|
2639
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:10 price, 2e18 max range liquidity swap exactly 1.0000 token0 for token1 to price 0.50000 1`] = `
|
|
2640
|
+
Object {
|
|
2641
|
+
"poolBalance0": "6324555320336758664",
|
|
2642
|
+
"poolBalance1": "632455532033675867",
|
|
2643
|
+
"poolPriceBefore": "0.10000",
|
|
2644
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
2645
|
+
"tickBefore": -23028,
|
|
2646
|
+
}
|
|
2647
|
+
`;
|
|
2648
|
+
|
|
2649
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:10 price, 2e18 max range liquidity swap exactly 1.0000 token1 for token0 1`] = `
|
|
2650
|
+
Object {
|
|
2651
|
+
"amount0Before": "6324555320336758664",
|
|
2652
|
+
"amount0Delta": "-3869747612262812753",
|
|
2653
|
+
"amount1Before": "632455532033675867",
|
|
2654
|
+
"amount1Delta": "1000000000000000000",
|
|
2655
|
+
"executionPrice": "0.25841",
|
|
2656
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
2657
|
+
"feeGrowthGlobal1X128Delta": "510423550381407865336245371616884047",
|
|
2658
|
+
"poolPriceAfter": "0.66378",
|
|
2659
|
+
"poolPriceBefore": "0.10000",
|
|
2660
|
+
"tickAfter": -4099,
|
|
2661
|
+
"tickBefore": -23028,
|
|
2662
|
+
}
|
|
2663
|
+
`;
|
|
2664
|
+
|
|
2665
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:10 price, 2e18 max range liquidity swap exactly 1.0000 token1 for token0 to price 2.0000 1`] = `
|
|
2666
|
+
Object {
|
|
2667
|
+
"amount0Before": "6324555320336758664",
|
|
2668
|
+
"amount0Delta": "-3869747612262812753",
|
|
2669
|
+
"amount1Before": "632455532033675867",
|
|
2670
|
+
"amount1Delta": "1000000000000000000",
|
|
2671
|
+
"executionPrice": "0.25841",
|
|
2672
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
2673
|
+
"feeGrowthGlobal1X128Delta": "510423550381407865336245371616884047",
|
|
2674
|
+
"poolPriceAfter": "0.66378",
|
|
2675
|
+
"poolPriceBefore": "0.10000",
|
|
2676
|
+
"tickAfter": -4099,
|
|
2677
|
+
"tickBefore": -23028,
|
|
2678
|
+
}
|
|
2679
|
+
`;
|
|
2680
|
+
|
|
2681
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:10 price, 2e18 max range liquidity swap token0 for exactly 0.0000000000000010000 token1 1`] = `
|
|
2682
|
+
Object {
|
|
2683
|
+
"amount0Before": "6324555320336758664",
|
|
2684
|
+
"amount0Delta": "10032",
|
|
2685
|
+
"amount1Before": "632455532033675867",
|
|
2686
|
+
"amount1Delta": "-1000",
|
|
2687
|
+
"executionPrice": "0.099681",
|
|
2688
|
+
"feeGrowthGlobal0X128Delta": "5274376687274546183682",
|
|
2689
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
2690
|
+
"poolPriceAfter": "0.10000",
|
|
2691
|
+
"poolPriceBefore": "0.10000",
|
|
2692
|
+
"tickAfter": -23028,
|
|
2693
|
+
"tickBefore": -23028,
|
|
2694
|
+
}
|
|
2695
|
+
`;
|
|
2696
|
+
|
|
2697
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:10 price, 2e18 max range liquidity swap token0 for exactly 1.0000 token1 1`] = `
|
|
2698
|
+
Object {
|
|
2699
|
+
"amount0Before": "6324555320336758664",
|
|
2700
|
+
"amount0Delta": "36907032419362389223785084665766560335",
|
|
2701
|
+
"amount1Before": "632455532033675867",
|
|
2702
|
+
"amount1Delta": "-632455532033675838",
|
|
2703
|
+
"executionPrice": "0.000000000000000000017136",
|
|
2704
|
+
"feeGrowthGlobal0X128Delta": "18838218521532665615644565874197034349094564536667752274",
|
|
2705
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
2706
|
+
"poolPriceAfter": "0.0000000000000000000000000000000000000029390",
|
|
2707
|
+
"poolPriceBefore": "0.10000",
|
|
2708
|
+
"tickAfter": -887272,
|
|
2709
|
+
"tickBefore": -23028,
|
|
2710
|
+
}
|
|
2711
|
+
`;
|
|
2712
|
+
|
|
2713
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:10 price, 2e18 max range liquidity swap token0 for exactly 1.0000 token1 to price 0.50000 1`] = `
|
|
2714
|
+
Object {
|
|
2715
|
+
"poolBalance0": "6324555320336758664",
|
|
2716
|
+
"poolBalance1": "632455532033675867",
|
|
2717
|
+
"poolPriceBefore": "0.10000",
|
|
2718
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
2719
|
+
"tickBefore": -23028,
|
|
2720
|
+
}
|
|
2721
|
+
`;
|
|
2722
|
+
|
|
2723
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:10 price, 2e18 max range liquidity swap token0 for token1 to price 0.40000 1`] = `
|
|
2724
|
+
Object {
|
|
2725
|
+
"poolBalance0": "6324555320336758664",
|
|
2726
|
+
"poolBalance1": "632455532033675867",
|
|
2727
|
+
"poolPriceBefore": "0.10000",
|
|
2728
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
2729
|
+
"tickBefore": -23028,
|
|
2730
|
+
}
|
|
2731
|
+
`;
|
|
2732
|
+
|
|
2733
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:10 price, 2e18 max range liquidity swap token0 for token1 to price 2.5000 1`] = `
|
|
2734
|
+
Object {
|
|
2735
|
+
"poolBalance0": "6324555320336758664",
|
|
2736
|
+
"poolBalance1": "632455532033675867",
|
|
2737
|
+
"poolPriceBefore": "0.10000",
|
|
2738
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
2739
|
+
"tickBefore": -23028,
|
|
2740
|
+
}
|
|
2741
|
+
`;
|
|
2742
|
+
|
|
2743
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:10 price, 2e18 max range liquidity swap token1 for exactly 0.0000000000000010000 token0 1`] = `
|
|
2744
|
+
Object {
|
|
2745
|
+
"amount0Before": "6324555320336758664",
|
|
2746
|
+
"amount0Delta": "-1000",
|
|
2747
|
+
"amount1Before": "632455532033675867",
|
|
2748
|
+
"amount1Delta": "102",
|
|
2749
|
+
"executionPrice": "0.10200",
|
|
2750
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
2751
|
+
"feeGrowthGlobal1X128Delta": "170141183460469231731",
|
|
2752
|
+
"poolPriceAfter": "0.10000",
|
|
2753
|
+
"poolPriceBefore": "0.10000",
|
|
2754
|
+
"tickAfter": -23028,
|
|
2755
|
+
"tickBefore": -23028,
|
|
2756
|
+
}
|
|
2757
|
+
`;
|
|
2758
|
+
|
|
2759
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:10 price, 2e18 max range liquidity swap token1 for exactly 1.0000 token0 1`] = `
|
|
2760
|
+
Object {
|
|
2761
|
+
"amount0Before": "6324555320336758664",
|
|
2762
|
+
"amount0Delta": "-1000000000000000000",
|
|
2763
|
+
"amount1Before": "632455532033675867",
|
|
2764
|
+
"amount1Delta": "119138326055954425",
|
|
2765
|
+
"executionPrice": "0.11914",
|
|
2766
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
2767
|
+
"feeGrowthGlobal1X128Delta": "60811007371978153949466126675899993",
|
|
2768
|
+
"poolPriceAfter": "0.14109",
|
|
2769
|
+
"poolPriceBefore": "0.10000",
|
|
2770
|
+
"tickAfter": -19585,
|
|
2771
|
+
"tickBefore": -23028,
|
|
2772
|
+
}
|
|
2773
|
+
`;
|
|
2774
|
+
|
|
2775
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:10 price, 2e18 max range liquidity swap token1 for exactly 1.0000 token0 to price 2.0000 1`] = `
|
|
2776
|
+
Object {
|
|
2777
|
+
"amount0Before": "6324555320336758664",
|
|
2778
|
+
"amount0Delta": "-1000000000000000000",
|
|
2779
|
+
"amount1Before": "632455532033675867",
|
|
2780
|
+
"amount1Delta": "119138326055954425",
|
|
2781
|
+
"executionPrice": "0.11914",
|
|
2782
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
2783
|
+
"feeGrowthGlobal1X128Delta": "60811007371978153949466126675899993",
|
|
2784
|
+
"poolPriceAfter": "0.14109",
|
|
2785
|
+
"poolPriceBefore": "0.10000",
|
|
2786
|
+
"tickAfter": -19585,
|
|
2787
|
+
"tickBefore": -23028,
|
|
2788
|
+
}
|
|
2789
|
+
`;
|
|
2790
|
+
|
|
2791
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:10 price, 2e18 max range liquidity swap token1 for token0 to price 0.40000 1`] = `
|
|
2792
|
+
Object {
|
|
2793
|
+
"amount0Before": "6324555320336758664",
|
|
2794
|
+
"amount0Delta": "-3162277660168379331",
|
|
2795
|
+
"amount1Before": "632455532033675867",
|
|
2796
|
+
"amount1Delta": "634358607857247611",
|
|
2797
|
+
"executionPrice": "0.20060",
|
|
2798
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
2799
|
+
"feeGrowthGlobal1X128Delta": "323791572837503501799197590655727195",
|
|
2800
|
+
"poolPriceAfter": "0.40000",
|
|
2801
|
+
"poolPriceBefore": "0.10000",
|
|
2802
|
+
"tickAfter": -9164,
|
|
2803
|
+
"tickBefore": -23028,
|
|
2804
|
+
}
|
|
2805
|
+
`;
|
|
2806
|
+
|
|
2807
|
+
exports[`UniswapV3Pool swap tests medium fee, 1:10 price, 2e18 max range liquidity swap token1 for token0 to price 2.5000 1`] = `
|
|
2808
|
+
Object {
|
|
2809
|
+
"amount0Before": "6324555320336758664",
|
|
2810
|
+
"amount0Delta": "-5059644256269406930",
|
|
2811
|
+
"amount1Before": "632455532033675867",
|
|
2812
|
+
"amount1Delta": "2537434431428990440",
|
|
2813
|
+
"executionPrice": "0.50150",
|
|
2814
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
2815
|
+
"feeGrowthGlobal1X128Delta": "1295166291350014177337973823092140516",
|
|
2816
|
+
"poolPriceAfter": "2.5000",
|
|
2817
|
+
"poolPriceBefore": "0.10000",
|
|
2818
|
+
"tickAfter": 9163,
|
|
2819
|
+
"tickBefore": -23028,
|
|
2820
|
+
}
|
|
2821
|
+
`;
|
|
2822
|
+
|
|
2823
|
+
exports[`UniswapV3Pool swap tests medium fee, 10:1 price, 2e18 max range liquidity swap exactly 0.0000000000000010000 token0 for token1 1`] = `
|
|
2824
|
+
Object {
|
|
2825
|
+
"amount0Before": "632455532033675867",
|
|
2826
|
+
"amount0Delta": "1000",
|
|
2827
|
+
"amount1Before": "6324555320336758664",
|
|
2828
|
+
"amount1Delta": "-9969",
|
|
2829
|
+
"executionPrice": "9.9690",
|
|
2830
|
+
"feeGrowthGlobal0X128Delta": "510423550381407695195",
|
|
2831
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
2832
|
+
"poolPriceAfter": "10.000",
|
|
2833
|
+
"poolPriceBefore": "10.000",
|
|
2834
|
+
"tickAfter": 23027,
|
|
2835
|
+
"tickBefore": 23027,
|
|
2836
|
+
}
|
|
2837
|
+
`;
|
|
2838
|
+
|
|
2839
|
+
exports[`UniswapV3Pool swap tests medium fee, 10:1 price, 2e18 max range liquidity swap exactly 0.0000000000000010000 token1 for token0 1`] = `
|
|
2840
|
+
Object {
|
|
2841
|
+
"amount0Before": "632455532033675867",
|
|
2842
|
+
"amount0Delta": "-99",
|
|
2843
|
+
"amount1Before": "6324555320336758664",
|
|
2844
|
+
"amount1Delta": "1000",
|
|
2845
|
+
"executionPrice": "10.101",
|
|
2846
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
2847
|
+
"feeGrowthGlobal1X128Delta": "510423550381407695195",
|
|
2848
|
+
"poolPriceAfter": "10.000",
|
|
2849
|
+
"poolPriceBefore": "10.000",
|
|
2850
|
+
"tickAfter": 23027,
|
|
2851
|
+
"tickBefore": 23027,
|
|
2852
|
+
}
|
|
2853
|
+
`;
|
|
2854
|
+
|
|
2855
|
+
exports[`UniswapV3Pool swap tests medium fee, 10:1 price, 2e18 max range liquidity swap exactly 1.0000 token0 for token1 1`] = `
|
|
2856
|
+
Object {
|
|
2857
|
+
"amount0Before": "632455532033675867",
|
|
2858
|
+
"amount0Delta": "1000000000000000000",
|
|
2859
|
+
"amount1Before": "6324555320336758664",
|
|
2860
|
+
"amount1Delta": "-3869747612262812754",
|
|
2861
|
+
"executionPrice": "3.8697",
|
|
2862
|
+
"feeGrowthGlobal0X128Delta": "510423550381407865336245371616884048",
|
|
2863
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
2864
|
+
"poolPriceAfter": "1.5065",
|
|
2865
|
+
"poolPriceBefore": "10.000",
|
|
2866
|
+
"tickAfter": 4098,
|
|
2867
|
+
"tickBefore": 23027,
|
|
2868
|
+
}
|
|
2869
|
+
`;
|
|
2870
|
+
|
|
2871
|
+
exports[`UniswapV3Pool swap tests medium fee, 10:1 price, 2e18 max range liquidity swap exactly 1.0000 token0 for token1 to price 0.50000 1`] = `
|
|
2872
|
+
Object {
|
|
2873
|
+
"amount0Before": "632455532033675867",
|
|
2874
|
+
"amount0Delta": "1000000000000000000",
|
|
2875
|
+
"amount1Before": "6324555320336758664",
|
|
2876
|
+
"amount1Delta": "-3869747612262812754",
|
|
2877
|
+
"executionPrice": "3.8697",
|
|
2878
|
+
"feeGrowthGlobal0X128Delta": "510423550381407865336245371616884048",
|
|
2879
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
2880
|
+
"poolPriceAfter": "1.5065",
|
|
2881
|
+
"poolPriceBefore": "10.000",
|
|
2882
|
+
"tickAfter": 4098,
|
|
2883
|
+
"tickBefore": 23027,
|
|
2884
|
+
}
|
|
2885
|
+
`;
|
|
2886
|
+
|
|
2887
|
+
exports[`UniswapV3Pool swap tests medium fee, 10:1 price, 2e18 max range liquidity swap exactly 1.0000 token1 for token0 1`] = `
|
|
2888
|
+
Object {
|
|
2889
|
+
"amount0Before": "632455532033675867",
|
|
2890
|
+
"amount0Delta": "-86123526743846551",
|
|
2891
|
+
"amount1Before": "6324555320336758664",
|
|
2892
|
+
"amount1Delta": "1000000000000000000",
|
|
2893
|
+
"executionPrice": "11.611",
|
|
2894
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
2895
|
+
"feeGrowthGlobal1X128Delta": "510423550381407695195061911147652317",
|
|
2896
|
+
"poolPriceAfter": "13.401",
|
|
2897
|
+
"poolPriceBefore": "10.000",
|
|
2898
|
+
"tickAfter": 25954,
|
|
2899
|
+
"tickBefore": 23027,
|
|
2900
|
+
}
|
|
2901
|
+
`;
|
|
2902
|
+
|
|
2903
|
+
exports[`UniswapV3Pool swap tests medium fee, 10:1 price, 2e18 max range liquidity swap exactly 1.0000 token1 for token0 to price 2.0000 1`] = `
|
|
2904
|
+
Object {
|
|
2905
|
+
"poolBalance0": "632455532033675867",
|
|
2906
|
+
"poolBalance1": "6324555320336758664",
|
|
2907
|
+
"poolPriceBefore": "10.000",
|
|
2908
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
2909
|
+
"tickBefore": 23027,
|
|
2910
|
+
}
|
|
2911
|
+
`;
|
|
2912
|
+
|
|
2913
|
+
exports[`UniswapV3Pool swap tests medium fee, 10:1 price, 2e18 max range liquidity swap token0 for exactly 0.0000000000000010000 token1 1`] = `
|
|
2914
|
+
Object {
|
|
2915
|
+
"amount0Before": "632455532033675867",
|
|
2916
|
+
"amount0Delta": "102",
|
|
2917
|
+
"amount1Before": "6324555320336758664",
|
|
2918
|
+
"amount1Delta": "-1000",
|
|
2919
|
+
"executionPrice": "9.8039",
|
|
2920
|
+
"feeGrowthGlobal0X128Delta": "170141183460469231731",
|
|
2921
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
2922
|
+
"poolPriceAfter": "10.000",
|
|
2923
|
+
"poolPriceBefore": "10.000",
|
|
2924
|
+
"tickAfter": 23027,
|
|
2925
|
+
"tickBefore": 23027,
|
|
2926
|
+
}
|
|
2927
|
+
`;
|
|
2928
|
+
|
|
2929
|
+
exports[`UniswapV3Pool swap tests medium fee, 10:1 price, 2e18 max range liquidity swap token0 for exactly 1.0000 token1 1`] = `
|
|
2930
|
+
Object {
|
|
2931
|
+
"amount0Before": "632455532033675867",
|
|
2932
|
+
"amount0Delta": "119138326055954425",
|
|
2933
|
+
"amount1Before": "6324555320336758664",
|
|
2934
|
+
"amount1Delta": "-1000000000000000000",
|
|
2935
|
+
"executionPrice": "8.3936",
|
|
2936
|
+
"feeGrowthGlobal0X128Delta": "60811007371978153949466126675899993",
|
|
2937
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
2938
|
+
"poolPriceAfter": "7.0877",
|
|
2939
|
+
"poolPriceBefore": "10.000",
|
|
2940
|
+
"tickAfter": 19584,
|
|
2941
|
+
"tickBefore": 23027,
|
|
2942
|
+
}
|
|
2943
|
+
`;
|
|
2944
|
+
|
|
2945
|
+
exports[`UniswapV3Pool swap tests medium fee, 10:1 price, 2e18 max range liquidity swap token0 for exactly 1.0000 token1 to price 0.50000 1`] = `
|
|
2946
|
+
Object {
|
|
2947
|
+
"amount0Before": "632455532033675867",
|
|
2948
|
+
"amount0Delta": "119138326055954425",
|
|
2949
|
+
"amount1Before": "6324555320336758664",
|
|
2950
|
+
"amount1Delta": "-1000000000000000000",
|
|
2951
|
+
"executionPrice": "8.3936",
|
|
2952
|
+
"feeGrowthGlobal0X128Delta": "60811007371978153949466126675899993",
|
|
2953
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
2954
|
+
"poolPriceAfter": "7.0877",
|
|
2955
|
+
"poolPriceBefore": "10.000",
|
|
2956
|
+
"tickAfter": 19584,
|
|
2957
|
+
"tickBefore": 23027,
|
|
2958
|
+
}
|
|
2959
|
+
`;
|
|
2960
|
+
|
|
2961
|
+
exports[`UniswapV3Pool swap tests medium fee, 10:1 price, 2e18 max range liquidity swap token0 for token1 to price 0.40000 1`] = `
|
|
2962
|
+
Object {
|
|
2963
|
+
"amount0Before": "632455532033675867",
|
|
2964
|
+
"amount0Delta": "2537434431428990438",
|
|
2965
|
+
"amount1Before": "6324555320336758664",
|
|
2966
|
+
"amount1Delta": "-5059644256269406930",
|
|
2967
|
+
"executionPrice": "1.9940",
|
|
2968
|
+
"feeGrowthGlobal0X128Delta": "1295166291350014007196790362622908786",
|
|
2969
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
2970
|
+
"poolPriceAfter": "0.40000",
|
|
2971
|
+
"poolPriceBefore": "10.000",
|
|
2972
|
+
"tickAfter": -9164,
|
|
2973
|
+
"tickBefore": 23027,
|
|
2974
|
+
}
|
|
2975
|
+
`;
|
|
2976
|
+
|
|
2977
|
+
exports[`UniswapV3Pool swap tests medium fee, 10:1 price, 2e18 max range liquidity swap token0 for token1 to price 2.5000 1`] = `
|
|
2978
|
+
Object {
|
|
2979
|
+
"amount0Before": "632455532033675867",
|
|
2980
|
+
"amount0Delta": "634358607857247610",
|
|
2981
|
+
"amount1Before": "6324555320336758664",
|
|
2982
|
+
"amount1Delta": "-3162277660168379331",
|
|
2983
|
+
"executionPrice": "4.9850",
|
|
2984
|
+
"feeGrowthGlobal0X128Delta": "323791572837503501799197590655727196",
|
|
2985
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
2986
|
+
"poolPriceAfter": "2.5000",
|
|
2987
|
+
"poolPriceBefore": "10.000",
|
|
2988
|
+
"tickAfter": 9163,
|
|
2989
|
+
"tickBefore": 23027,
|
|
2990
|
+
}
|
|
2991
|
+
`;
|
|
2992
|
+
|
|
2993
|
+
exports[`UniswapV3Pool swap tests medium fee, 10:1 price, 2e18 max range liquidity swap token1 for exactly 0.0000000000000010000 token0 1`] = `
|
|
2994
|
+
Object {
|
|
2995
|
+
"amount0Before": "632455532033675867",
|
|
2996
|
+
"amount0Delta": "-1000",
|
|
2997
|
+
"amount1Before": "6324555320336758664",
|
|
2998
|
+
"amount1Delta": "10032",
|
|
2999
|
+
"executionPrice": "10.032",
|
|
3000
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
3001
|
+
"feeGrowthGlobal1X128Delta": "5274376687274546183682",
|
|
3002
|
+
"poolPriceAfter": "10.000",
|
|
3003
|
+
"poolPriceBefore": "10.000",
|
|
3004
|
+
"tickAfter": 23027,
|
|
3005
|
+
"tickBefore": 23027,
|
|
3006
|
+
}
|
|
3007
|
+
`;
|
|
3008
|
+
|
|
3009
|
+
exports[`UniswapV3Pool swap tests medium fee, 10:1 price, 2e18 max range liquidity swap token1 for exactly 1.0000 token0 1`] = `
|
|
3010
|
+
Object {
|
|
3011
|
+
"amount0Before": "632455532033675867",
|
|
3012
|
+
"amount0Delta": "-632455532033675838",
|
|
3013
|
+
"amount1Before": "6324555320336758664",
|
|
3014
|
+
"amount1Delta": "36907032426281581270030941278837275671",
|
|
3015
|
+
"executionPrice": "5.8355e+19",
|
|
3016
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
3017
|
+
"feeGrowthGlobal1X128Delta": "18838218525064384185660173270402201838945341643205005201",
|
|
3018
|
+
"poolPriceAfter": "3.4026e+38",
|
|
3019
|
+
"poolPriceBefore": "10.000",
|
|
3020
|
+
"tickAfter": 887271,
|
|
3021
|
+
"tickBefore": 23027,
|
|
3022
|
+
}
|
|
3023
|
+
`;
|
|
3024
|
+
|
|
3025
|
+
exports[`UniswapV3Pool swap tests medium fee, 10:1 price, 2e18 max range liquidity swap token1 for exactly 1.0000 token0 to price 2.0000 1`] = `
|
|
3026
|
+
Object {
|
|
3027
|
+
"poolBalance0": "632455532033675867",
|
|
3028
|
+
"poolBalance1": "6324555320336758664",
|
|
3029
|
+
"poolPriceBefore": "10.000",
|
|
3030
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
3031
|
+
"tickBefore": 23027,
|
|
3032
|
+
}
|
|
3033
|
+
`;
|
|
3034
|
+
|
|
3035
|
+
exports[`UniswapV3Pool swap tests medium fee, 10:1 price, 2e18 max range liquidity swap token1 for token0 to price 0.40000 1`] = `
|
|
3036
|
+
Object {
|
|
3037
|
+
"poolBalance0": "632455532033675867",
|
|
3038
|
+
"poolBalance1": "6324555320336758664",
|
|
3039
|
+
"poolPriceBefore": "10.000",
|
|
3040
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
3041
|
+
"tickBefore": 23027,
|
|
3042
|
+
}
|
|
3043
|
+
`;
|
|
3044
|
+
|
|
3045
|
+
exports[`UniswapV3Pool swap tests medium fee, 10:1 price, 2e18 max range liquidity swap token1 for token0 to price 2.5000 1`] = `
|
|
3046
|
+
Object {
|
|
3047
|
+
"poolBalance0": "632455532033675867",
|
|
3048
|
+
"poolBalance1": "6324555320336758664",
|
|
3049
|
+
"poolPriceBefore": "10.000",
|
|
3050
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
3051
|
+
"tickBefore": 23027,
|
|
3052
|
+
}
|
|
3053
|
+
`;
|
|
3054
|
+
|
|
3055
|
+
exports[`UniswapV3Pool swap tests medium fee, token0 liquidity only swap exactly 0.0000000000000010000 token0 for token1 1`] = `
|
|
3056
|
+
Object {
|
|
3057
|
+
"amount0Before": "1995041008271423675",
|
|
3058
|
+
"amount0Delta": "0",
|
|
3059
|
+
"amount1Before": "0",
|
|
3060
|
+
"amount1Delta": "0",
|
|
3061
|
+
"executionPrice": "NaN",
|
|
3062
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
3063
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
3064
|
+
"poolPriceAfter": "0.0000000000000000000000000000000000000029390",
|
|
3065
|
+
"poolPriceBefore": "1.0000",
|
|
3066
|
+
"tickAfter": -887272,
|
|
3067
|
+
"tickBefore": 0,
|
|
3068
|
+
}
|
|
3069
|
+
`;
|
|
3070
|
+
|
|
3071
|
+
exports[`UniswapV3Pool swap tests medium fee, token0 liquidity only swap exactly 0.0000000000000010000 token1 for token0 1`] = `
|
|
3072
|
+
Object {
|
|
3073
|
+
"amount0Before": "1995041008271423675",
|
|
3074
|
+
"amount0Delta": "-996",
|
|
3075
|
+
"amount1Before": "0",
|
|
3076
|
+
"amount1Delta": "1000",
|
|
3077
|
+
"executionPrice": "1.0040",
|
|
3078
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
3079
|
+
"feeGrowthGlobal1X128Delta": "510423550381407695195",
|
|
3080
|
+
"poolPriceAfter": "1.0000",
|
|
3081
|
+
"poolPriceBefore": "1.0000",
|
|
3082
|
+
"tickAfter": 0,
|
|
3083
|
+
"tickBefore": 0,
|
|
3084
|
+
}
|
|
3085
|
+
`;
|
|
3086
|
+
|
|
3087
|
+
exports[`UniswapV3Pool swap tests medium fee, token0 liquidity only swap exactly 1.0000 token0 for token1 1`] = `
|
|
3088
|
+
Object {
|
|
3089
|
+
"amount0Before": "1995041008271423675",
|
|
3090
|
+
"amount0Delta": "0",
|
|
3091
|
+
"amount1Before": "0",
|
|
3092
|
+
"amount1Delta": "0",
|
|
3093
|
+
"executionPrice": "NaN",
|
|
3094
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
3095
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
3096
|
+
"poolPriceAfter": "0.0000000000000000000000000000000000000029390",
|
|
3097
|
+
"poolPriceBefore": "1.0000",
|
|
3098
|
+
"tickAfter": -887272,
|
|
3099
|
+
"tickBefore": 0,
|
|
3100
|
+
}
|
|
3101
|
+
`;
|
|
3102
|
+
|
|
3103
|
+
exports[`UniswapV3Pool swap tests medium fee, token0 liquidity only swap exactly 1.0000 token0 for token1 to price 0.50000 1`] = `
|
|
3104
|
+
Object {
|
|
3105
|
+
"amount0Before": "1995041008271423675",
|
|
3106
|
+
"amount0Delta": "0",
|
|
3107
|
+
"amount1Before": "0",
|
|
3108
|
+
"amount1Delta": "0",
|
|
3109
|
+
"executionPrice": "NaN",
|
|
3110
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
3111
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
3112
|
+
"poolPriceAfter": "0.50000",
|
|
3113
|
+
"poolPriceBefore": "1.0000",
|
|
3114
|
+
"tickAfter": -6932,
|
|
3115
|
+
"tickBefore": 0,
|
|
3116
|
+
}
|
|
3117
|
+
`;
|
|
3118
|
+
|
|
3119
|
+
exports[`UniswapV3Pool swap tests medium fee, token0 liquidity only swap exactly 1.0000 token1 for token0 1`] = `
|
|
3120
|
+
Object {
|
|
3121
|
+
"amount0Before": "1995041008271423675",
|
|
3122
|
+
"amount0Delta": "-665331998665331998",
|
|
3123
|
+
"amount1Before": "0",
|
|
3124
|
+
"amount1Delta": "1000000000000000000",
|
|
3125
|
+
"executionPrice": "1.5030",
|
|
3126
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
3127
|
+
"feeGrowthGlobal1X128Delta": "510423550381407695195061911147652317",
|
|
3128
|
+
"poolPriceAfter": "2.2455",
|
|
3129
|
+
"poolPriceBefore": "1.0000",
|
|
3130
|
+
"tickAfter": 8089,
|
|
3131
|
+
"tickBefore": 0,
|
|
3132
|
+
}
|
|
3133
|
+
`;
|
|
3134
|
+
|
|
3135
|
+
exports[`UniswapV3Pool swap tests medium fee, token0 liquidity only swap exactly 1.0000 token1 for token0 to price 2.0000 1`] = `
|
|
3136
|
+
Object {
|
|
3137
|
+
"amount0Before": "1995041008271423675",
|
|
3138
|
+
"amount0Delta": "-585786437626904951",
|
|
3139
|
+
"amount1Before": "0",
|
|
3140
|
+
"amount1Delta": "830919884399388263",
|
|
3141
|
+
"executionPrice": "1.4185",
|
|
3142
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
3143
|
+
"feeGrowthGlobal1X128Delta": "424121077477644648929101317621422688",
|
|
3144
|
+
"poolPriceAfter": "2.0000",
|
|
3145
|
+
"poolPriceBefore": "1.0000",
|
|
3146
|
+
"tickAfter": 6931,
|
|
3147
|
+
"tickBefore": 0,
|
|
3148
|
+
}
|
|
3149
|
+
`;
|
|
3150
|
+
|
|
3151
|
+
exports[`UniswapV3Pool swap tests medium fee, token0 liquidity only swap token0 for exactly 0.0000000000000010000 token1 1`] = `
|
|
3152
|
+
Object {
|
|
3153
|
+
"amount0Before": "1995041008271423675",
|
|
3154
|
+
"amount0Delta": "0",
|
|
3155
|
+
"amount1Before": "0",
|
|
3156
|
+
"amount1Delta": "0",
|
|
3157
|
+
"executionPrice": "NaN",
|
|
3158
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
3159
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
3160
|
+
"poolPriceAfter": "0.0000000000000000000000000000000000000029390",
|
|
3161
|
+
"poolPriceBefore": "1.0000",
|
|
3162
|
+
"tickAfter": -887272,
|
|
3163
|
+
"tickBefore": 0,
|
|
3164
|
+
}
|
|
3165
|
+
`;
|
|
3166
|
+
|
|
3167
|
+
exports[`UniswapV3Pool swap tests medium fee, token0 liquidity only swap token0 for exactly 1.0000 token1 1`] = `
|
|
3168
|
+
Object {
|
|
3169
|
+
"amount0Before": "1995041008271423675",
|
|
3170
|
+
"amount0Delta": "0",
|
|
3171
|
+
"amount1Before": "0",
|
|
3172
|
+
"amount1Delta": "0",
|
|
3173
|
+
"executionPrice": "NaN",
|
|
3174
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
3175
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
3176
|
+
"poolPriceAfter": "0.0000000000000000000000000000000000000029390",
|
|
3177
|
+
"poolPriceBefore": "1.0000",
|
|
3178
|
+
"tickAfter": -887272,
|
|
3179
|
+
"tickBefore": 0,
|
|
3180
|
+
}
|
|
3181
|
+
`;
|
|
3182
|
+
|
|
3183
|
+
exports[`UniswapV3Pool swap tests medium fee, token0 liquidity only swap token0 for exactly 1.0000 token1 to price 0.50000 1`] = `
|
|
3184
|
+
Object {
|
|
3185
|
+
"amount0Before": "1995041008271423675",
|
|
3186
|
+
"amount0Delta": "0",
|
|
3187
|
+
"amount1Before": "0",
|
|
3188
|
+
"amount1Delta": "0",
|
|
3189
|
+
"executionPrice": "NaN",
|
|
3190
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
3191
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
3192
|
+
"poolPriceAfter": "0.50000",
|
|
3193
|
+
"poolPriceBefore": "1.0000",
|
|
3194
|
+
"tickAfter": -6932,
|
|
3195
|
+
"tickBefore": 0,
|
|
3196
|
+
}
|
|
3197
|
+
`;
|
|
3198
|
+
|
|
3199
|
+
exports[`UniswapV3Pool swap tests medium fee, token0 liquidity only swap token0 for token1 to price 0.40000 1`] = `
|
|
3200
|
+
Object {
|
|
3201
|
+
"amount0Before": "1995041008271423675",
|
|
3202
|
+
"amount0Delta": "0",
|
|
3203
|
+
"amount1Before": "0",
|
|
3204
|
+
"amount1Delta": "0",
|
|
3205
|
+
"executionPrice": "NaN",
|
|
3206
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
3207
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
3208
|
+
"poolPriceAfter": "0.40000",
|
|
3209
|
+
"poolPriceBefore": "1.0000",
|
|
3210
|
+
"tickAfter": -9164,
|
|
3211
|
+
"tickBefore": 0,
|
|
3212
|
+
}
|
|
3213
|
+
`;
|
|
3214
|
+
|
|
3215
|
+
exports[`UniswapV3Pool swap tests medium fee, token0 liquidity only swap token0 for token1 to price 2.5000 1`] = `
|
|
3216
|
+
Object {
|
|
3217
|
+
"poolBalance0": "1995041008271423675",
|
|
3218
|
+
"poolBalance1": "0",
|
|
3219
|
+
"poolPriceBefore": "1.0000",
|
|
3220
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
3221
|
+
"tickBefore": 0,
|
|
3222
|
+
}
|
|
3223
|
+
`;
|
|
3224
|
+
|
|
3225
|
+
exports[`UniswapV3Pool swap tests medium fee, token0 liquidity only swap token1 for exactly 0.0000000000000010000 token0 1`] = `
|
|
3226
|
+
Object {
|
|
3227
|
+
"amount0Before": "1995041008271423675",
|
|
3228
|
+
"amount0Delta": "-1000",
|
|
3229
|
+
"amount1Before": "0",
|
|
3230
|
+
"amount1Delta": "1005",
|
|
3231
|
+
"executionPrice": "1.0050",
|
|
3232
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
3233
|
+
"feeGrowthGlobal1X128Delta": "680564733841876926926",
|
|
3234
|
+
"poolPriceAfter": "1.0000",
|
|
3235
|
+
"poolPriceBefore": "1.0000",
|
|
3236
|
+
"tickAfter": 0,
|
|
3237
|
+
"tickBefore": 0,
|
|
3238
|
+
}
|
|
3239
|
+
`;
|
|
3240
|
+
|
|
3241
|
+
exports[`UniswapV3Pool swap tests medium fee, token0 liquidity only swap token1 for exactly 1.0000 token0 1`] = `
|
|
3242
|
+
Object {
|
|
3243
|
+
"amount0Before": "1995041008271423675",
|
|
3244
|
+
"amount0Delta": "-1000000000000000000",
|
|
3245
|
+
"amount1Before": "0",
|
|
3246
|
+
"amount1Delta": "2006018054162487463",
|
|
3247
|
+
"executionPrice": "2.0060",
|
|
3248
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
3249
|
+
"feeGrowthGlobal1X128Delta": "1023918857334819954209013958517557896",
|
|
3250
|
+
"poolPriceAfter": "4.0000",
|
|
3251
|
+
"poolPriceBefore": "1.0000",
|
|
3252
|
+
"tickAfter": 13863,
|
|
3253
|
+
"tickBefore": 0,
|
|
3254
|
+
}
|
|
3255
|
+
`;
|
|
3256
|
+
|
|
3257
|
+
exports[`UniswapV3Pool swap tests medium fee, token0 liquidity only swap token1 for exactly 1.0000 token0 to price 2.0000 1`] = `
|
|
3258
|
+
Object {
|
|
3259
|
+
"amount0Before": "1995041008271423675",
|
|
3260
|
+
"amount0Delta": "-585786437626904951",
|
|
3261
|
+
"amount1Before": "0",
|
|
3262
|
+
"amount1Delta": "830919884399388263",
|
|
3263
|
+
"executionPrice": "1.4185",
|
|
3264
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
3265
|
+
"feeGrowthGlobal1X128Delta": "424121077477644648929101317621422688",
|
|
3266
|
+
"poolPriceAfter": "2.0000",
|
|
3267
|
+
"poolPriceBefore": "1.0000",
|
|
3268
|
+
"tickAfter": 6931,
|
|
3269
|
+
"tickBefore": 0,
|
|
3270
|
+
}
|
|
3271
|
+
`;
|
|
3272
|
+
|
|
3273
|
+
exports[`UniswapV3Pool swap tests medium fee, token0 liquidity only swap token1 for token0 to price 0.40000 1`] = `
|
|
3274
|
+
Object {
|
|
3275
|
+
"poolBalance0": "1995041008271423675",
|
|
3276
|
+
"poolBalance1": "0",
|
|
3277
|
+
"poolPriceBefore": "1.0000",
|
|
3278
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
3279
|
+
"tickBefore": 0,
|
|
3280
|
+
}
|
|
3281
|
+
`;
|
|
3282
|
+
|
|
3283
|
+
exports[`UniswapV3Pool swap tests medium fee, token0 liquidity only swap token1 for token0 to price 2.5000 1`] = `
|
|
3284
|
+
Object {
|
|
3285
|
+
"amount0Before": "1995041008271423675",
|
|
3286
|
+
"amount0Delta": "-735088935932648267",
|
|
3287
|
+
"amount1Before": "0",
|
|
3288
|
+
"amount1Delta": "1165774985123750584",
|
|
3289
|
+
"executionPrice": "1.5859",
|
|
3290
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
3291
|
+
"feeGrowthGlobal1X128Delta": "595039006852697554786973994761078087",
|
|
3292
|
+
"poolPriceAfter": "2.5000",
|
|
3293
|
+
"poolPriceBefore": "1.0000",
|
|
3294
|
+
"tickAfter": 9163,
|
|
3295
|
+
"tickBefore": 0,
|
|
3296
|
+
}
|
|
3297
|
+
`;
|
|
3298
|
+
|
|
3299
|
+
exports[`UniswapV3Pool swap tests medium fee, token1 liquidity only swap exactly 0.0000000000000010000 token0 for token1 1`] = `
|
|
3300
|
+
Object {
|
|
3301
|
+
"amount0Before": "0",
|
|
3302
|
+
"amount0Delta": "1000",
|
|
3303
|
+
"amount1Before": "1995041008271423675",
|
|
3304
|
+
"amount1Delta": "-996",
|
|
3305
|
+
"executionPrice": "0.99600",
|
|
3306
|
+
"feeGrowthGlobal0X128Delta": "510423550381407695195",
|
|
3307
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
3308
|
+
"poolPriceAfter": "1.0000",
|
|
3309
|
+
"poolPriceBefore": "1.0000",
|
|
3310
|
+
"tickAfter": -1,
|
|
3311
|
+
"tickBefore": 0,
|
|
3312
|
+
}
|
|
3313
|
+
`;
|
|
3314
|
+
|
|
3315
|
+
exports[`UniswapV3Pool swap tests medium fee, token1 liquidity only swap exactly 0.0000000000000010000 token1 for token0 1`] = `
|
|
3316
|
+
Object {
|
|
3317
|
+
"amount0Before": "0",
|
|
3318
|
+
"amount0Delta": "0",
|
|
3319
|
+
"amount1Before": "1995041008271423675",
|
|
3320
|
+
"amount1Delta": "0",
|
|
3321
|
+
"executionPrice": "NaN",
|
|
3322
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
3323
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
3324
|
+
"poolPriceAfter": "3.4026e+38",
|
|
3325
|
+
"poolPriceBefore": "1.0000",
|
|
3326
|
+
"tickAfter": 887271,
|
|
3327
|
+
"tickBefore": 0,
|
|
3328
|
+
}
|
|
3329
|
+
`;
|
|
3330
|
+
|
|
3331
|
+
exports[`UniswapV3Pool swap tests medium fee, token1 liquidity only swap exactly 1.0000 token0 for token1 1`] = `
|
|
3332
|
+
Object {
|
|
3333
|
+
"amount0Before": "0",
|
|
3334
|
+
"amount0Delta": "1000000000000000000",
|
|
3335
|
+
"amount1Before": "1995041008271423675",
|
|
3336
|
+
"amount1Delta": "-665331998665331998",
|
|
3337
|
+
"executionPrice": "0.66533",
|
|
3338
|
+
"feeGrowthGlobal0X128Delta": "510423550381407695195061911147652317",
|
|
3339
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
3340
|
+
"poolPriceAfter": "0.44533",
|
|
3341
|
+
"poolPriceBefore": "1.0000",
|
|
3342
|
+
"tickAfter": -8090,
|
|
3343
|
+
"tickBefore": 0,
|
|
3344
|
+
}
|
|
3345
|
+
`;
|
|
3346
|
+
|
|
3347
|
+
exports[`UniswapV3Pool swap tests medium fee, token1 liquidity only swap exactly 1.0000 token0 for token1 to price 0.50000 1`] = `
|
|
3348
|
+
Object {
|
|
3349
|
+
"amount0Before": "0",
|
|
3350
|
+
"amount0Delta": "830919884399388263",
|
|
3351
|
+
"amount1Before": "1995041008271423675",
|
|
3352
|
+
"amount1Delta": "-585786437626904951",
|
|
3353
|
+
"executionPrice": "0.70499",
|
|
3354
|
+
"feeGrowthGlobal0X128Delta": "424121077477644648929101317621422688",
|
|
3355
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
3356
|
+
"poolPriceAfter": "0.50000",
|
|
3357
|
+
"poolPriceBefore": "1.0000",
|
|
3358
|
+
"tickAfter": -6932,
|
|
3359
|
+
"tickBefore": 0,
|
|
3360
|
+
}
|
|
3361
|
+
`;
|
|
3362
|
+
|
|
3363
|
+
exports[`UniswapV3Pool swap tests medium fee, token1 liquidity only swap exactly 1.0000 token1 for token0 1`] = `
|
|
3364
|
+
Object {
|
|
3365
|
+
"amount0Before": "0",
|
|
3366
|
+
"amount0Delta": "0",
|
|
3367
|
+
"amount1Before": "1995041008271423675",
|
|
3368
|
+
"amount1Delta": "0",
|
|
3369
|
+
"executionPrice": "NaN",
|
|
3370
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
3371
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
3372
|
+
"poolPriceAfter": "3.4026e+38",
|
|
3373
|
+
"poolPriceBefore": "1.0000",
|
|
3374
|
+
"tickAfter": 887271,
|
|
3375
|
+
"tickBefore": 0,
|
|
3376
|
+
}
|
|
3377
|
+
`;
|
|
3378
|
+
|
|
3379
|
+
exports[`UniswapV3Pool swap tests medium fee, token1 liquidity only swap exactly 1.0000 token1 for token0 to price 2.0000 1`] = `
|
|
3380
|
+
Object {
|
|
3381
|
+
"amount0Before": "0",
|
|
3382
|
+
"amount0Delta": "0",
|
|
3383
|
+
"amount1Before": "1995041008271423675",
|
|
3384
|
+
"amount1Delta": "0",
|
|
3385
|
+
"executionPrice": "NaN",
|
|
3386
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
3387
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
3388
|
+
"poolPriceAfter": "2.0000",
|
|
3389
|
+
"poolPriceBefore": "1.0000",
|
|
3390
|
+
"tickAfter": 6931,
|
|
3391
|
+
"tickBefore": 0,
|
|
3392
|
+
}
|
|
3393
|
+
`;
|
|
3394
|
+
|
|
3395
|
+
exports[`UniswapV3Pool swap tests medium fee, token1 liquidity only swap token0 for exactly 0.0000000000000010000 token1 1`] = `
|
|
3396
|
+
Object {
|
|
3397
|
+
"amount0Before": "0",
|
|
3398
|
+
"amount0Delta": "1005",
|
|
3399
|
+
"amount1Before": "1995041008271423675",
|
|
3400
|
+
"amount1Delta": "-1000",
|
|
3401
|
+
"executionPrice": "0.99502",
|
|
3402
|
+
"feeGrowthGlobal0X128Delta": "680564733841876926926",
|
|
3403
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
3404
|
+
"poolPriceAfter": "1.0000",
|
|
3405
|
+
"poolPriceBefore": "1.0000",
|
|
3406
|
+
"tickAfter": -1,
|
|
3407
|
+
"tickBefore": 0,
|
|
3408
|
+
}
|
|
3409
|
+
`;
|
|
3410
|
+
|
|
3411
|
+
exports[`UniswapV3Pool swap tests medium fee, token1 liquidity only swap token0 for exactly 1.0000 token1 1`] = `
|
|
3412
|
+
Object {
|
|
3413
|
+
"amount0Before": "0",
|
|
3414
|
+
"amount0Delta": "2006018054162487463",
|
|
3415
|
+
"amount1Before": "1995041008271423675",
|
|
3416
|
+
"amount1Delta": "-1000000000000000000",
|
|
3417
|
+
"executionPrice": "0.49850",
|
|
3418
|
+
"feeGrowthGlobal0X128Delta": "1023918857334819954209013958517557896",
|
|
3419
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
3420
|
+
"poolPriceAfter": "0.25000",
|
|
3421
|
+
"poolPriceBefore": "1.0000",
|
|
3422
|
+
"tickAfter": -13864,
|
|
3423
|
+
"tickBefore": 0,
|
|
3424
|
+
}
|
|
3425
|
+
`;
|
|
3426
|
+
|
|
3427
|
+
exports[`UniswapV3Pool swap tests medium fee, token1 liquidity only swap token0 for exactly 1.0000 token1 to price 0.50000 1`] = `
|
|
3428
|
+
Object {
|
|
3429
|
+
"amount0Before": "0",
|
|
3430
|
+
"amount0Delta": "830919884399388263",
|
|
3431
|
+
"amount1Before": "1995041008271423675",
|
|
3432
|
+
"amount1Delta": "-585786437626904951",
|
|
3433
|
+
"executionPrice": "0.70499",
|
|
3434
|
+
"feeGrowthGlobal0X128Delta": "424121077477644648929101317621422688",
|
|
3435
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
3436
|
+
"poolPriceAfter": "0.50000",
|
|
3437
|
+
"poolPriceBefore": "1.0000",
|
|
3438
|
+
"tickAfter": -6932,
|
|
3439
|
+
"tickBefore": 0,
|
|
3440
|
+
}
|
|
3441
|
+
`;
|
|
3442
|
+
|
|
3443
|
+
exports[`UniswapV3Pool swap tests medium fee, token1 liquidity only swap token0 for token1 to price 0.40000 1`] = `
|
|
3444
|
+
Object {
|
|
3445
|
+
"amount0Before": "0",
|
|
3446
|
+
"amount0Delta": "1165774985123750584",
|
|
3447
|
+
"amount1Before": "1995041008271423675",
|
|
3448
|
+
"amount1Delta": "-735088935932648267",
|
|
3449
|
+
"executionPrice": "0.63056",
|
|
3450
|
+
"feeGrowthGlobal0X128Delta": "595039006852697554786973994761078087",
|
|
3451
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
3452
|
+
"poolPriceAfter": "0.40000",
|
|
3453
|
+
"poolPriceBefore": "1.0000",
|
|
3454
|
+
"tickAfter": -9164,
|
|
3455
|
+
"tickBefore": 0,
|
|
3456
|
+
}
|
|
3457
|
+
`;
|
|
3458
|
+
|
|
3459
|
+
exports[`UniswapV3Pool swap tests medium fee, token1 liquidity only swap token0 for token1 to price 2.5000 1`] = `
|
|
3460
|
+
Object {
|
|
3461
|
+
"poolBalance0": "0",
|
|
3462
|
+
"poolBalance1": "1995041008271423675",
|
|
3463
|
+
"poolPriceBefore": "1.0000",
|
|
3464
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
3465
|
+
"tickBefore": 0,
|
|
3466
|
+
}
|
|
3467
|
+
`;
|
|
3468
|
+
|
|
3469
|
+
exports[`UniswapV3Pool swap tests medium fee, token1 liquidity only swap token1 for exactly 0.0000000000000010000 token0 1`] = `
|
|
3470
|
+
Object {
|
|
3471
|
+
"amount0Before": "0",
|
|
3472
|
+
"amount0Delta": "0",
|
|
3473
|
+
"amount1Before": "1995041008271423675",
|
|
3474
|
+
"amount1Delta": "0",
|
|
3475
|
+
"executionPrice": "NaN",
|
|
3476
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
3477
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
3478
|
+
"poolPriceAfter": "3.4026e+38",
|
|
3479
|
+
"poolPriceBefore": "1.0000",
|
|
3480
|
+
"tickAfter": 887271,
|
|
3481
|
+
"tickBefore": 0,
|
|
3482
|
+
}
|
|
3483
|
+
`;
|
|
3484
|
+
|
|
3485
|
+
exports[`UniswapV3Pool swap tests medium fee, token1 liquidity only swap token1 for exactly 1.0000 token0 1`] = `
|
|
3486
|
+
Object {
|
|
3487
|
+
"amount0Before": "0",
|
|
3488
|
+
"amount0Delta": "0",
|
|
3489
|
+
"amount1Before": "1995041008271423675",
|
|
3490
|
+
"amount1Delta": "0",
|
|
3491
|
+
"executionPrice": "NaN",
|
|
3492
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
3493
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
3494
|
+
"poolPriceAfter": "3.4026e+38",
|
|
3495
|
+
"poolPriceBefore": "1.0000",
|
|
3496
|
+
"tickAfter": 887271,
|
|
3497
|
+
"tickBefore": 0,
|
|
3498
|
+
}
|
|
3499
|
+
`;
|
|
3500
|
+
|
|
3501
|
+
exports[`UniswapV3Pool swap tests medium fee, token1 liquidity only swap token1 for exactly 1.0000 token0 to price 2.0000 1`] = `
|
|
3502
|
+
Object {
|
|
3503
|
+
"amount0Before": "0",
|
|
3504
|
+
"amount0Delta": "0",
|
|
3505
|
+
"amount1Before": "1995041008271423675",
|
|
3506
|
+
"amount1Delta": "0",
|
|
3507
|
+
"executionPrice": "NaN",
|
|
3508
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
3509
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
3510
|
+
"poolPriceAfter": "2.0000",
|
|
3511
|
+
"poolPriceBefore": "1.0000",
|
|
3512
|
+
"tickAfter": 6931,
|
|
3513
|
+
"tickBefore": 0,
|
|
3514
|
+
}
|
|
3515
|
+
`;
|
|
3516
|
+
|
|
3517
|
+
exports[`UniswapV3Pool swap tests medium fee, token1 liquidity only swap token1 for token0 to price 0.40000 1`] = `
|
|
3518
|
+
Object {
|
|
3519
|
+
"poolBalance0": "0",
|
|
3520
|
+
"poolBalance1": "1995041008271423675",
|
|
3521
|
+
"poolPriceBefore": "1.0000",
|
|
3522
|
+
"swapError": "VM Exception while processing transaction: revert SPL",
|
|
3523
|
+
"tickBefore": 0,
|
|
3524
|
+
}
|
|
3525
|
+
`;
|
|
3526
|
+
|
|
3527
|
+
exports[`UniswapV3Pool swap tests medium fee, token1 liquidity only swap token1 for token0 to price 2.5000 1`] = `
|
|
3528
|
+
Object {
|
|
3529
|
+
"amount0Before": "0",
|
|
3530
|
+
"amount0Delta": "0",
|
|
3531
|
+
"amount1Before": "1995041008271423675",
|
|
3532
|
+
"amount1Delta": "0",
|
|
3533
|
+
"executionPrice": "NaN",
|
|
3534
|
+
"feeGrowthGlobal0X128Delta": "0",
|
|
3535
|
+
"feeGrowthGlobal1X128Delta": "0",
|
|
3536
|
+
"poolPriceAfter": "2.5000",
|
|
3537
|
+
"poolPriceBefore": "1.0000",
|
|
3538
|
+
"tickAfter": 9163,
|
|
3539
|
+
"tickBefore": 0,
|
|
3540
|
+
}
|
|
3541
|
+
`;
|