From 23382e6398a72ea37e5a65aae18135ffbb38bbfa Mon Sep 17 00:00:00 2001 From: Beta Ziliani Date: Fri, 10 Jan 2025 13:04:04 -0300 Subject: [PATCH] Adding solc tests and replication in Rust of TS test for slang --- .../solidity/outputs/npm/tests/package.json | 3 +- .../npm/tests/src/compilation/common.mts | 2 +- .../contracts/meta.json | 19 + .../sources/meta.json | 19 + .../constructor-args.txt | 1 + .../creator-tx-hash.txt | 1 + .../metadata.json | 1 + .../contracts/access/Ownable.sol | 83 + .../contracts/finance/PaymentSplitter.sol | 214 + .../contracts/security/ReentrancyGuard.sol | 69 + .../contracts/token/ERC20/IERC20.sol | 82 + .../ERC20/extensions/draft-IERC20Permit.sol | 60 + .../contracts/token/ERC20/utils/SafeERC20.sol | 116 + .../@openzeppelin/contracts/utils/Address.sol | 244 + .../@openzeppelin/contracts/utils/Context.sol | 24 + .../@openzeppelin/contracts/utils/Strings.sol | 70 + .../utils/cryptography/MerkleProof.sol | 223 + .../contracts/utils/math/Math.sol | 345 + .../sources/erc721a/contracts/ERC721A.sol | 1091 + .../sources/erc721a/contracts/IERC721A.sol | 282 + .../sources/meta.json | 19 + .../project:/contracts/ERC721AContract.sol | 267 + .../sources/project:/contracts/IMintPass.sol | 16 + .../opensea/DefaultOperatorFilterer.sol | 14 + .../opensea/IOperatorFilterRegistry.sol | 29 + .../contracts/opensea/OperatorFilterer.sol | 60 + .../sources/refer2earn/Referable.sol | 36 + .../constructor-args.txt | 1 + .../creator-tx-hash.txt | 1 + .../metadata.json | 1 + .../contracts/introspection/ERC165.sol | 54 + .../contracts/introspection/IERC165.sol | 24 + .../@openzeppelin/contracts/math/SafeMath.sol | 214 + .../contracts/token/ERC721/ERC721.sol | 478 + .../contracts/token/ERC721/IERC721.sol | 129 + .../token/ERC721/IERC721Enumerable.sol | 29 + .../token/ERC721/IERC721Metadata.sol | 27 + .../token/ERC721/IERC721Receiver.sol | 21 + .../@openzeppelin/contracts/utils/Address.sol | 189 + .../@openzeppelin/contracts/utils/Context.sol | 24 + .../contracts/utils/EnumerableMap.sol | 266 + .../contracts/utils/EnumerableSet.sol | 297 + .../@openzeppelin/contracts/utils/Strings.sol | 34 + .../sources/contracts/IBond.sol | 13 + .../sources/contracts/SeniorBond.sol | 30 + .../sources/meta.json | 19 + .../constructor-args.txt | 1 + .../creator-tx-hash.txt | 1 + .../immutable-references.json | 1 + .../metadata.json | 1 + .../mooniswap.json | 76021 ++++++++++++++++ .../path-translation.json | 1 + .../@openzeppelin/contracts/GSN/Context.sol | 24 + .../contracts/access/Ownable.sol | 68 + .../@openzeppelin/contracts/math/Math.sol | 31 + .../@openzeppelin/contracts/math/SafeMath.sol | 159 + .../contracts/token/ERC20/ERC20.sol | 307 + .../contracts/token/ERC20/IERC20.sol | 77 + .../contracts/token/ERC20/SafeERC20.sol | 75 + .../@openzeppelin/contracts/utils/Address.sol | 141 + .../contracts/utils/Pausable.sol | 90 + .../contracts/utils/ReentrancyGuard.sol | 62 + .../mooniswap-v2/contracts/Mooniswap.sol | 362 + .../contracts/MooniswapFactory.sol | 70 + .../governance/BaseGovernanceModule.sol | 34 + .../governance/MooniswapFactoryGovernance.sol | 215 + .../governance/MooniswapGovernance.sol | 195 + .../contracts/interfaces/IFeeCollector.sol | 9 + .../interfaces/IGovernanceModule.sol | 9 + .../interfaces/IMooniswapDeployer.sol | 15 + .../interfaces/IMooniswapFactory.sol | 10 + .../IMooniswapFactoryGovernance.sol | 20 + .../libraries/ExplicitLiquidVoting.sol | 101 + .../contracts/libraries/LiquidVoting.sol | 106 + .../libraries/MooniswapConstants.sol | 22 + .../contracts/libraries/SafeCast.sol | 25 + .../mooniswap-v2/contracts/libraries/Sqrt.sol | 23 + .../contracts/libraries/UniERC20.sol | 109 + .../contracts/libraries/VirtualBalance.sol | 42 + .../contracts/libraries/VirtualVote.sol | 27 + .../mooniswap-v2/contracts/libraries/Vote.sol | 44 + .../contracts/utils/BalanceAccounting.sol | 39 + .../sources/meta.json | 19 + .../creator-tx-hash.txt | 1 + .../metadata.json | 1 + .../contracts/access/AccessControl.sol | 210 + .../access/AccessControlEnumerable.sol | 79 + .../contracts/access/IAccessControl.sol | 87 + .../access/IAccessControlEnumerable.sol | 30 + .../contracts/access/Ownable.sol | 71 + .../contracts/security/Pausable.sol | 90 + .../contracts/token/ERC721/ERC721.sol | 411 + .../contracts/token/ERC721/IERC721.sol | 142 + .../token/ERC721/IERC721Receiver.sol | 26 + .../ERC721/extensions/ERC721Burnable.sol | 25 + .../ERC721/extensions/ERC721Enumerable.sol | 162 + .../ERC721/extensions/ERC721Pausable.sol | 32 + .../ERC721/extensions/IERC721Enumerable.sol | 28 + .../ERC721/extensions/IERC721Metadata.sol | 26 + .../ERC721PresetMinterPauserAutoId.sol | 136 + .../@openzeppelin/contracts/utils/Address.sol | 216 + .../@openzeppelin/contracts/utils/Context.sol | 23 + .../contracts/utils/Counters.sol | 42 + .../@openzeppelin/contracts/utils/Strings.sol | 66 + .../contracts/utils/introspection/ERC165.sol | 28 + .../contracts/utils/introspection/IERC165.sol | 24 + .../contracts/utils/structs/EnumerableSet.sol | 356 + .../sources/contracts/Darts.sol | 77 + .../sources/hardhat/console.sol | 1532 + .../sources/meta.json | 19 + ...abc00E86C7e258823b9a055Fd62cA6CF61a163.zip | Bin 88066 -> 0 bytes .../sources/contracts/meta.json | 19 + .../YaxisVotePower/meta.json | 19 + .../npm/tests/src/compilation/timing.test.mts | 91 +- .../solidity/outputs/npm/tests/tsconfig.json | 5 +- crates/solidity/testing/perf/Cargo.toml | 1 + crates/solidity/testing/perf/src/lib.rs | 1 + crates/solidity/testing/perf/src/tests/mod.rs | 1 + .../solidity/testing/perf/src/tests/slow.rs | 113 + package-lock.json | 190 +- 120 files changed, 88155 insertions(+), 22 deletions(-) create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x00e50FAB64eBB37b87df06Aa46b8B35d5f1A4e1A/contracts/meta.json create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x015E220901014BAE4f7e168925CD74e725e23692/sources/meta.json create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/constructor-args.txt create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/creator-tx-hash.txt create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/metadata.json create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/access/Ownable.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/finance/PaymentSplitter.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/security/ReentrancyGuard.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/token/ERC20/IERC20.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/utils/Address.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/utils/Context.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/utils/Strings.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/utils/cryptography/MerkleProof.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/utils/math/Math.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/erc721a/contracts/ERC721A.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/erc721a/contracts/IERC721A.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/meta.json create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/project:/contracts/ERC721AContract.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/project:/contracts/IMintPass.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/project:/contracts/opensea/DefaultOperatorFilterer.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/project:/contracts/opensea/IOperatorFilterRegistry.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/project:/contracts/opensea/OperatorFilterer.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/refer2earn/Referable.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/constructor-args.txt create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/creator-tx-hash.txt create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/metadata.json create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/introspection/ERC165.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/introspection/IERC165.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/math/SafeMath.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/token/ERC721/ERC721.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/token/ERC721/IERC721.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/utils/Address.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/utils/Context.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/utils/EnumerableMap.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/utils/EnumerableSet.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/utils/Strings.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/contracts/IBond.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/contracts/SeniorBond.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/meta.json create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/constructor-args.txt create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/creator-tx-hash.txt create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/immutable-references.json create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/metadata.json create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/mooniswap.json create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/path-translation.json create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/GSN/Context.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/access/Ownable.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/math/Math.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/math/SafeMath.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/token/ERC20/ERC20.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/token/ERC20/IERC20.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/token/ERC20/SafeERC20.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/utils/Address.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/utils/Pausable.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/utils/ReentrancyGuard.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/Mooniswap.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/MooniswapFactory.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/governance/BaseGovernanceModule.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/governance/MooniswapFactoryGovernance.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/governance/MooniswapGovernance.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IFeeCollector.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IGovernanceModule.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IMooniswapDeployer.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IMooniswapFactory.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IMooniswapFactoryGovernance.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/ExplicitLiquidVoting.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/LiquidVoting.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/MooniswapConstants.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/SafeCast.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/Sqrt.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/UniERC20.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/VirtualBalance.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/VirtualVote.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/Vote.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/utils/BalanceAccounting.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/meta.json create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/creator-tx-hash.txt create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/metadata.json create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/access/AccessControl.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/access/AccessControlEnumerable.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/access/IAccessControl.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/access/IAccessControlEnumerable.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/access/Ownable.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/security/Pausable.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/ERC721.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/IERC721.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/utils/Address.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/utils/Context.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/utils/Counters.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/utils/Strings.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/utils/introspection/ERC165.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/utils/introspection/IERC165.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/utils/structs/EnumerableSet.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/contracts/Darts.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/hardhat/console.sol create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/meta.json delete mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01abc00E86C7e258823b9a055Fd62cA6CF61a163.zip create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01abc00E86C7e258823b9a055Fd62cA6CF61a163/sources/contracts/meta.json create mode 100644 crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01fef0d5d6fd6b5701ae913cafb11ddaee982c9a/YaxisVotePower/meta.json create mode 100644 crates/solidity/testing/perf/src/tests/slow.rs diff --git a/crates/solidity/outputs/npm/tests/package.json b/crates/solidity/outputs/npm/tests/package.json index e91d6d8da5..810c7525f7 100644 --- a/crates/solidity/outputs/npm/tests/package.json +++ b/crates/solidity/outputs/npm/tests/package.json @@ -4,7 +4,8 @@ "type": "module", "dependencies": { "@nomicfoundation/slang": "file:../package", - "mathjs": "^14.0.1" + "mathjs": "^14.0.1", + "solc": "^0.7.1" }, "devDependencies": { "@types/jest": "29.5.14", diff --git a/crates/solidity/outputs/npm/tests/src/compilation/common.mts b/crates/solidity/outputs/npm/tests/src/compilation/common.mts index 0815254ce6..929b6dba90 100644 --- a/crates/solidity/outputs/npm/tests/src/compilation/common.mts +++ b/crates/solidity/outputs/npm/tests/src/compilation/common.mts @@ -23,7 +23,7 @@ export async function createBuilder(): Promise { // in order to resolve its imports we allow ourselves to walk up the hierarchy // until we find the proper root of the import. let i = 0; - while (i < 5) { + while (i < 7) { let splat = Array(i + 1).fill(".."); let file = path.join(sourceFileId, ...splat, importString); let real_file = path.join("crates/solidity/outputs/npm/tests/src/compilation/inputs", file); diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x00e50FAB64eBB37b87df06Aa46b8B35d5f1A4e1A/contracts/meta.json b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x00e50FAB64eBB37b87df06Aa46b8B35d5f1A4e1A/contracts/meta.json new file mode 100644 index 0000000000..bd2cabc43e --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x00e50FAB64eBB37b87df06Aa46b8B35d5f1A4e1A/contracts/meta.json @@ -0,0 +1,19 @@ +{ + "language": "Solidity", + "sources": { + "./misc/UiPoolDataProviderV2V3.sol": { + "urls": [ + "./misc/UiPoolDataProviderV2V3.sol" + ] + } + }, + "settings": { + "outputSelection": { + "*": { + "": [ + "ast" + ] + } + } + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x015E220901014BAE4f7e168925CD74e725e23692/sources/meta.json b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x015E220901014BAE4f7e168925CD74e725e23692/sources/meta.json new file mode 100644 index 0000000000..446c52e2df --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x015E220901014BAE4f7e168925CD74e725e23692/sources/meta.json @@ -0,0 +1,19 @@ +{ + "language": "Solidity", + "sources": { + "DoodledBears.sol": { + "urls": [ + "DoodledBears.sol" + ] + } + }, + "settings": { + "outputSelection": { + "*": { + "": [ + "ast" + ] + } + } + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/constructor-args.txt b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/constructor-args.txt new file mode 100644 index 0000000000..c10a089886 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/constructor-args.txt @@ -0,0 +1 @@ +0x000000000000000000000000000000000000000000000000000000000000028000000000000000000000000000000000000000000000000000000000000002c00000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000036000000000000000000000000000000000000000000000000000000000000003a00000000000000000000000006e25cfa7e590b0d2a86c3f3d60c78e2816b74df0000000000000000000000000d5e73559b01163199c0176231bae64795b4bb70200000000000000000000000000000000000000000000000000000000000003e0000000000000000000000000000000000000000000000000000000000000042000000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000038d7ea4c6800000000000000000000000000000000000000000000000000000071afd498d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004544553540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045445535400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002c68747470733a2f2f6173736574732e77656e6d696e742e636f6d2f6d657461646174612f77656e6d696e742f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000098ee85e7cc2665261d9fd3ea53f2db4491c547e3000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000001000000000000000000000000dab1a1854214684ace522439684a145e625052330000000000000000000000000000000000000000000000000000000000000000 \ No newline at end of file diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/creator-tx-hash.txt b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/creator-tx-hash.txt new file mode 100644 index 0000000000..fa1a15e34b --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/creator-tx-hash.txt @@ -0,0 +1 @@ +0xddc6b7c1f88710f2d0e2807428ab2909a0553ac69b77a8c9e4afceef6689de3c \ No newline at end of file diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/metadata.json b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/metadata.json new file mode 100644 index 0000000000..a38e4b84be --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/metadata.json @@ -0,0 +1 @@ +{"compiler":{"version":"0.8.17+commit.8df45f5f"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_uri","type":"string"},{"internalType":"address[]","name":"_payees","type":"address[]"},{"internalType":"uint256[]","name":"_shares","type":"uint256[]"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_r2eAddress","type":"address"},{"internalType":"address[]","name":"_fiatMinters","type":"address[]"},{"internalType":"string","name":"_provenance","type":"string"},{"components":[{"internalType":"uint16","name":"maxSupply","type":"uint16"},{"internalType":"enum ERC721AContract.PublicMintType","name":"pubMintType","type":"uint8"},{"internalType":"uint16","name":"pubMaxMint","type":"uint16"},{"internalType":"uint72","name":"preSalePrice","type":"uint72"},{"internalType":"uint72","name":"pubSalePrice","type":"uint72"},{"internalType":"bool","name":"preSaleIsActive","type":"bool"},{"internalType":"bool","name":"pubSaleIsActive","type":"bool"},{"internalType":"bool","name":"claimIsActive","type":"bool"},{"internalType":"uint8","name":"preSalePhase","type":"uint8"},{"internalType":"bool","name":"transferrable","type":"bool"},{"internalType":"bool","name":"supplyLock","type":"bool"}],"internalType":"struct ERC721AContract.Token","name":"_token","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"PayeeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"},{"internalType":"uint16[]","name":"_quantities","type":"uint16[]"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_ids","type":"uint256[]"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"fiatMinters","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"hasClaimed","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"hasMinted","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"uint256","name":"_maxMint","type":"uint256"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"},{"internalType":"address payable","name":"_referrer","type":"address"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintpass","outputs":[{"internalType":"contract IMintPass","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"payee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"provenance","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"r2eAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"releasable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"releasable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"saleMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setBaseTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_root","type":"bytes32"}],"name":"setClaimRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"bool","name":"_allowed","type":"bool"}],"name":"setFiatMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setMintPass","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint72","name":"_preSalePrice","type":"uint72"},{"internalType":"uint72","name":"_pubSalePrice","type":"uint72"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_root","type":"bytes32"}],"name":"setSaleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"shares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"uint16","name":"maxSupply","type":"uint16"},{"internalType":"enum ERC721AContract.PublicMintType","name":"pubMintType","type":"uint8"},{"internalType":"uint16","name":"pubMaxMint","type":"uint16"},{"internalType":"uint72","name":"preSalePrice","type":"uint72"},{"internalType":"uint72","name":"pubSalePrice","type":"uint72"},{"internalType":"bool","name":"preSaleIsActive","type":"bool"},{"internalType":"bool","name":"pubSaleIsActive","type":"bool"},{"internalType":"bool","name":"claimIsActive","type":"bool"},{"internalType":"uint8","name":"preSalePhase","type":"uint8"},{"internalType":"bool","name":"transferrable","type":"bool"},{"internalType":"bool","name":"supplyLock","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_maxSupply","type":"uint16"},{"internalType":"uint16","name":"_pubMaxMint","type":"uint16"},{"internalType":"enum ERC721AContract.PublicMintType","name":"_pubMintType","type":"uint8"}],"name":"updateConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_preSaleIsActive","type":"bool"},{"internalType":"bool","name":"_pubSaleIsActive","type":"bool"},{"internalType":"bool","name":"_claimIsActive","type":"bool"},{"internalType":"uint8","name":"_preSalePhase","type":"uint8"}],"name":"updateSaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}],"devdoc":{"kind":"dev","methods":{"balanceOf(address)":{"details":"Returns the number of tokens in `owner`'s account."},"getApproved(uint256)":{"details":"Returns the account approved for `tokenId` token. Requirements: - `tokenId` must exist."},"isApprovedForAll(address,address)":{"details":"Returns if the `operator` is allowed to manage all of the assets of `owner`. See {setApprovalForAll}."},"name()":{"details":"Returns the token collection name."},"owner()":{"details":"Returns the address of the current owner."},"ownerOf(uint256)":{"details":"Returns the owner of the `tokenId` token. Requirements: - `tokenId` must exist."},"payee(uint256)":{"details":"Getter for the address of the payee number `index`."},"releasable(address)":{"details":"Getter for the amount of payee's releasable Ether."},"releasable(address,address)":{"details":"Getter for the amount of payee's releasable `token` tokens. `token` should be the address of an IERC20 contract."},"release(address)":{"details":"Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the total shares and their previous withdrawals."},"release(address,address)":{"details":"Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 contract."},"released(address)":{"details":"Getter for the amount of Ether already released to a payee."},"released(address,address)":{"details":"Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an IERC20 contract."},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."},"safeTransferFrom(address,address,uint256)":{"details":"Equivalent to `safeTransferFrom(from, to, tokenId, '')`."},"setApprovalForAll(address,bool)":{"details":"Approve or remove `operator` as an operator for the caller. Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. Requirements: - The `operator` cannot be the caller. Emits an {ApprovalForAll} event."},"shares(address)":{"details":"Getter for the amount of shares held by an account."},"supportsInterface(bytes4)":{"details":"Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) to learn more about how these ids are created. This function call must use less than 30000 gas."},"symbol()":{"details":"Returns the token collection symbol."},"totalReleased()":{"details":"Getter for the total amount of Ether already released."},"totalReleased(address)":{"details":"Getter for the total amount of `token` already released. `token` should be the address of an IERC20 contract."},"totalShares()":{"details":"Getter for the total shares held by payees."},"totalSupply()":{"details":"Returns the total number of tokens in existence. Burned tokens will reduce the count. To get the total number of tokens minted, please see {_totalMinted}."},"transferFrom(address,address,uint256)":{"details":"Transfers `tokenId` from `from` to `to`. Requirements: - `from` cannot be the zero address. - `to` cannot be the zero address. - `tokenId` token must be owned by `from`. - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. Emits a {Transfer} event."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."}},"version":1},"userdoc":{"errors":{"ApprovalCallerNotOwnerNorApproved()":[{"notice":"The caller must own the token or be an approved operator."}],"ApprovalQueryForNonexistentToken()":[{"notice":"The token does not exist."}],"BalanceQueryForZeroAddress()":[{"notice":"Cannot query the balance for the zero address."}],"MintERC2309QuantityExceedsLimit()":[{"notice":"The `quantity` minted with ERC2309 exceeds the safety limit."}],"MintToZeroAddress()":[{"notice":"Cannot mint to the zero address."}],"MintZeroQuantity()":[{"notice":"The quantity of tokens minted must be more than zero."}],"OwnerQueryForNonexistentToken()":[{"notice":"The token does not exist."}],"OwnershipNotInitializedForExtraData()":[{"notice":"The `extraData` cannot be set on an unintialized ownership slot."}],"TransferCallerNotOwnerNorApproved()":[{"notice":"The caller must own the token or be an approved operator."}],"TransferFromIncorrectOwner()":[{"notice":"The token must be owned by `from`."}],"TransferToNonERC721ReceiverImplementer()":[{"notice":"Cannot safely transfer to a contract that does not implement the ERC721Receiver interface."}],"TransferToZeroAddress()":[{"notice":"Cannot transfer to the zero address."}],"URIQueryForNonexistentToken()":[{"notice":"The token does not exist."}]},"kind":"user","methods":{},"version":1}},"settings":{"compilationTarget":{"project:/contracts/ERC721AContract.sol":"ERC721AContract"},"evmVersion":"london","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":true,"runs":10},"remappings":[]},"sources":{"@openzeppelin/contracts/access/Ownable.sol":{"keccak256":"0xa94b34880e3c1b0b931662cb1c09e5dfa6662f31cba80e07c5ee71cd135c9673","license":"MIT","urls":["bzz-raw://40fb1b5102468f783961d0af743f91b9980cf66b50d1d12009f6bb1869cea4d2","dweb:/ipfs/QmYqEbJML4jB1GHbzD4cUZDtJg5wVwNm3vDJq1GbyDus8y"]},"@openzeppelin/contracts/finance/PaymentSplitter.sol":{"keccak256":"0xba00a079c0def02f9e905ed091f01bcf9caa41ec215862a315e9f3838be61cdc","license":"MIT","urls":["bzz-raw://64c2cac21034117cbda842f32ae50ab87aa0e71ffbeb94d9b6051f8085abd8a7","dweb:/ipfs/QmYUCe45jDezpnK9y7ecqZVy1iECqW63mUrgqnM6YZdrrF"]},"@openzeppelin/contracts/security/ReentrancyGuard.sol":{"keccak256":"0x190dd6f8d592b7e4e930feb7f4313aeb8e1c4ad3154c27ce1cf6a512fc30d8cc","license":"MIT","urls":["bzz-raw://4ce8dfb62d0c4fa260d6eec8f1cd47f5f2a044e11bde5b31d18072fa6e7d9010","dweb:/ipfs/QmTyFztU3tLEcEDnqqiaW4UJetqsU77LXc6pjc9oTXCK5u"]},"@openzeppelin/contracts/token/ERC20/IERC20.sol":{"keccak256":"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b","license":"MIT","urls":["bzz-raw://5a7d5b1ef5d8d5889ad2ed89d8619c09383b80b72ab226e0fe7bde1636481e34","dweb:/ipfs/QmebXWgtEfumQGBdVeM6c71McLixYXQP5Bk6kKXuoY4Bmr"]},"@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol":{"keccak256":"0xf41ca991f30855bf80ffd11e9347856a517b977f0a6c2d52e6421a99b7840329","license":"MIT","urls":["bzz-raw://b2717fd2bdac99daa960a6de500754ea1b932093c946388c381da48658234b95","dweb:/ipfs/QmP6QVMn6UeA3ByahyJbYQr5M6coHKBKsf3ySZSfbyA8R7"]},"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol":{"keccak256":"0x9b72f93be69ca894d8492c244259615c4a742afc8d63720dbc8bb81087d9b238","license":"MIT","urls":["bzz-raw://f5a7b96e511be78d5cdf635c784e6ab8cdd38625bb8cafb8a80914a1c89cf0f6","dweb:/ipfs/QmVzTCwJxQAkjRQHboT5QrvsVJGWQHgfEjeTbvyxoKBrds"]},"@openzeppelin/contracts/utils/Address.sol":{"keccak256":"0xf96f969e24029d43d0df89e59d365f277021dac62b48e1c1e3ebe0acdd7f1ca1","license":"MIT","urls":["bzz-raw://ec772b45a624be516f1c81970caa8a2e144301e9d0921cbc1a2789fef39a1269","dweb:/ipfs/QmNyjwxCrGhQMyzLD93oUobJXVe9ceJvRvfXwbEtuxPiEj"]},"@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7","license":"MIT","urls":["bzz-raw://6df0ddf21ce9f58271bdfaa85cde98b200ef242a05a3f85c2bc10a8294800a92","dweb:/ipfs/QmRK2Y5Yc6BK7tGKkgsgn3aJEQGi5aakeSPZvS65PV8Xp3"]},"@openzeppelin/contracts/utils/Strings.sol":{"keccak256":"0xa4d1d62251f8574deb032a35fc948386a9b4de74b812d4f545a1ac120486b48a","license":"MIT","urls":["bzz-raw://8c969013129ba9e651a20735ef659fef6d8a1139ea3607bd4b26ddea2d645634","dweb:/ipfs/QmVhVa6LGuzAcB8qgDtVHRkucn4ihj5UZr8xBLcJkP6ucb"]},"@openzeppelin/contracts/utils/cryptography/MerkleProof.sol":{"keccak256":"0xd466e8b07f4c6220eac16da5127f3ff142e65f0c15c03c7d38f257b02c8585e1","license":"MIT","urls":["bzz-raw://e6b3cab69f655e40117bbdd8e68d7423f26d1b24248fb189c295f08de8940616","dweb:/ipfs/QmWoyRthsBDMa7gJpH5UCjpa8uNUQfyaGbSgY3uvhBH9F3"]},"@openzeppelin/contracts/utils/math/Math.sol":{"keccak256":"0xa1e8e83cd0087785df04ac79fb395d9f3684caeaf973d9e2c71caef723a3a5d6","license":"MIT","urls":["bzz-raw://33bbf48cc069be677705037ba7520c22b1b622c23b33e1a71495f2d36549d40b","dweb:/ipfs/Qmct36zWXv3j7LZB83uwbg7TXwnZSN1fqHNDZ93GG98bGz"]},"erc721a/contracts/ERC721A.sol":{"keccak256":"0x23116c16976b7d8c0c714ba1b38ae6b16c16fc90ec69b568fb1ebf1bc063e01c","license":"MIT","urls":["bzz-raw://b7874e48418b55b9d718680915454f2b0054d19d2a387e123b0c139294d0e809","dweb:/ipfs/QmdryJHATT4R454JY8FXCE5qTxanYWfjGKGMv5U6YJntWy"]},"erc721a/contracts/IERC721A.sol":{"keccak256":"0xa31dfe2635a25f899e279befef27ffcc02fd16e636c58d4c251a303f2355f7ad","license":"MIT","urls":["bzz-raw://284680b4fdbf52b2aa888f7988447568ee82c5d1585c1535d985ff25153bc3b9","dweb:/ipfs/QmTWfDch6XJMwVLA4CY2pMedzrLWoN8ZdgYZ1UbRzesysz"]},"project:/contracts/ERC721AContract.sol":{"keccak256":"0xf83c23a1af9574806aabce1dbf505ffaa5a9ad255e2ca6c2fed7a16ddf11bfac","license":"MIT","urls":["bzz-raw://bb67c8cba425e8826f766dc7649b3cac36e850c8ede64d9b74f240d14d0e4ebf","dweb:/ipfs/QmTyRbW5UWVVtbJ4VqNW5Jt9p7oJhTkcEZUP2nE7NkRorT"]},"project:/contracts/IMintPass.sol":{"keccak256":"0xa68cdd810a43f003cd543cc2481b27fccd9c9dc569a819f93933cc56186b522c","license":"MIT","urls":["bzz-raw://67b3acfebcd84a3be27cca029b5641dad28c37bece302321e1f6effaa8e2915b","dweb:/ipfs/QmR2gJpoR5Ayn9x2waZ8J1djxvAQhfSACydohKimFYHKYu"]},"project:/contracts/opensea/DefaultOperatorFilterer.sol":{"keccak256":"0x1d6616260cb0fa3a3c56c9db3c29b1db6037d0f30049dca5e94b4896999df991","license":"MIT","urls":["bzz-raw://dd672610b2df718151182ded4dac2c22be41ca2c3e981c2b2449c11bebcde1c6","dweb:/ipfs/QmNN4v58xrk1UtLbM5QHHNHaXShBv5fGXy7U2EhWWDXjj8"]},"project:/contracts/opensea/IOperatorFilterRegistry.sol":{"keccak256":"0x0e6751a391939afcda79fde27c10b2b27c21041b5b9c81db28233fcdc1a2f9ba","license":"MIT","urls":["bzz-raw://eced709a040d7a4508174e96baa5cb8e9c323b10708be26ba1860945fe5aaac2","dweb:/ipfs/QmPd5q5JioYG4JeYYoRyQYSjHEwddfjXyxtgDKpeNyefYU"]},"project:/contracts/opensea/OperatorFilterer.sol":{"keccak256":"0xcdf355575d1bd6730eab09060a2fbb2d59f2c9b92de8383d35960ecc1bfc0db3","license":"MIT","urls":["bzz-raw://5ab3cb815cda380daa8661e0ba88afba2ad2b06786eef74bf7a685834eb589ae","dweb:/ipfs/QmQyJGz4cXEWUvFdL52iJcooMDihJzXP9WSUn9gb8PdMDS"]},"refer2earn/Referable.sol":{"keccak256":"0x6b9cce3b9814edd3176b822303e4b393693b1160a5a20cd1d10de2810960e920","license":"MIT","urls":["bzz-raw://6b9414220f258655343bbee6bc11e4e5a37831bc1e7b9ed8fe7df573a3a880ab","dweb:/ipfs/QmRt4V6wbpB7aenYZSKmn1eZ2wuLTHeW6vP7gut5RCvErf"]}},"version":1} \ No newline at end of file diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/access/Ownable.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/access/Ownable.sol new file mode 100644 index 0000000000..6d4e866f4d --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/access/Ownable.sol @@ -0,0 +1,83 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) + +pragma solidity ^0.8.0; + +import "../utils/Context.sol"; + +/** + * @dev Contract module which provides a basic access control mechanism, where + * there is an account (an owner) that can be granted exclusive access to + * specific functions. + * + * By default, the owner account will be the one that deploys the contract. This + * can later be changed with {transferOwnership}. + * + * This module is used through inheritance. It will make available the modifier + * `onlyOwner`, which can be applied to your functions to restrict their use to + * the owner. + */ +abstract contract Ownable is Context { + address private _owner; + + event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); + + /** + * @dev Initializes the contract setting the deployer as the initial owner. + */ + constructor() { + _transferOwnership(_msgSender()); + } + + /** + * @dev Throws if called by any account other than the owner. + */ + modifier onlyOwner() { + _checkOwner(); + _; + } + + /** + * @dev Returns the address of the current owner. + */ + function owner() public view virtual returns (address) { + return _owner; + } + + /** + * @dev Throws if the sender is not the owner. + */ + function _checkOwner() internal view virtual { + require(owner() == _msgSender(), "Ownable: caller is not the owner"); + } + + /** + * @dev Leaves the contract without owner. It will not be possible to call + * `onlyOwner` functions anymore. Can only be called by the current owner. + * + * NOTE: Renouncing ownership will leave the contract without an owner, + * thereby removing any functionality that is only available to the owner. + */ + function renounceOwnership() public virtual onlyOwner { + _transferOwnership(address(0)); + } + + /** + * @dev Transfers ownership of the contract to a new account (`newOwner`). + * Can only be called by the current owner. + */ + function transferOwnership(address newOwner) public virtual onlyOwner { + require(newOwner != address(0), "Ownable: new owner is the zero address"); + _transferOwnership(newOwner); + } + + /** + * @dev Transfers ownership of the contract to a new account (`newOwner`). + * Internal function without access restriction. + */ + function _transferOwnership(address newOwner) internal virtual { + address oldOwner = _owner; + _owner = newOwner; + emit OwnershipTransferred(oldOwner, newOwner); + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/finance/PaymentSplitter.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/finance/PaymentSplitter.sol new file mode 100644 index 0000000000..daa9090eba --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/finance/PaymentSplitter.sol @@ -0,0 +1,214 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (finance/PaymentSplitter.sol) + +pragma solidity ^0.8.0; + +import "../token/ERC20/utils/SafeERC20.sol"; +import "../utils/Address.sol"; +import "../utils/Context.sol"; + +/** + * @title PaymentSplitter + * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware + * that the Ether will be split in this way, since it is handled transparently by the contract. + * + * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each + * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim + * an amount proportional to the percentage of total shares they were assigned. The distribution of shares is set at the + * time of contract deployment and can't be updated thereafter. + * + * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the + * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} + * function. + * + * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and + * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you + * to run tests before sending real value to this contract. + */ +contract PaymentSplitter is Context { + event PayeeAdded(address account, uint256 shares); + event PaymentReleased(address to, uint256 amount); + event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); + event PaymentReceived(address from, uint256 amount); + + uint256 private _totalShares; + uint256 private _totalReleased; + + mapping(address => uint256) private _shares; + mapping(address => uint256) private _released; + address[] private _payees; + + mapping(IERC20 => uint256) private _erc20TotalReleased; + mapping(IERC20 => mapping(address => uint256)) private _erc20Released; + + /** + * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at + * the matching position in the `shares` array. + * + * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no + * duplicates in `payees`. + */ + constructor(address[] memory payees, uint256[] memory shares_) payable { + require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch"); + require(payees.length > 0, "PaymentSplitter: no payees"); + + for (uint256 i = 0; i < payees.length; i++) { + _addPayee(payees[i], shares_[i]); + } + } + + /** + * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully + * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the + * reliability of the events, and not the actual splitting of Ether. + * + * To learn more about this see the Solidity documentation for + * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback + * functions]. + */ + receive() external payable virtual { + emit PaymentReceived(_msgSender(), msg.value); + } + + /** + * @dev Getter for the total shares held by payees. + */ + function totalShares() public view returns (uint256) { + return _totalShares; + } + + /** + * @dev Getter for the total amount of Ether already released. + */ + function totalReleased() public view returns (uint256) { + return _totalReleased; + } + + /** + * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 + * contract. + */ + function totalReleased(IERC20 token) public view returns (uint256) { + return _erc20TotalReleased[token]; + } + + /** + * @dev Getter for the amount of shares held by an account. + */ + function shares(address account) public view returns (uint256) { + return _shares[account]; + } + + /** + * @dev Getter for the amount of Ether already released to a payee. + */ + function released(address account) public view returns (uint256) { + return _released[account]; + } + + /** + * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an + * IERC20 contract. + */ + function released(IERC20 token, address account) public view returns (uint256) { + return _erc20Released[token][account]; + } + + /** + * @dev Getter for the address of the payee number `index`. + */ + function payee(uint256 index) public view returns (address) { + return _payees[index]; + } + + /** + * @dev Getter for the amount of payee's releasable Ether. + */ + function releasable(address account) public view returns (uint256) { + uint256 totalReceived = address(this).balance + totalReleased(); + return _pendingPayment(account, totalReceived, released(account)); + } + + /** + * @dev Getter for the amount of payee's releasable `token` tokens. `token` should be the address of an + * IERC20 contract. + */ + function releasable(IERC20 token, address account) public view returns (uint256) { + uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token); + return _pendingPayment(account, totalReceived, released(token, account)); + } + + /** + * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the + * total shares and their previous withdrawals. + */ + function release(address payable account) public virtual { + require(_shares[account] > 0, "PaymentSplitter: account has no shares"); + + uint256 payment = releasable(account); + + require(payment != 0, "PaymentSplitter: account is not due payment"); + + // _totalReleased is the sum of all values in _released. + // If "_totalReleased += payment" does not overflow, then "_released[account] += payment" cannot overflow. + _totalReleased += payment; + unchecked { + _released[account] += payment; + } + + Address.sendValue(account, payment); + emit PaymentReleased(account, payment); + } + + /** + * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their + * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 + * contract. + */ + function release(IERC20 token, address account) public virtual { + require(_shares[account] > 0, "PaymentSplitter: account has no shares"); + + uint256 payment = releasable(token, account); + + require(payment != 0, "PaymentSplitter: account is not due payment"); + + // _erc20TotalReleased[token] is the sum of all values in _erc20Released[token]. + // If "_erc20TotalReleased[token] += payment" does not overflow, then "_erc20Released[token][account] += payment" + // cannot overflow. + _erc20TotalReleased[token] += payment; + unchecked { + _erc20Released[token][account] += payment; + } + + SafeERC20.safeTransfer(token, account, payment); + emit ERC20PaymentReleased(token, account, payment); + } + + /** + * @dev internal logic for computing the pending payment of an `account` given the token historical balances and + * already released amounts. + */ + function _pendingPayment( + address account, + uint256 totalReceived, + uint256 alreadyReleased + ) private view returns (uint256) { + return (totalReceived * _shares[account]) / _totalShares - alreadyReleased; + } + + /** + * @dev Add a new payee to the contract. + * @param account The address of the payee to add. + * @param shares_ The number of shares owned by the payee. + */ + function _addPayee(address account, uint256 shares_) private { + require(account != address(0), "PaymentSplitter: account is the zero address"); + require(shares_ > 0, "PaymentSplitter: shares are 0"); + require(_shares[account] == 0, "PaymentSplitter: account already has shares"); + + _payees.push(account); + _shares[account] = shares_; + _totalShares = _totalShares + shares_; + emit PayeeAdded(account, shares_); + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/security/ReentrancyGuard.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/security/ReentrancyGuard.sol new file mode 100644 index 0000000000..3c8bb42325 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/security/ReentrancyGuard.sol @@ -0,0 +1,69 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Contract module that helps prevent reentrant calls to a function. + * + * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier + * available, which can be applied to functions to make sure there are no nested + * (reentrant) calls to them. + * + * Note that because there is a single `nonReentrant` guard, functions marked as + * `nonReentrant` may not call one another. This can be worked around by making + * those functions `private`, and then adding `external` `nonReentrant` entry + * points to them. + * + * TIP: If you would like to learn more about reentrancy and alternative ways + * to protect against it, check out our blog post + * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. + */ +abstract contract ReentrancyGuard { + // Booleans are more expensive than uint256 or any type that takes up a full + // word because each write operation emits an extra SLOAD to first read the + // slot's contents, replace the bits taken up by the boolean, and then write + // back. This is the compiler's defense against contract upgrades and + // pointer aliasing, and it cannot be disabled. + + // The values being non-zero value makes deployment a bit more expensive, + // but in exchange the refund on every call to nonReentrant will be lower in + // amount. Since refunds are capped to a percentage of the total + // transaction's gas, it is best to keep them low in cases like this one, to + // increase the likelihood of the full refund coming into effect. + uint256 private constant _NOT_ENTERED = 1; + uint256 private constant _ENTERED = 2; + + uint256 private _status; + + constructor() { + _status = _NOT_ENTERED; + } + + /** + * @dev Prevents a contract from calling itself, directly or indirectly. + * Calling a `nonReentrant` function from another `nonReentrant` + * function is not supported. It is possible to prevent this from happening + * by making the `nonReentrant` function external, and making it call a + * `private` function that does the actual work. + */ + modifier nonReentrant() { + _nonReentrantBefore(); + _; + _nonReentrantAfter(); + } + + function _nonReentrantBefore() private { + // On the first call to nonReentrant, _status will be _NOT_ENTERED + require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); + + // Any calls to nonReentrant after this point will fail + _status = _ENTERED; + } + + function _nonReentrantAfter() private { + // By storing the original value once again, a refund is triggered (see + // https://eips.ethereum.org/EIPS/eip-2200) + _status = _NOT_ENTERED; + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/token/ERC20/IERC20.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/token/ERC20/IERC20.sol new file mode 100644 index 0000000000..b816bfed08 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/token/ERC20/IERC20.sol @@ -0,0 +1,82 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Interface of the ERC20 standard as defined in the EIP. + */ +interface IERC20 { + /** + * @dev Emitted when `value` tokens are moved from one account (`from`) to + * another (`to`). + * + * Note that `value` may be zero. + */ + event Transfer(address indexed from, address indexed to, uint256 value); + + /** + * @dev Emitted when the allowance of a `spender` for an `owner` is set by + * a call to {approve}. `value` is the new allowance. + */ + event Approval(address indexed owner, address indexed spender, uint256 value); + + /** + * @dev Returns the amount of tokens in existence. + */ + function totalSupply() external view returns (uint256); + + /** + * @dev Returns the amount of tokens owned by `account`. + */ + function balanceOf(address account) external view returns (uint256); + + /** + * @dev Moves `amount` tokens from the caller's account to `to`. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * Emits a {Transfer} event. + */ + function transfer(address to, uint256 amount) external returns (bool); + + /** + * @dev Returns the remaining number of tokens that `spender` will be + * allowed to spend on behalf of `owner` through {transferFrom}. This is + * zero by default. + * + * This value changes when {approve} or {transferFrom} are called. + */ + function allowance(address owner, address spender) external view returns (uint256); + + /** + * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * IMPORTANT: Beware that changing an allowance with this method brings the risk + * that someone may use both the old and the new allowance by unfortunate + * transaction ordering. One possible solution to mitigate this race + * condition is to first reduce the spender's allowance to 0 and set the + * desired value afterwards: + * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 + * + * Emits an {Approval} event. + */ + function approve(address spender, uint256 amount) external returns (bool); + + /** + * @dev Moves `amount` tokens from `from` to `to` using the + * allowance mechanism. `amount` is then deducted from the caller's + * allowance. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * Emits a {Transfer} event. + */ + function transferFrom( + address from, + address to, + uint256 amount + ) external returns (bool); +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol new file mode 100644 index 0000000000..6363b14084 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol @@ -0,0 +1,60 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in + * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. + * + * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by + * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't + * need to send a transaction, and thus is not required to hold Ether at all. + */ +interface IERC20Permit { + /** + * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, + * given ``owner``'s signed approval. + * + * IMPORTANT: The same issues {IERC20-approve} has related to transaction + * ordering also apply here. + * + * Emits an {Approval} event. + * + * Requirements: + * + * - `spender` cannot be the zero address. + * - `deadline` must be a timestamp in the future. + * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` + * over the EIP712-formatted function arguments. + * - the signature must use ``owner``'s current nonce (see {nonces}). + * + * For more information on the signature format, see the + * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP + * section]. + */ + function permit( + address owner, + address spender, + uint256 value, + uint256 deadline, + uint8 v, + bytes32 r, + bytes32 s + ) external; + + /** + * @dev Returns the current nonce for `owner`. This value must be + * included whenever a signature is generated for {permit}. + * + * Every successful call to {permit} increases ``owner``'s nonce by one. This + * prevents a signature from being used multiple times. + */ + function nonces(address owner) external view returns (uint256); + + /** + * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. + */ + // solhint-disable-next-line func-name-mixedcase + function DOMAIN_SEPARATOR() external view returns (bytes32); +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol new file mode 100644 index 0000000000..a01a877ad7 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol @@ -0,0 +1,116 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) + +pragma solidity ^0.8.0; + +import "../IERC20.sol"; +import "../extensions/draft-IERC20Permit.sol"; +import "../../../utils/Address.sol"; + +/** + * @title SafeERC20 + * @dev Wrappers around ERC20 operations that throw on failure (when the token + * contract returns false). Tokens that return no value (and instead revert or + * throw on failure) are also supported, non-reverting calls are assumed to be + * successful. + * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, + * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. + */ +library SafeERC20 { + using Address for address; + + function safeTransfer( + IERC20 token, + address to, + uint256 value + ) internal { + _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); + } + + function safeTransferFrom( + IERC20 token, + address from, + address to, + uint256 value + ) internal { + _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); + } + + /** + * @dev Deprecated. This function has issues similar to the ones found in + * {IERC20-approve}, and its usage is discouraged. + * + * Whenever possible, use {safeIncreaseAllowance} and + * {safeDecreaseAllowance} instead. + */ + function safeApprove( + IERC20 token, + address spender, + uint256 value + ) internal { + // safeApprove should only be called when setting an initial allowance, + // or when resetting it to zero. To increase and decrease it, use + // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' + require( + (value == 0) || (token.allowance(address(this), spender) == 0), + "SafeERC20: approve from non-zero to non-zero allowance" + ); + _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); + } + + function safeIncreaseAllowance( + IERC20 token, + address spender, + uint256 value + ) internal { + uint256 newAllowance = token.allowance(address(this), spender) + value; + _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); + } + + function safeDecreaseAllowance( + IERC20 token, + address spender, + uint256 value + ) internal { + unchecked { + uint256 oldAllowance = token.allowance(address(this), spender); + require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); + uint256 newAllowance = oldAllowance - value; + _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); + } + } + + function safePermit( + IERC20Permit token, + address owner, + address spender, + uint256 value, + uint256 deadline, + uint8 v, + bytes32 r, + bytes32 s + ) internal { + uint256 nonceBefore = token.nonces(owner); + token.permit(owner, spender, value, deadline, v, r, s); + uint256 nonceAfter = token.nonces(owner); + require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); + } + + /** + * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement + * on the return value: the return value is optional (but if data is returned, it must not be false). + * @param token The token targeted by the call. + * @param data The call data (encoded using abi.encode or one of its variants). + */ + function _callOptionalReturn(IERC20 token, bytes memory data) private { + // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since + // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that + // the target address contains contract code and also asserts for success in the low-level call. + + bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); + if (returndata.length > 0) { + // Return data is optional + require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); + } + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/utils/Address.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/utils/Address.sol new file mode 100644 index 0000000000..d440b259ee --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/utils/Address.sol @@ -0,0 +1,244 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) + +pragma solidity ^0.8.1; + +/** + * @dev Collection of functions related to the address type + */ +library Address { + /** + * @dev Returns true if `account` is a contract. + * + * [IMPORTANT] + * ==== + * It is unsafe to assume that an address for which this function returns + * false is an externally-owned account (EOA) and not a contract. + * + * Among others, `isContract` will return false for the following + * types of addresses: + * + * - an externally-owned account + * - a contract in construction + * - an address where a contract will be created + * - an address where a contract lived, but was destroyed + * ==== + * + * [IMPORTANT] + * ==== + * You shouldn't rely on `isContract` to protect against flash loan attacks! + * + * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets + * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract + * constructor. + * ==== + */ + function isContract(address account) internal view returns (bool) { + // This method relies on extcodesize/address.code.length, which returns 0 + // for contracts in construction, since the code is only stored at the end + // of the constructor execution. + + return account.code.length > 0; + } + + /** + * @dev Replacement for Solidity's `transfer`: sends `amount` wei to + * `recipient`, forwarding all available gas and reverting on errors. + * + * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost + * of certain opcodes, possibly making contracts go over the 2300 gas limit + * imposed by `transfer`, making them unable to receive funds via + * `transfer`. {sendValue} removes this limitation. + * + * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. + * + * IMPORTANT: because control is transferred to `recipient`, care must be + * taken to not create reentrancy vulnerabilities. Consider using + * {ReentrancyGuard} or the + * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. + */ + function sendValue(address payable recipient, uint256 amount) internal { + require(address(this).balance >= amount, "Address: insufficient balance"); + + (bool success, ) = recipient.call{value: amount}(""); + require(success, "Address: unable to send value, recipient may have reverted"); + } + + /** + * @dev Performs a Solidity function call using a low level `call`. A + * plain `call` is an unsafe replacement for a function call: use this + * function instead. + * + * If `target` reverts with a revert reason, it is bubbled up by this + * function (like regular Solidity function calls). + * + * Returns the raw returned data. To convert to the expected return value, + * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. + * + * Requirements: + * + * - `target` must be a contract. + * - calling `target` with `data` must not revert. + * + * _Available since v3.1._ + */ + function functionCall(address target, bytes memory data) internal returns (bytes memory) { + return functionCallWithValue(target, data, 0, "Address: low-level call failed"); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with + * `errorMessage` as a fallback revert reason when `target` reverts. + * + * _Available since v3.1._ + */ + function functionCall( + address target, + bytes memory data, + string memory errorMessage + ) internal returns (bytes memory) { + return functionCallWithValue(target, data, 0, errorMessage); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but also transferring `value` wei to `target`. + * + * Requirements: + * + * - the calling contract must have an ETH balance of at least `value`. + * - the called Solidity function must be `payable`. + * + * _Available since v3.1._ + */ + function functionCallWithValue( + address target, + bytes memory data, + uint256 value + ) internal returns (bytes memory) { + return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); + } + + /** + * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but + * with `errorMessage` as a fallback revert reason when `target` reverts. + * + * _Available since v3.1._ + */ + function functionCallWithValue( + address target, + bytes memory data, + uint256 value, + string memory errorMessage + ) internal returns (bytes memory) { + require(address(this).balance >= value, "Address: insufficient balance for call"); + (bool success, bytes memory returndata) = target.call{value: value}(data); + return verifyCallResultFromTarget(target, success, returndata, errorMessage); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but performing a static call. + * + * _Available since v3.3._ + */ + function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { + return functionStaticCall(target, data, "Address: low-level static call failed"); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], + * but performing a static call. + * + * _Available since v3.3._ + */ + function functionStaticCall( + address target, + bytes memory data, + string memory errorMessage + ) internal view returns (bytes memory) { + (bool success, bytes memory returndata) = target.staticcall(data); + return verifyCallResultFromTarget(target, success, returndata, errorMessage); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but performing a delegate call. + * + * _Available since v3.4._ + */ + function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { + return functionDelegateCall(target, data, "Address: low-level delegate call failed"); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], + * but performing a delegate call. + * + * _Available since v3.4._ + */ + function functionDelegateCall( + address target, + bytes memory data, + string memory errorMessage + ) internal returns (bytes memory) { + (bool success, bytes memory returndata) = target.delegatecall(data); + return verifyCallResultFromTarget(target, success, returndata, errorMessage); + } + + /** + * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling + * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. + * + * _Available since v4.8._ + */ + function verifyCallResultFromTarget( + address target, + bool success, + bytes memory returndata, + string memory errorMessage + ) internal view returns (bytes memory) { + if (success) { + if (returndata.length == 0) { + // only check isContract if the call was successful and the return data is empty + // otherwise we already know that it was a contract + require(isContract(target), "Address: call to non-contract"); + } + return returndata; + } else { + _revert(returndata, errorMessage); + } + } + + /** + * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the + * revert reason or using the provided one. + * + * _Available since v4.3._ + */ + function verifyCallResult( + bool success, + bytes memory returndata, + string memory errorMessage + ) internal pure returns (bytes memory) { + if (success) { + return returndata; + } else { + _revert(returndata, errorMessage); + } + } + + function _revert(bytes memory returndata, string memory errorMessage) private pure { + // Look for revert reason and bubble it up if present + if (returndata.length > 0) { + // The easiest way to bubble the revert reason is using memory via assembly + /// @solidity memory-safe-assembly + assembly { + let returndata_size := mload(returndata) + revert(add(32, returndata), returndata_size) + } + } else { + revert(errorMessage); + } + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/utils/Context.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/utils/Context.sol new file mode 100644 index 0000000000..f304065b46 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/utils/Context.sol @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts v4.4.1 (utils/Context.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Provides information about the current execution context, including the + * sender of the transaction and its data. While these are generally available + * via msg.sender and msg.data, they should not be accessed in such a direct + * manner, since when dealing with meta-transactions the account sending and + * paying for execution may not be the actual sender (as far as an application + * is concerned). + * + * This contract is only required for intermediate, library-like contracts. + */ +abstract contract Context { + function _msgSender() internal view virtual returns (address) { + return msg.sender; + } + + function _msgData() internal view virtual returns (bytes calldata) { + return msg.data; + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/utils/Strings.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/utils/Strings.sol new file mode 100644 index 0000000000..76aa3640af --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/utils/Strings.sol @@ -0,0 +1,70 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) + +pragma solidity ^0.8.0; + +import "./math/Math.sol"; + +/** + * @dev String operations. + */ +library Strings { + bytes16 private constant _SYMBOLS = "0123456789abcdef"; + uint8 private constant _ADDRESS_LENGTH = 20; + + /** + * @dev Converts a `uint256` to its ASCII `string` decimal representation. + */ + function toString(uint256 value) internal pure returns (string memory) { + unchecked { + uint256 length = Math.log10(value) + 1; + string memory buffer = new string(length); + uint256 ptr; + /// @solidity memory-safe-assembly + assembly { + ptr := add(buffer, add(32, length)) + } + while (true) { + ptr--; + /// @solidity memory-safe-assembly + assembly { + mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) + } + value /= 10; + if (value == 0) break; + } + return buffer; + } + } + + /** + * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. + */ + function toHexString(uint256 value) internal pure returns (string memory) { + unchecked { + return toHexString(value, Math.log256(value) + 1); + } + } + + /** + * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. + */ + function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { + bytes memory buffer = new bytes(2 * length + 2); + buffer[0] = "0"; + buffer[1] = "x"; + for (uint256 i = 2 * length + 1; i > 1; --i) { + buffer[i] = _SYMBOLS[value & 0xf]; + value >>= 4; + } + require(value == 0, "Strings: hex length insufficient"); + return string(buffer); + } + + /** + * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. + */ + function toHexString(address addr) internal pure returns (string memory) { + return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/utils/cryptography/MerkleProof.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/utils/cryptography/MerkleProof.sol new file mode 100644 index 0000000000..938bd96e1b --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/utils/cryptography/MerkleProof.sol @@ -0,0 +1,223 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/MerkleProof.sol) + +pragma solidity ^0.8.0; + +/** + * @dev These functions deal with verification of Merkle Tree proofs. + * + * The tree and the proofs can be generated using our + * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. + * You will find a quickstart guide in the readme. + * + * WARNING: You should avoid using leaf values that are 64 bytes long prior to + * hashing, or use a hash function other than keccak256 for hashing leaves. + * This is because the concatenation of a sorted pair of internal nodes in + * the merkle tree could be reinterpreted as a leaf value. + * OpenZeppelin's JavaScript library generates merkle trees that are safe + * against this attack out of the box. + */ +library MerkleProof { + /** + * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree + * defined by `root`. For this, a `proof` must be provided, containing + * sibling hashes on the branch from the leaf to the root of the tree. Each + * pair of leaves and each pair of pre-images are assumed to be sorted. + */ + function verify( + bytes32[] memory proof, + bytes32 root, + bytes32 leaf + ) internal pure returns (bool) { + return processProof(proof, leaf) == root; + } + + /** + * @dev Calldata version of {verify} + * + * _Available since v4.7._ + */ + function verifyCalldata( + bytes32[] calldata proof, + bytes32 root, + bytes32 leaf + ) internal pure returns (bool) { + return processProofCalldata(proof, leaf) == root; + } + + /** + * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up + * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt + * hash matches the root of the tree. When processing the proof, the pairs + * of leafs & pre-images are assumed to be sorted. + * + * _Available since v4.4._ + */ + function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { + bytes32 computedHash = leaf; + for (uint256 i = 0; i < proof.length; i++) { + computedHash = _hashPair(computedHash, proof[i]); + } + return computedHash; + } + + /** + * @dev Calldata version of {processProof} + * + * _Available since v4.7._ + */ + function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { + bytes32 computedHash = leaf; + for (uint256 i = 0; i < proof.length; i++) { + computedHash = _hashPair(computedHash, proof[i]); + } + return computedHash; + } + + /** + * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by + * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. + * + * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. + * + * _Available since v4.7._ + */ + function multiProofVerify( + bytes32[] memory proof, + bool[] memory proofFlags, + bytes32 root, + bytes32[] memory leaves + ) internal pure returns (bool) { + return processMultiProof(proof, proofFlags, leaves) == root; + } + + /** + * @dev Calldata version of {multiProofVerify} + * + * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. + * + * _Available since v4.7._ + */ + function multiProofVerifyCalldata( + bytes32[] calldata proof, + bool[] calldata proofFlags, + bytes32 root, + bytes32[] memory leaves + ) internal pure returns (bool) { + return processMultiProofCalldata(proof, proofFlags, leaves) == root; + } + + /** + * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction + * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another + * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false + * respectively. + * + * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree + * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the + * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). + * + * _Available since v4.7._ + */ + function processMultiProof( + bytes32[] memory proof, + bool[] memory proofFlags, + bytes32[] memory leaves + ) internal pure returns (bytes32 merkleRoot) { + // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by + // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the + // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of + // the merkle tree. + uint256 leavesLen = leaves.length; + uint256 totalHashes = proofFlags.length; + + // Check proof validity. + require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); + + // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using + // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". + bytes32[] memory hashes = new bytes32[](totalHashes); + uint256 leafPos = 0; + uint256 hashPos = 0; + uint256 proofPos = 0; + // At each step, we compute the next hash using two values: + // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we + // get the next hash. + // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the + // `proof` array. + for (uint256 i = 0; i < totalHashes; i++) { + bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; + bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; + hashes[i] = _hashPair(a, b); + } + + if (totalHashes > 0) { + return hashes[totalHashes - 1]; + } else if (leavesLen > 0) { + return leaves[0]; + } else { + return proof[0]; + } + } + + /** + * @dev Calldata version of {processMultiProof}. + * + * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. + * + * _Available since v4.7._ + */ + function processMultiProofCalldata( + bytes32[] calldata proof, + bool[] calldata proofFlags, + bytes32[] memory leaves + ) internal pure returns (bytes32 merkleRoot) { + // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by + // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the + // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of + // the merkle tree. + uint256 leavesLen = leaves.length; + uint256 totalHashes = proofFlags.length; + + // Check proof validity. + require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); + + // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using + // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". + bytes32[] memory hashes = new bytes32[](totalHashes); + uint256 leafPos = 0; + uint256 hashPos = 0; + uint256 proofPos = 0; + // At each step, we compute the next hash using two values: + // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we + // get the next hash. + // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the + // `proof` array. + for (uint256 i = 0; i < totalHashes; i++) { + bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; + bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; + hashes[i] = _hashPair(a, b); + } + + if (totalHashes > 0) { + return hashes[totalHashes - 1]; + } else if (leavesLen > 0) { + return leaves[0]; + } else { + return proof[0]; + } + } + + function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { + return a < b ? _efficientHash(a, b) : _efficientHash(b, a); + } + + function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { + /// @solidity memory-safe-assembly + assembly { + mstore(0x00, a) + mstore(0x20, b) + value := keccak256(0x00, 0x40) + } + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/utils/math/Math.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/utils/math/Math.sol new file mode 100644 index 0000000000..7848c92038 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/@openzeppelin/contracts/utils/math/Math.sol @@ -0,0 +1,345 @@ +// SPDX-License-Identifier: MIT +// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) + +pragma solidity ^0.8.0; + +/** + * @dev Standard math utilities missing in the Solidity language. + */ +library Math { + enum Rounding { + Down, // Toward negative infinity + Up, // Toward infinity + Zero // Toward zero + } + + /** + * @dev Returns the largest of two numbers. + */ + function max(uint256 a, uint256 b) internal pure returns (uint256) { + return a > b ? a : b; + } + + /** + * @dev Returns the smallest of two numbers. + */ + function min(uint256 a, uint256 b) internal pure returns (uint256) { + return a < b ? a : b; + } + + /** + * @dev Returns the average of two numbers. The result is rounded towards + * zero. + */ + function average(uint256 a, uint256 b) internal pure returns (uint256) { + // (a + b) / 2 can overflow. + return (a & b) + (a ^ b) / 2; + } + + /** + * @dev Returns the ceiling of the division of two numbers. + * + * This differs from standard division with `/` in that it rounds up instead + * of rounding down. + */ + function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { + // (a + b - 1) / b can overflow on addition, so we distribute. + return a == 0 ? 0 : (a - 1) / b + 1; + } + + /** + * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 + * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) + * with further edits by Uniswap Labs also under MIT license. + */ + function mulDiv( + uint256 x, + uint256 y, + uint256 denominator + ) internal pure returns (uint256 result) { + unchecked { + // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use + // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 + // variables such that product = prod1 * 2^256 + prod0. + uint256 prod0; // Least significant 256 bits of the product + uint256 prod1; // Most significant 256 bits of the product + assembly { + let mm := mulmod(x, y, not(0)) + prod0 := mul(x, y) + prod1 := sub(sub(mm, prod0), lt(mm, prod0)) + } + + // Handle non-overflow cases, 256 by 256 division. + if (prod1 == 0) { + return prod0 / denominator; + } + + // Make sure the result is less than 2^256. Also prevents denominator == 0. + require(denominator > prod1); + + /////////////////////////////////////////////// + // 512 by 256 division. + /////////////////////////////////////////////// + + // Make division exact by subtracting the remainder from [prod1 prod0]. + uint256 remainder; + assembly { + // Compute remainder using mulmod. + remainder := mulmod(x, y, denominator) + + // Subtract 256 bit number from 512 bit number. + prod1 := sub(prod1, gt(remainder, prod0)) + prod0 := sub(prod0, remainder) + } + + // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. + // See https://cs.stackexchange.com/q/138556/92363. + + // Does not overflow because the denominator cannot be zero at this stage in the function. + uint256 twos = denominator & (~denominator + 1); + assembly { + // Divide denominator by twos. + denominator := div(denominator, twos) + + // Divide [prod1 prod0] by twos. + prod0 := div(prod0, twos) + + // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. + twos := add(div(sub(0, twos), twos), 1) + } + + // Shift in bits from prod1 into prod0. + prod0 |= prod1 * twos; + + // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such + // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for + // four bits. That is, denominator * inv = 1 mod 2^4. + uint256 inverse = (3 * denominator) ^ 2; + + // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works + // in modular arithmetic, doubling the correct bits in each step. + inverse *= 2 - denominator * inverse; // inverse mod 2^8 + inverse *= 2 - denominator * inverse; // inverse mod 2^16 + inverse *= 2 - denominator * inverse; // inverse mod 2^32 + inverse *= 2 - denominator * inverse; // inverse mod 2^64 + inverse *= 2 - denominator * inverse; // inverse mod 2^128 + inverse *= 2 - denominator * inverse; // inverse mod 2^256 + + // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. + // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is + // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 + // is no longer required. + result = prod0 * inverse; + return result; + } + } + + /** + * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. + */ + function mulDiv( + uint256 x, + uint256 y, + uint256 denominator, + Rounding rounding + ) internal pure returns (uint256) { + uint256 result = mulDiv(x, y, denominator); + if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { + result += 1; + } + return result; + } + + /** + * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. + * + * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). + */ + function sqrt(uint256 a) internal pure returns (uint256) { + if (a == 0) { + return 0; + } + + // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. + // + // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have + // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. + // + // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` + // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` + // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` + // + // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. + uint256 result = 1 << (log2(a) >> 1); + + // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, + // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at + // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision + // into the expected uint128 result. + unchecked { + result = (result + a / result) >> 1; + result = (result + a / result) >> 1; + result = (result + a / result) >> 1; + result = (result + a / result) >> 1; + result = (result + a / result) >> 1; + result = (result + a / result) >> 1; + result = (result + a / result) >> 1; + return min(result, a / result); + } + } + + /** + * @notice Calculates sqrt(a), following the selected rounding direction. + */ + function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { + unchecked { + uint256 result = sqrt(a); + return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); + } + } + + /** + * @dev Return the log in base 2, rounded down, of a positive value. + * Returns 0 if given 0. + */ + function log2(uint256 value) internal pure returns (uint256) { + uint256 result = 0; + unchecked { + if (value >> 128 > 0) { + value >>= 128; + result += 128; + } + if (value >> 64 > 0) { + value >>= 64; + result += 64; + } + if (value >> 32 > 0) { + value >>= 32; + result += 32; + } + if (value >> 16 > 0) { + value >>= 16; + result += 16; + } + if (value >> 8 > 0) { + value >>= 8; + result += 8; + } + if (value >> 4 > 0) { + value >>= 4; + result += 4; + } + if (value >> 2 > 0) { + value >>= 2; + result += 2; + } + if (value >> 1 > 0) { + result += 1; + } + } + return result; + } + + /** + * @dev Return the log in base 2, following the selected rounding direction, of a positive value. + * Returns 0 if given 0. + */ + function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { + unchecked { + uint256 result = log2(value); + return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); + } + } + + /** + * @dev Return the log in base 10, rounded down, of a positive value. + * Returns 0 if given 0. + */ + function log10(uint256 value) internal pure returns (uint256) { + uint256 result = 0; + unchecked { + if (value >= 10**64) { + value /= 10**64; + result += 64; + } + if (value >= 10**32) { + value /= 10**32; + result += 32; + } + if (value >= 10**16) { + value /= 10**16; + result += 16; + } + if (value >= 10**8) { + value /= 10**8; + result += 8; + } + if (value >= 10**4) { + value /= 10**4; + result += 4; + } + if (value >= 10**2) { + value /= 10**2; + result += 2; + } + if (value >= 10**1) { + result += 1; + } + } + return result; + } + + /** + * @dev Return the log in base 10, following the selected rounding direction, of a positive value. + * Returns 0 if given 0. + */ + function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { + unchecked { + uint256 result = log10(value); + return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); + } + } + + /** + * @dev Return the log in base 256, rounded down, of a positive value. + * Returns 0 if given 0. + * + * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. + */ + function log256(uint256 value) internal pure returns (uint256) { + uint256 result = 0; + unchecked { + if (value >> 128 > 0) { + value >>= 128; + result += 16; + } + if (value >> 64 > 0) { + value >>= 64; + result += 8; + } + if (value >> 32 > 0) { + value >>= 32; + result += 4; + } + if (value >> 16 > 0) { + value >>= 16; + result += 2; + } + if (value >> 8 > 0) { + result += 1; + } + } + return result; + } + + /** + * @dev Return the log in base 10, following the selected rounding direction, of a positive value. + * Returns 0 if given 0. + */ + function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { + unchecked { + uint256 result = log256(value); + return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); + } + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/erc721a/contracts/ERC721A.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/erc721a/contracts/ERC721A.sol new file mode 100644 index 0000000000..e27f521996 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/erc721a/contracts/ERC721A.sol @@ -0,0 +1,1091 @@ +// SPDX-License-Identifier: MIT +// ERC721A Contracts v4.2.3 +// Creator: Chiru Labs + +pragma solidity ^0.8.4; + +import './IERC721A.sol'; + +/** + * @dev Interface of ERC721 token receiver. + */ +interface ERC721A__IERC721Receiver { + function onERC721Received( + address operator, + address from, + uint256 tokenId, + bytes calldata data + ) external returns (bytes4); +} + +/** + * @title ERC721A + * + * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) + * Non-Fungible Token Standard, including the Metadata extension. + * Optimized for lower gas during batch mints. + * + * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) + * starting from `_startTokenId()`. + * + * Assumptions: + * + * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. + * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). + */ +contract ERC721A is IERC721A { + // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). + struct TokenApprovalRef { + address value; + } + + // ============================================================= + // CONSTANTS + // ============================================================= + + // Mask of an entry in packed address data. + uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; + + // The bit position of `numberMinted` in packed address data. + uint256 private constant _BITPOS_NUMBER_MINTED = 64; + + // The bit position of `numberBurned` in packed address data. + uint256 private constant _BITPOS_NUMBER_BURNED = 128; + + // The bit position of `aux` in packed address data. + uint256 private constant _BITPOS_AUX = 192; + + // Mask of all 256 bits in packed address data except the 64 bits for `aux`. + uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; + + // The bit position of `startTimestamp` in packed ownership. + uint256 private constant _BITPOS_START_TIMESTAMP = 160; + + // The bit mask of the `burned` bit in packed ownership. + uint256 private constant _BITMASK_BURNED = 1 << 224; + + // The bit position of the `nextInitialized` bit in packed ownership. + uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; + + // The bit mask of the `nextInitialized` bit in packed ownership. + uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; + + // The bit position of `extraData` in packed ownership. + uint256 private constant _BITPOS_EXTRA_DATA = 232; + + // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. + uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; + + // The mask of the lower 160 bits for addresses. + uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; + + // The maximum `quantity` that can be minted with {_mintERC2309}. + // This limit is to prevent overflows on the address data entries. + // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} + // is required to cause an overflow, which is unrealistic. + uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; + + // The `Transfer` event signature is given by: + // `keccak256(bytes("Transfer(address,address,uint256)"))`. + bytes32 private constant _TRANSFER_EVENT_SIGNATURE = + 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; + + // ============================================================= + // STORAGE + // ============================================================= + + // The next token ID to be minted. + uint256 private _currentIndex; + + // The number of tokens burned. + uint256 private _burnCounter; + + // Token name + string private _name; + + // Token symbol + string private _symbol; + + // Mapping from token ID to ownership details + // An empty struct value does not necessarily mean the token is unowned. + // See {_packedOwnershipOf} implementation for details. + // + // Bits Layout: + // - [0..159] `addr` + // - [160..223] `startTimestamp` + // - [224] `burned` + // - [225] `nextInitialized` + // - [232..255] `extraData` + mapping(uint256 => uint256) private _packedOwnerships; + + // Mapping owner address to address data. + // + // Bits Layout: + // - [0..63] `balance` + // - [64..127] `numberMinted` + // - [128..191] `numberBurned` + // - [192..255] `aux` + mapping(address => uint256) private _packedAddressData; + + // Mapping from token ID to approved address. + mapping(uint256 => TokenApprovalRef) private _tokenApprovals; + + // Mapping from owner to operator approvals + mapping(address => mapping(address => bool)) private _operatorApprovals; + + // ============================================================= + // CONSTRUCTOR + // ============================================================= + + constructor(string memory name_, string memory symbol_) { + _name = name_; + _symbol = symbol_; + _currentIndex = _startTokenId(); + } + + // ============================================================= + // TOKEN COUNTING OPERATIONS + // ============================================================= + + /** + * @dev Returns the starting token ID. + * To change the starting token ID, please override this function. + */ + function _startTokenId() internal view virtual returns (uint256) { + return 0; + } + + /** + * @dev Returns the next token ID to be minted. + */ + function _nextTokenId() internal view virtual returns (uint256) { + return _currentIndex; + } + + /** + * @dev Returns the total number of tokens in existence. + * Burned tokens will reduce the count. + * To get the total number of tokens minted, please see {_totalMinted}. + */ + function totalSupply() public view virtual override returns (uint256) { + // Counter underflow is impossible as _burnCounter cannot be incremented + // more than `_currentIndex - _startTokenId()` times. + unchecked { + return _currentIndex - _burnCounter - _startTokenId(); + } + } + + /** + * @dev Returns the total amount of tokens minted in the contract. + */ + function _totalMinted() internal view virtual returns (uint256) { + // Counter underflow is impossible as `_currentIndex` does not decrement, + // and it is initialized to `_startTokenId()`. + unchecked { + return _currentIndex - _startTokenId(); + } + } + + /** + * @dev Returns the total number of tokens burned. + */ + function _totalBurned() internal view virtual returns (uint256) { + return _burnCounter; + } + + // ============================================================= + // ADDRESS DATA OPERATIONS + // ============================================================= + + /** + * @dev Returns the number of tokens in `owner`'s account. + */ + function balanceOf(address owner) public view virtual override returns (uint256) { + if (owner == address(0)) revert BalanceQueryForZeroAddress(); + return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; + } + + /** + * Returns the number of tokens minted by `owner`. + */ + function _numberMinted(address owner) internal view returns (uint256) { + return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; + } + + /** + * Returns the number of tokens burned by or on behalf of `owner`. + */ + function _numberBurned(address owner) internal view returns (uint256) { + return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; + } + + /** + * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). + */ + function _getAux(address owner) internal view returns (uint64) { + return uint64(_packedAddressData[owner] >> _BITPOS_AUX); + } + + /** + * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). + * If there are multiple variables, please pack them into a uint64. + */ + function _setAux(address owner, uint64 aux) internal virtual { + uint256 packed = _packedAddressData[owner]; + uint256 auxCasted; + // Cast `aux` with assembly to avoid redundant masking. + assembly { + auxCasted := aux + } + packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); + _packedAddressData[owner] = packed; + } + + // ============================================================= + // IERC165 + // ============================================================= + + /** + * @dev Returns true if this contract implements the interface defined by + * `interfaceId`. See the corresponding + * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) + * to learn more about how these ids are created. + * + * This function call must use less than 30000 gas. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { + // The interface IDs are constants representing the first 4 bytes + // of the XOR of all function selectors in the interface. + // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) + // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) + return + interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. + interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. + interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. + } + + // ============================================================= + // IERC721Metadata + // ============================================================= + + /** + * @dev Returns the token collection name. + */ + function name() public view virtual override returns (string memory) { + return _name; + } + + /** + * @dev Returns the token collection symbol. + */ + function symbol() public view virtual override returns (string memory) { + return _symbol; + } + + /** + * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. + */ + function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { + if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); + + string memory baseURI = _baseURI(); + return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; + } + + /** + * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each + * token will be the concatenation of the `baseURI` and the `tokenId`. Empty + * by default, it can be overridden in child contracts. + */ + function _baseURI() internal view virtual returns (string memory) { + return ''; + } + + // ============================================================= + // OWNERSHIPS OPERATIONS + // ============================================================= + + /** + * @dev Returns the owner of the `tokenId` token. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function ownerOf(uint256 tokenId) public view virtual override returns (address) { + return address(uint160(_packedOwnershipOf(tokenId))); + } + + /** + * @dev Gas spent here starts off proportional to the maximum mint batch size. + * It gradually moves to O(1) as tokens get transferred around over time. + */ + function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { + return _unpackedOwnership(_packedOwnershipOf(tokenId)); + } + + /** + * @dev Returns the unpacked `TokenOwnership` struct at `index`. + */ + function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { + return _unpackedOwnership(_packedOwnerships[index]); + } + + /** + * @dev Initializes the ownership slot minted at `index` for efficiency purposes. + */ + function _initializeOwnershipAt(uint256 index) internal virtual { + if (_packedOwnerships[index] == 0) { + _packedOwnerships[index] = _packedOwnershipOf(index); + } + } + + /** + * Returns the packed ownership data of `tokenId`. + */ + function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { + uint256 curr = tokenId; + + unchecked { + if (_startTokenId() <= curr) + if (curr < _currentIndex) { + uint256 packed = _packedOwnerships[curr]; + // If not burned. + if (packed & _BITMASK_BURNED == 0) { + // Invariant: + // There will always be an initialized ownership slot + // (i.e. `ownership.addr != address(0) && ownership.burned == false`) + // before an unintialized ownership slot + // (i.e. `ownership.addr == address(0) && ownership.burned == false`) + // Hence, `curr` will not underflow. + // + // We can directly compare the packed value. + // If the address is zero, packed will be zero. + while (packed == 0) { + packed = _packedOwnerships[--curr]; + } + return packed; + } + } + } + revert OwnerQueryForNonexistentToken(); + } + + /** + * @dev Returns the unpacked `TokenOwnership` struct from `packed`. + */ + function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { + ownership.addr = address(uint160(packed)); + ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); + ownership.burned = packed & _BITMASK_BURNED != 0; + ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); + } + + /** + * @dev Packs ownership data into a single uint256. + */ + function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { + assembly { + // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. + owner := and(owner, _BITMASK_ADDRESS) + // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. + result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) + } + } + + /** + * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. + */ + function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { + // For branchless setting of the `nextInitialized` flag. + assembly { + // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. + result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) + } + } + + // ============================================================= + // APPROVAL OPERATIONS + // ============================================================= + + /** + * @dev Gives permission to `to` to transfer `tokenId` token to another account. + * The approval is cleared when the token is transferred. + * + * Only a single account can be approved at a time, so approving the + * zero address clears previous approvals. + * + * Requirements: + * + * - The caller must own the token or be an approved operator. + * - `tokenId` must exist. + * + * Emits an {Approval} event. + */ + function approve(address to, uint256 tokenId) public payable virtual override { + address owner = ownerOf(tokenId); + + if (_msgSenderERC721A() != owner) + if (!isApprovedForAll(owner, _msgSenderERC721A())) { + revert ApprovalCallerNotOwnerNorApproved(); + } + + _tokenApprovals[tokenId].value = to; + emit Approval(owner, to, tokenId); + } + + /** + * @dev Returns the account approved for `tokenId` token. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function getApproved(uint256 tokenId) public view virtual override returns (address) { + if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); + + return _tokenApprovals[tokenId].value; + } + + /** + * @dev Approve or remove `operator` as an operator for the caller. + * Operators can call {transferFrom} or {safeTransferFrom} + * for any token owned by the caller. + * + * Requirements: + * + * - The `operator` cannot be the caller. + * + * Emits an {ApprovalForAll} event. + */ + function setApprovalForAll(address operator, bool approved) public virtual override { + _operatorApprovals[_msgSenderERC721A()][operator] = approved; + emit ApprovalForAll(_msgSenderERC721A(), operator, approved); + } + + /** + * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. + * + * See {setApprovalForAll}. + */ + function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { + return _operatorApprovals[owner][operator]; + } + + /** + * @dev Returns whether `tokenId` exists. + * + * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. + * + * Tokens start existing when they are minted. See {_mint}. + */ + function _exists(uint256 tokenId) internal view virtual returns (bool) { + return + _startTokenId() <= tokenId && + tokenId < _currentIndex && // If within bounds, + _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. + } + + /** + * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. + */ + function _isSenderApprovedOrOwner( + address approvedAddress, + address owner, + address msgSender + ) private pure returns (bool result) { + assembly { + // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. + owner := and(owner, _BITMASK_ADDRESS) + // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. + msgSender := and(msgSender, _BITMASK_ADDRESS) + // `msgSender == owner || msgSender == approvedAddress`. + result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) + } + } + + /** + * @dev Returns the storage slot and value for the approved address of `tokenId`. + */ + function _getApprovedSlotAndAddress(uint256 tokenId) + private + view + returns (uint256 approvedAddressSlot, address approvedAddress) + { + TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; + // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. + assembly { + approvedAddressSlot := tokenApproval.slot + approvedAddress := sload(approvedAddressSlot) + } + } + + // ============================================================= + // TRANSFER OPERATIONS + // ============================================================= + + /** + * @dev Transfers `tokenId` from `from` to `to`. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must be owned by `from`. + * - If the caller is not `from`, it must be approved to move this token + * by either {approve} or {setApprovalForAll}. + * + * Emits a {Transfer} event. + */ + function transferFrom( + address from, + address to, + uint256 tokenId + ) public payable virtual override { + uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); + + if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); + + (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); + + // The nested ifs save around 20+ gas over a compound boolean condition. + if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) + if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); + + if (to == address(0)) revert TransferToZeroAddress(); + + _beforeTokenTransfers(from, to, tokenId, 1); + + // Clear approvals from the previous owner. + assembly { + if approvedAddress { + // This is equivalent to `delete _tokenApprovals[tokenId]`. + sstore(approvedAddressSlot, 0) + } + } + + // Underflow of the sender's balance is impossible because we check for + // ownership above and the recipient's balance can't realistically overflow. + // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. + unchecked { + // We can directly increment and decrement the balances. + --_packedAddressData[from]; // Updates: `balance -= 1`. + ++_packedAddressData[to]; // Updates: `balance += 1`. + + // Updates: + // - `address` to the next owner. + // - `startTimestamp` to the timestamp of transfering. + // - `burned` to `false`. + // - `nextInitialized` to `true`. + _packedOwnerships[tokenId] = _packOwnershipData( + to, + _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) + ); + + // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . + if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { + uint256 nextTokenId = tokenId + 1; + // If the next slot's address is zero and not burned (i.e. packed value is zero). + if (_packedOwnerships[nextTokenId] == 0) { + // If the next slot is within bounds. + if (nextTokenId != _currentIndex) { + // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. + _packedOwnerships[nextTokenId] = prevOwnershipPacked; + } + } + } + } + + emit Transfer(from, to, tokenId); + _afterTokenTransfers(from, to, tokenId, 1); + } + + /** + * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. + */ + function safeTransferFrom( + address from, + address to, + uint256 tokenId + ) public payable virtual override { + safeTransferFrom(from, to, tokenId, ''); + } + + /** + * @dev Safely transfers `tokenId` token from `from` to `to`. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must exist and be owned by `from`. + * - If the caller is not `from`, it must be approved to move this token + * by either {approve} or {setApprovalForAll}. + * - If `to` refers to a smart contract, it must implement + * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function safeTransferFrom( + address from, + address to, + uint256 tokenId, + bytes memory _data + ) public payable virtual override { + transferFrom(from, to, tokenId); + if (to.code.length != 0) + if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { + revert TransferToNonERC721ReceiverImplementer(); + } + } + + /** + * @dev Hook that is called before a set of serially-ordered token IDs + * are about to be transferred. This includes minting. + * And also called before burning one token. + * + * `startTokenId` - the first token ID to be transferred. + * `quantity` - the amount to be transferred. + * + * Calling conditions: + * + * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be + * transferred to `to`. + * - When `from` is zero, `tokenId` will be minted for `to`. + * - When `to` is zero, `tokenId` will be burned by `from`. + * - `from` and `to` are never both zero. + */ + function _beforeTokenTransfers( + address from, + address to, + uint256 startTokenId, + uint256 quantity + ) internal virtual {} + + /** + * @dev Hook that is called after a set of serially-ordered token IDs + * have been transferred. This includes minting. + * And also called after one token has been burned. + * + * `startTokenId` - the first token ID to be transferred. + * `quantity` - the amount to be transferred. + * + * Calling conditions: + * + * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been + * transferred to `to`. + * - When `from` is zero, `tokenId` has been minted for `to`. + * - When `to` is zero, `tokenId` has been burned by `from`. + * - `from` and `to` are never both zero. + */ + function _afterTokenTransfers( + address from, + address to, + uint256 startTokenId, + uint256 quantity + ) internal virtual {} + + /** + * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. + * + * `from` - Previous owner of the given token ID. + * `to` - Target address that will receive the token. + * `tokenId` - Token ID to be transferred. + * `_data` - Optional data to send along with the call. + * + * Returns whether the call correctly returned the expected magic value. + */ + function _checkContractOnERC721Received( + address from, + address to, + uint256 tokenId, + bytes memory _data + ) private returns (bool) { + try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( + bytes4 retval + ) { + return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; + } catch (bytes memory reason) { + if (reason.length == 0) { + revert TransferToNonERC721ReceiverImplementer(); + } else { + assembly { + revert(add(32, reason), mload(reason)) + } + } + } + } + + // ============================================================= + // MINT OPERATIONS + // ============================================================= + + /** + * @dev Mints `quantity` tokens and transfers them to `to`. + * + * Requirements: + * + * - `to` cannot be the zero address. + * - `quantity` must be greater than 0. + * + * Emits a {Transfer} event for each mint. + */ + function _mint(address to, uint256 quantity) internal virtual { + uint256 startTokenId = _currentIndex; + if (quantity == 0) revert MintZeroQuantity(); + + _beforeTokenTransfers(address(0), to, startTokenId, quantity); + + // Overflows are incredibly unrealistic. + // `balance` and `numberMinted` have a maximum limit of 2**64. + // `tokenId` has a maximum limit of 2**256. + unchecked { + // Updates: + // - `balance += quantity`. + // - `numberMinted += quantity`. + // + // We can directly add to the `balance` and `numberMinted`. + _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); + + // Updates: + // - `address` to the owner. + // - `startTimestamp` to the timestamp of minting. + // - `burned` to `false`. + // - `nextInitialized` to `quantity == 1`. + _packedOwnerships[startTokenId] = _packOwnershipData( + to, + _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) + ); + + uint256 toMasked; + uint256 end = startTokenId + quantity; + + // Use assembly to loop and emit the `Transfer` event for gas savings. + // The duplicated `log4` removes an extra check and reduces stack juggling. + // The assembly, together with the surrounding Solidity code, have been + // delicately arranged to nudge the compiler into producing optimized opcodes. + assembly { + // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. + toMasked := and(to, _BITMASK_ADDRESS) + // Emit the `Transfer` event. + log4( + 0, // Start of data (0, since no data). + 0, // End of data (0, since no data). + _TRANSFER_EVENT_SIGNATURE, // Signature. + 0, // `address(0)`. + toMasked, // `to`. + startTokenId // `tokenId`. + ) + + // The `iszero(eq(,))` check ensures that large values of `quantity` + // that overflows uint256 will make the loop run out of gas. + // The compiler will optimize the `iszero` away for performance. + for { + let tokenId := add(startTokenId, 1) + } iszero(eq(tokenId, end)) { + tokenId := add(tokenId, 1) + } { + // Emit the `Transfer` event. Similar to above. + log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) + } + } + if (toMasked == 0) revert MintToZeroAddress(); + + _currentIndex = end; + } + _afterTokenTransfers(address(0), to, startTokenId, quantity); + } + + /** + * @dev Mints `quantity` tokens and transfers them to `to`. + * + * This function is intended for efficient minting only during contract creation. + * + * It emits only one {ConsecutiveTransfer} as defined in + * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), + * instead of a sequence of {Transfer} event(s). + * + * Calling this function outside of contract creation WILL make your contract + * non-compliant with the ERC721 standard. + * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 + * {ConsecutiveTransfer} event is only permissible during contract creation. + * + * Requirements: + * + * - `to` cannot be the zero address. + * - `quantity` must be greater than 0. + * + * Emits a {ConsecutiveTransfer} event. + */ + function _mintERC2309(address to, uint256 quantity) internal virtual { + uint256 startTokenId = _currentIndex; + if (to == address(0)) revert MintToZeroAddress(); + if (quantity == 0) revert MintZeroQuantity(); + if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); + + _beforeTokenTransfers(address(0), to, startTokenId, quantity); + + // Overflows are unrealistic due to the above check for `quantity` to be below the limit. + unchecked { + // Updates: + // - `balance += quantity`. + // - `numberMinted += quantity`. + // + // We can directly add to the `balance` and `numberMinted`. + _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); + + // Updates: + // - `address` to the owner. + // - `startTimestamp` to the timestamp of minting. + // - `burned` to `false`. + // - `nextInitialized` to `quantity == 1`. + _packedOwnerships[startTokenId] = _packOwnershipData( + to, + _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) + ); + + emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); + + _currentIndex = startTokenId + quantity; + } + _afterTokenTransfers(address(0), to, startTokenId, quantity); + } + + /** + * @dev Safely mints `quantity` tokens and transfers them to `to`. + * + * Requirements: + * + * - If `to` refers to a smart contract, it must implement + * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. + * - `quantity` must be greater than 0. + * + * See {_mint}. + * + * Emits a {Transfer} event for each mint. + */ + function _safeMint( + address to, + uint256 quantity, + bytes memory _data + ) internal virtual { + _mint(to, quantity); + + unchecked { + if (to.code.length != 0) { + uint256 end = _currentIndex; + uint256 index = end - quantity; + do { + if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { + revert TransferToNonERC721ReceiverImplementer(); + } + } while (index < end); + // Reentrancy protection. + if (_currentIndex != end) revert(); + } + } + } + + /** + * @dev Equivalent to `_safeMint(to, quantity, '')`. + */ + function _safeMint(address to, uint256 quantity) internal virtual { + _safeMint(to, quantity, ''); + } + + // ============================================================= + // BURN OPERATIONS + // ============================================================= + + /** + * @dev Equivalent to `_burn(tokenId, false)`. + */ + function _burn(uint256 tokenId) internal virtual { + _burn(tokenId, false); + } + + /** + * @dev Destroys `tokenId`. + * The approval is cleared when the token is burned. + * + * Requirements: + * + * - `tokenId` must exist. + * + * Emits a {Transfer} event. + */ + function _burn(uint256 tokenId, bool approvalCheck) internal virtual { + uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); + + address from = address(uint160(prevOwnershipPacked)); + + (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); + + if (approvalCheck) { + // The nested ifs save around 20+ gas over a compound boolean condition. + if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) + if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); + } + + _beforeTokenTransfers(from, address(0), tokenId, 1); + + // Clear approvals from the previous owner. + assembly { + if approvedAddress { + // This is equivalent to `delete _tokenApprovals[tokenId]`. + sstore(approvedAddressSlot, 0) + } + } + + // Underflow of the sender's balance is impossible because we check for + // ownership above and the recipient's balance can't realistically overflow. + // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. + unchecked { + // Updates: + // - `balance -= 1`. + // - `numberBurned += 1`. + // + // We can directly decrement the balance, and increment the number burned. + // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. + _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; + + // Updates: + // - `address` to the last owner. + // - `startTimestamp` to the timestamp of burning. + // - `burned` to `true`. + // - `nextInitialized` to `true`. + _packedOwnerships[tokenId] = _packOwnershipData( + from, + (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) + ); + + // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . + if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { + uint256 nextTokenId = tokenId + 1; + // If the next slot's address is zero and not burned (i.e. packed value is zero). + if (_packedOwnerships[nextTokenId] == 0) { + // If the next slot is within bounds. + if (nextTokenId != _currentIndex) { + // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. + _packedOwnerships[nextTokenId] = prevOwnershipPacked; + } + } + } + } + + emit Transfer(from, address(0), tokenId); + _afterTokenTransfers(from, address(0), tokenId, 1); + + // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. + unchecked { + _burnCounter++; + } + } + + // ============================================================= + // EXTRA DATA OPERATIONS + // ============================================================= + + /** + * @dev Directly sets the extra data for the ownership data `index`. + */ + function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { + uint256 packed = _packedOwnerships[index]; + if (packed == 0) revert OwnershipNotInitializedForExtraData(); + uint256 extraDataCasted; + // Cast `extraData` with assembly to avoid redundant masking. + assembly { + extraDataCasted := extraData + } + packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); + _packedOwnerships[index] = packed; + } + + /** + * @dev Called during each token transfer to set the 24bit `extraData` field. + * Intended to be overridden by the cosumer contract. + * + * `previousExtraData` - the value of `extraData` before transfer. + * + * Calling conditions: + * + * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be + * transferred to `to`. + * - When `from` is zero, `tokenId` will be minted for `to`. + * - When `to` is zero, `tokenId` will be burned by `from`. + * - `from` and `to` are never both zero. + */ + function _extraData( + address from, + address to, + uint24 previousExtraData + ) internal view virtual returns (uint24) {} + + /** + * @dev Returns the next extra data for the packed ownership data. + * The returned result is shifted into position. + */ + function _nextExtraData( + address from, + address to, + uint256 prevOwnershipPacked + ) private view returns (uint256) { + uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); + return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; + } + + // ============================================================= + // OTHER OPERATIONS + // ============================================================= + + /** + * @dev Returns the message sender (defaults to `msg.sender`). + * + * If you are writing GSN compatible contracts, you need to override this function. + */ + function _msgSenderERC721A() internal view virtual returns (address) { + return msg.sender; + } + + /** + * @dev Converts a uint256 to its ASCII string decimal representation. + */ + function _toString(uint256 value) internal pure virtual returns (string memory str) { + assembly { + // The maximum value of a uint256 contains 78 digits (1 byte per digit), but + // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. + // We will need 1 word for the trailing zeros padding, 1 word for the length, + // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. + let m := add(mload(0x40), 0xa0) + // Update the free memory pointer to allocate. + mstore(0x40, m) + // Assign the `str` to the end. + str := sub(m, 0x20) + // Zeroize the slot after the string. + mstore(str, 0) + + // Cache the end of the memory to calculate the length later. + let end := str + + // We write the string from rightmost digit to leftmost digit. + // The following is essentially a do-while loop that also handles the zero case. + // prettier-ignore + for { let temp := value } 1 {} { + str := sub(str, 1) + // Write the character to the pointer. + // The ASCII index of the '0' character is 48. + mstore8(str, add(48, mod(temp, 10))) + // Keep dividing `temp` until zero. + temp := div(temp, 10) + // prettier-ignore + if iszero(temp) { break } + } + + let length := sub(end, str) + // Move the pointer 32 bytes leftwards to make room for the length. + str := sub(str, 0x20) + // Store the length. + mstore(str, length) + } + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/erc721a/contracts/IERC721A.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/erc721a/contracts/IERC721A.sol new file mode 100644 index 0000000000..4bd87db45e --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/erc721a/contracts/IERC721A.sol @@ -0,0 +1,282 @@ +// SPDX-License-Identifier: MIT +// ERC721A Contracts v4.2.3 +// Creator: Chiru Labs + +pragma solidity ^0.8.4; + +/** + * @dev Interface of ERC721A. + */ +interface IERC721A { + /** + * The caller must own the token or be an approved operator. + */ + error ApprovalCallerNotOwnerNorApproved(); + + /** + * The token does not exist. + */ + error ApprovalQueryForNonexistentToken(); + + /** + * Cannot query the balance for the zero address. + */ + error BalanceQueryForZeroAddress(); + + /** + * Cannot mint to the zero address. + */ + error MintToZeroAddress(); + + /** + * The quantity of tokens minted must be more than zero. + */ + error MintZeroQuantity(); + + /** + * The token does not exist. + */ + error OwnerQueryForNonexistentToken(); + + /** + * The caller must own the token or be an approved operator. + */ + error TransferCallerNotOwnerNorApproved(); + + /** + * The token must be owned by `from`. + */ + error TransferFromIncorrectOwner(); + + /** + * Cannot safely transfer to a contract that does not implement the + * ERC721Receiver interface. + */ + error TransferToNonERC721ReceiverImplementer(); + + /** + * Cannot transfer to the zero address. + */ + error TransferToZeroAddress(); + + /** + * The token does not exist. + */ + error URIQueryForNonexistentToken(); + + /** + * The `quantity` minted with ERC2309 exceeds the safety limit. + */ + error MintERC2309QuantityExceedsLimit(); + + /** + * The `extraData` cannot be set on an unintialized ownership slot. + */ + error OwnershipNotInitializedForExtraData(); + + // ============================================================= + // STRUCTS + // ============================================================= + + struct TokenOwnership { + // The address of the owner. + address addr; + // Stores the start time of ownership with minimal overhead for tokenomics. + uint64 startTimestamp; + // Whether the token has been burned. + bool burned; + // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. + uint24 extraData; + } + + // ============================================================= + // TOKEN COUNTERS + // ============================================================= + + /** + * @dev Returns the total number of tokens in existence. + * Burned tokens will reduce the count. + * To get the total number of tokens minted, please see {_totalMinted}. + */ + function totalSupply() external view returns (uint256); + + // ============================================================= + // IERC165 + // ============================================================= + + /** + * @dev Returns true if this contract implements the interface defined by + * `interfaceId`. See the corresponding + * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) + * to learn more about how these ids are created. + * + * This function call must use less than 30000 gas. + */ + function supportsInterface(bytes4 interfaceId) external view returns (bool); + + // ============================================================= + // IERC721 + // ============================================================= + + /** + * @dev Emitted when `tokenId` token is transferred from `from` to `to`. + */ + event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); + + /** + * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. + */ + event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); + + /** + * @dev Emitted when `owner` enables or disables + * (`approved`) `operator` to manage all of its assets. + */ + event ApprovalForAll(address indexed owner, address indexed operator, bool approved); + + /** + * @dev Returns the number of tokens in `owner`'s account. + */ + function balanceOf(address owner) external view returns (uint256 balance); + + /** + * @dev Returns the owner of the `tokenId` token. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function ownerOf(uint256 tokenId) external view returns (address owner); + + /** + * @dev Safely transfers `tokenId` token from `from` to `to`, + * checking first that contract recipients are aware of the ERC721 protocol + * to prevent tokens from being forever locked. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must exist and be owned by `from`. + * - If the caller is not `from`, it must be have been allowed to move + * this token by either {approve} or {setApprovalForAll}. + * - If `to` refers to a smart contract, it must implement + * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function safeTransferFrom( + address from, + address to, + uint256 tokenId, + bytes calldata data + ) external payable; + + /** + * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. + */ + function safeTransferFrom( + address from, + address to, + uint256 tokenId + ) external payable; + + /** + * @dev Transfers `tokenId` from `from` to `to`. + * + * WARNING: Usage of this method is discouraged, use {safeTransferFrom} + * whenever possible. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must be owned by `from`. + * - If the caller is not `from`, it must be approved to move this token + * by either {approve} or {setApprovalForAll}. + * + * Emits a {Transfer} event. + */ + function transferFrom( + address from, + address to, + uint256 tokenId + ) external payable; + + /** + * @dev Gives permission to `to` to transfer `tokenId` token to another account. + * The approval is cleared when the token is transferred. + * + * Only a single account can be approved at a time, so approving the + * zero address clears previous approvals. + * + * Requirements: + * + * - The caller must own the token or be an approved operator. + * - `tokenId` must exist. + * + * Emits an {Approval} event. + */ + function approve(address to, uint256 tokenId) external payable; + + /** + * @dev Approve or remove `operator` as an operator for the caller. + * Operators can call {transferFrom} or {safeTransferFrom} + * for any token owned by the caller. + * + * Requirements: + * + * - The `operator` cannot be the caller. + * + * Emits an {ApprovalForAll} event. + */ + function setApprovalForAll(address operator, bool _approved) external; + + /** + * @dev Returns the account approved for `tokenId` token. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function getApproved(uint256 tokenId) external view returns (address operator); + + /** + * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. + * + * See {setApprovalForAll}. + */ + function isApprovedForAll(address owner, address operator) external view returns (bool); + + // ============================================================= + // IERC721Metadata + // ============================================================= + + /** + * @dev Returns the token collection name. + */ + function name() external view returns (string memory); + + /** + * @dev Returns the token collection symbol. + */ + function symbol() external view returns (string memory); + + /** + * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. + */ + function tokenURI(uint256 tokenId) external view returns (string memory); + + // ============================================================= + // IERC2309 + // ============================================================= + + /** + * @dev Emitted when tokens in `fromTokenId` to `toTokenId` + * (inclusive) is transferred from `from` to `to`, as defined in the + * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. + * + * See {_mintERC2309} for more details. + */ + event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/meta.json b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/meta.json new file mode 100644 index 0000000000..76abf18daa --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/meta.json @@ -0,0 +1,19 @@ +{ + "language": "Solidity", + "sources": { + "project:/contracts/ERC721AContract.sol": { + "urls": [ + "project:/contracts/ERC721AContract.sol" + ] + } + }, + "settings": { + "outputSelection": { + "*": { + "": [ + "ast" + ] + } + } + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/project:/contracts/ERC721AContract.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/project:/contracts/ERC721AContract.sol new file mode 100644 index 0000000000..2ebbdecb94 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/project:/contracts/ERC721AContract.sol @@ -0,0 +1,267 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.9; + +import "@openzeppelin/contracts/access/Ownable.sol"; +import "@openzeppelin/contracts/utils/Strings.sol"; +import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; +import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; +import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; +import "erc721a/contracts/ERC721A.sol"; +import "refer2earn/Referable.sol"; +import {DefaultOperatorFilterer} from "./opensea/DefaultOperatorFilterer.sol"; +import "./IMintPass.sol"; + +contract ERC721AContract is ERC721A, Ownable, PaymentSplitter, DefaultOperatorFilterer, ReentrancyGuard, Referable { + + using Strings for uint256; + + struct Token { + uint16 maxSupply; + PublicMintType pubMintType; + uint16 pubMaxMint; + uint72 preSalePrice; + uint72 pubSalePrice; + bool preSaleIsActive; + bool pubSaleIsActive; + bool claimIsActive; + uint8 preSalePhase; + bool transferrable; + bool supplyLock; + } + + enum PublicMintType { PerWallet, PerTransaction } + + mapping(address => uint16) public hasClaimed; + mapping(address => uint16) public hasMinted; + mapping(address => bool) public fiatMinters; + Token public token; + string private baseURI; + IMintPass public mintpass; + string public provenance; + bytes32 public saleMerkleRoot; + bytes32 public claimMerkleRoot; + + constructor( + string memory _name, + string memory _symbol, + string memory _uri, + address[] memory _payees, + uint256[] memory _shares, + address _owner, + address _r2eAddress, + address[] memory _fiatMinters, + string memory _provenance, + Token memory _token + ) ERC721A(_name, _symbol) + Referable(_r2eAddress) + PaymentSplitter(_payees, _shares) { + provenance = _provenance; + baseURI = _uri; + token = _token; + for (uint256 i; i < _fiatMinters.length; i++) fiatMinters[_fiatMinters[i]] = true; + transferOwnership(_owner); + } + + function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { + require(token.transferrable, "Soulbound"); + super.setApprovalForAll(operator, approved); + } + + function approve(address operator, uint256 tokenId) payable public override onlyAllowedOperatorApproval(operator) { + require(token.transferrable, "Soulbound"); + super.approve(operator, tokenId); + } + + function transferFrom(address from, address to, uint256 tokenId) payable public override onlyAllowedOperator(from) { + require(token.transferrable, "Soulbound"); + super.transferFrom(from, to, tokenId); + } + + function safeTransferFrom(address from, address to, uint256 tokenId) payable public override onlyAllowedOperator(from) { + require(token.transferrable, "Soulbound"); + super.safeTransferFrom(from, to, tokenId); + } + + function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) + public + payable + override + onlyAllowedOperator(from) + { + require(token.transferrable, "Soulbound"); + super.safeTransferFrom(from, to, tokenId, data); + } + + function lockSupply() external onlyOwner { + token.supplyLock = true; + } + + function setFiatMinter(address _address, bool _allowed) external onlyOwner { + if (_allowed) { + fiatMinters[_address] = true; + } else { + delete fiatMinters[_address]; + } + } + + function setSaleRoot(bytes32 _root) external onlyOwner { + saleMerkleRoot = _root; + } + + function setClaimRoot(bytes32 _root) external onlyOwner { + claimMerkleRoot = _root; + } + + function _startTokenId() override internal pure returns (uint256) { + return 1; + } + + function tokenURI(uint256 _tokenId) override public view returns (string memory) { + return string(abi.encodePacked(baseURI, _tokenId.toString())); + } + + function setMintPass(address _address) external onlyOwner { + mintpass = IMintPass(_address); + } + + function setPrice( + uint72 _preSalePrice, + uint72 _pubSalePrice + ) external onlyOwner { + token.preSalePrice = _preSalePrice; + token.pubSalePrice = _pubSalePrice; + } + + function updateConfig( + uint16 _maxSupply, + uint16 _pubMaxMint, + PublicMintType _pubMintType + ) external onlyOwner { + if (token.supplyLock) require(_maxSupply == token.maxSupply, "Locked"); + require(_pubMaxMint <= 50, "Too many"); + require(_maxSupply >= totalSupply(), "Invalid supply"); + token.maxSupply = _maxSupply; + token.pubMaxMint = _pubMaxMint; + token.pubMintType = _pubMintType; + } + + function setBaseTokenURI(string memory _uri) external onlyOwner { + baseURI = _uri; + } + + function updateSaleState( + bool _preSaleIsActive, + bool _pubSaleIsActive, + bool _claimIsActive, + uint8 _preSalePhase + ) external onlyOwner { + require(_preSalePhase == 0 || _preSalePhase == 1 || _preSalePhase == 2, "Bad phase"); + if (_preSaleIsActive && _preSalePhase == 1) require(address(mintpass) != address(0), "MintPass undefined"); + if (_preSaleIsActive && _preSalePhase == 2) require(saleMerkleRoot != "", "Root undefined"); + if (_claimIsActive) require(claimMerkleRoot != "", "Root undefined"); + token.preSaleIsActive = _preSaleIsActive; + token.pubSaleIsActive = _pubSaleIsActive; + token.claimIsActive = _claimIsActive; + token.preSalePhase = _preSalePhase; + } + + function isEligible( + address _address, + uint16 _quantity, + uint16 _maxMint, + bytes32[] memory _proof, + uint256 _value + ) internal view returns ( + bool isEligibleClaim, + bool isEligiblePreSale, + bool isEligiblePubSale + ) { + bool _isEligibleClaim; + bool _isEligiblePreSale; + bool _isEligiblePubSale; + bool _hasSupply = uint16(totalSupply()) + _quantity <= token.maxSupply; + if(token.claimIsActive && (_quantity <= (_maxMint - hasClaimed[_address])) && _value == 0) { + _isEligibleClaim = _hasSupply && _maxMint <= 50 && + MerkleProof.verify(_proof, claimMerkleRoot, keccak256(abi.encode(_address, _maxMint))); + } + if(!_isEligibleClaim && token.preSaleIsActive && (_value == token.preSalePrice * _quantity)) { + if (token.preSalePhase == 1) { + _isEligiblePreSale = _hasSupply && (mintpass.balanceOf(_address, 1) >= _quantity); + } + if (token.preSalePhase == 2 && (_quantity <= _maxMint - hasMinted[_address])) { + _isEligiblePreSale = _hasSupply && _maxMint <= 50 && + MerkleProof.verify(_proof, saleMerkleRoot, keccak256(abi.encode(_address, _maxMint))); + } + } + if (!_isEligibleClaim && !_isEligiblePreSale && token.pubSaleIsActive) { + if (token.pubMintType == PublicMintType.PerWallet) { + _isEligiblePubSale = _hasSupply && _quantity <= token.pubMaxMint && (_quantity <= (token.pubMaxMint - hasMinted[_address])); + } else { + _isEligiblePubSale = _hasSupply && _quantity <= token.pubMaxMint; + } + } + return (_isEligibleClaim, _isEligiblePreSale, _isEligiblePubSale); + } + + function _mintTo( + address _address, + uint16 _quantity, + uint16 _maxMint, + bytes32[] memory _proof, + address payable _referrer, + uint256 _value + ) internal { + (bool _isEligibleClaim, bool _isEligiblePreSale, bool _isEligiblePubSale) = isEligible(_address, _quantity, _maxMint, _proof, _value); + require(_isEligibleClaim || _isEligiblePreSale || _isEligiblePubSale, "Not eligible"); + if (_isEligibleClaim) { + require(_value == 0, "ETH incorrect"); + hasClaimed[_address] += _quantity; + } + if (!_isEligibleClaim && _isEligiblePreSale) { + require(token.preSalePrice * _quantity <= _value, "ETH incorrect"); + if (token.preSalePhase == 1) { + mintpass.burnForAddress(1, _quantity, _address); + } + if (token.preSalePhase == 2) { + hasMinted[_address] += _quantity; + } + } + if (!_isEligibleClaim && !_isEligiblePreSale && _isEligiblePubSale) { + require(token.pubSalePrice * _quantity <= _value, "ETH incorrect"); + if (token.pubMintType == PublicMintType.PerWallet) hasMinted[_address] += _quantity; + } + _safeMint(_address, _quantity); + Referable.payReferral(_address, _referrer, _quantity, _value); + } + + function mint( + address _address, + uint256 _quantity, + uint256 _maxMint, + bytes32[] memory _proof, + address payable _referrer + ) external payable nonReentrant { + if (_address != msg.sender) require(fiatMinters[msg.sender], "Unauthorized"); + _mintTo(_address, uint16(_quantity), uint16(_maxMint), _proof, _referrer, msg.value); + } + + function burn(uint256[] memory _ids) external { + for (uint16 i; i < _ids.length; i++) { + require(ownerOf(_ids[i]) == msg.sender, "Unauthorized"); + _burn(_ids[i]); + } + } + + function airdrop(address[] memory _addresses, uint16[] memory _quantities) external onlyOwner { + require(_addresses.length > 0, "Invalid"); + require(_addresses.length == _quantities.length, "Invalid"); + uint16 _quantity; + for (uint256 i; i < _quantities.length; i++) { + require(_quantities[i] <= 50, "Too many"); + _quantity += _quantities[i]; + } + require(totalSupply() + _quantity <= token.maxSupply, "No supply"); + for (uint256 i; i < _addresses.length; i++) _safeMint(_addresses[i], _quantities[i]); + } +} \ No newline at end of file diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/project:/contracts/IMintPass.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/project:/contracts/IMintPass.sol new file mode 100644 index 0000000000..3e18de3809 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/project:/contracts/IMintPass.sol @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.9; + +abstract contract IMintPass { + function balanceOf(address owner, uint256 id) + public + view + virtual + returns (uint256 balance); + function burnForAddress( + uint256 _id, + uint256 _quantity, + address _address + ) public virtual; +} \ No newline at end of file diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/project:/contracts/opensea/DefaultOperatorFilterer.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/project:/contracts/opensea/DefaultOperatorFilterer.sol new file mode 100644 index 0000000000..d74d5a23e6 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/project:/contracts/opensea/DefaultOperatorFilterer.sol @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.13; + +import {OperatorFilterer} from "./OperatorFilterer.sol"; + +/** + * @title DefaultOperatorFilterer + * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription. + */ +abstract contract DefaultOperatorFilterer is OperatorFilterer { + address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6); + + constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {} +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/project:/contracts/opensea/IOperatorFilterRegistry.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/project:/contracts/opensea/IOperatorFilterRegistry.sol new file mode 100644 index 0000000000..f26750bd53 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/project:/contracts/opensea/IOperatorFilterRegistry.sol @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.13; + +interface IOperatorFilterRegistry { + function isOperatorAllowed(address registrant, address operator) external view returns (bool); + function register(address registrant) external; + function registerAndSubscribe(address registrant, address subscription) external; + function registerAndCopyEntries(address registrant, address registrantToCopy) external; + function unregister(address addr) external; + function updateOperator(address registrant, address operator, bool filtered) external; + function updateOperators(address registrant, address[] calldata operators, bool filtered) external; + function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; + function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; + function subscribe(address registrant, address registrantToSubscribe) external; + function unsubscribe(address registrant, bool copyExistingEntries) external; + function subscriptionOf(address addr) external returns (address registrant); + function subscribers(address registrant) external returns (address[] memory); + function subscriberAt(address registrant, uint256 index) external returns (address); + function copyEntriesOf(address registrant, address registrantToCopy) external; + function isOperatorFiltered(address registrant, address operator) external returns (bool); + function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); + function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); + function filteredOperators(address addr) external returns (address[] memory); + function filteredCodeHashes(address addr) external returns (bytes32[] memory); + function filteredOperatorAt(address registrant, uint256 index) external returns (address); + function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); + function isRegistered(address addr) external returns (bool); + function codeHashOf(address addr) external returns (bytes32); +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/project:/contracts/opensea/OperatorFilterer.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/project:/contracts/opensea/OperatorFilterer.sol new file mode 100644 index 0000000000..9b28c41acb --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/project:/contracts/opensea/OperatorFilterer.sol @@ -0,0 +1,60 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.13; + +import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; + +/** + * @title OperatorFilterer + * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another + * registrant's entries in the OperatorFilterRegistry. + * @dev This smart contract is meant to be inherited by token contracts so they can use the following: + * - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods. + * - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods. + */ +abstract contract OperatorFilterer { + error OperatorNotAllowed(address operator); + + IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY = + IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E); + + constructor(address subscriptionOrRegistrantToCopy, bool subscribe) { + // If an inheriting token contract is deployed to a network without the registry deployed, the modifier + // will not revert, but the contract will need to be registered with the registry once it is deployed in + // order for the modifier to filter addresses. + if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { + if (subscribe) { + OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); + } else { + if (subscriptionOrRegistrantToCopy != address(0)) { + OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); + } else { + OPERATOR_FILTER_REGISTRY.register(address(this)); + } + } + } + } + + modifier onlyAllowedOperator(address from) virtual { + // Allow spending tokens from addresses with balance + // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred + // from an EOA. + if (from != msg.sender) { + _checkFilterOperator(msg.sender); + } + _; + } + + modifier onlyAllowedOperatorApproval(address operator) virtual { + _checkFilterOperator(operator); + _; + } + + function _checkFilterOperator(address operator) internal view virtual { + // Check registry code length to facilitate testing in environments without a deployed registry. + if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { + if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) { + revert OperatorNotAllowed(operator); + } + } + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/refer2earn/Referable.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/refer2earn/Referable.sol new file mode 100644 index 0000000000..df807b0ac3 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01665987bC6725070e56d160d75AA19d8B73273e/sources/refer2earn/Referable.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.9; + +abstract contract IReferable { + function getCommission( + address _contract, + address _recipient, + address _referrer, + uint256 _value + ) + public + view + virtual + returns (uint256, uint256); + function payReferral( + address _recipient, + address payable _referrer, + uint256 _quantity, + uint256 _value + ) public virtual payable; +} + +contract Referable { + + address public r2eAddress; + + constructor(address _r2eAddress) { + r2eAddress = _r2eAddress; + } + + function payReferral(address _recipient, address payable _referrer, uint256 _quantity, uint256 _value) internal { + (uint256 _commission, uint256 _fee) = IReferable(r2eAddress).getCommission(address(this), _recipient, _referrer, _value); + if (_commission > 0 && _fee > 0) IReferable(r2eAddress).payReferral{value: _commission + _fee}(_recipient, _referrer, _quantity, _value); + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/constructor-args.txt b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/constructor-args.txt new file mode 100644 index 0000000000..3ae81f02a5 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/constructor-args.txt @@ -0,0 +1 @@ +0x0000000000000000000000003e3349e43e5eeaaedc5dc2cf7e022919a6751907000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000164261726e4272696467652063555344542073424f4e4400000000000000000000000000000000000000000000000000000000000000000000000000000000000e62625f73424f4e445f6355534454000000000000000000000000000000000000 \ No newline at end of file diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/creator-tx-hash.txt b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/creator-tx-hash.txt new file mode 100644 index 0000000000..99f1e1c648 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/creator-tx-hash.txt @@ -0,0 +1 @@ +0x775b96c9118033921904f7c4fdff910d6cc1be08b70befae4b786e36d95de039 \ No newline at end of file diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/metadata.json b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/metadata.json new file mode 100644 index 0000000000..77a86862c8 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/metadata.json @@ -0,0 +1 @@ +{"compiler":{"version":"0.7.6+commit.7338295f"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"smartYield_","type":"address"},{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"tokenId_","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"smartYield","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"}],"devdoc":{"kind":"dev","methods":{"approve(address,uint256)":{"details":"See {IERC721-approve}."},"balanceOf(address)":{"details":"See {IERC721-balanceOf}."},"baseURI()":{"details":"Returns the base URI set via {_setBaseURI}. This will be automatically added as a prefix in {tokenURI} to each token's URI, or to the token ID if no specific URI is set for that token ID."},"getApproved(uint256)":{"details":"See {IERC721-getApproved}."},"isApprovedForAll(address,address)":{"details":"See {IERC721-isApprovedForAll}."},"name()":{"details":"See {IERC721Metadata-name}."},"ownerOf(uint256)":{"details":"See {IERC721-ownerOf}."},"safeTransferFrom(address,address,uint256)":{"details":"See {IERC721-safeTransferFrom}."},"safeTransferFrom(address,address,uint256,bytes)":{"details":"See {IERC721-safeTransferFrom}."},"setApprovalForAll(address,bool)":{"details":"See {IERC721-setApprovalForAll}."},"supportsInterface(bytes4)":{"details":"See {IERC165-supportsInterface}. Time complexity O(1), guaranteed to always use less than 30 000 gas."},"symbol()":{"details":"See {IERC721Metadata-symbol}."},"tokenByIndex(uint256)":{"details":"See {IERC721Enumerable-tokenByIndex}."},"tokenOfOwnerByIndex(address,uint256)":{"details":"See {IERC721Enumerable-tokenOfOwnerByIndex}."},"tokenURI(uint256)":{"details":"See {IERC721Metadata-tokenURI}."},"totalSupply()":{"details":"See {IERC721Enumerable-totalSupply}."},"transferFrom(address,address,uint256)":{"details":"See {IERC721-transferFrom}."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"compilationTarget":{"contracts/SeniorBond.sol":"SeniorBond"},"evmVersion":"istanbul","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":true,"runs":9999},"remappings":[]},"sources":{"@openzeppelin/contracts/introspection/ERC165.sol":{"keccak256":"0x24141d2f6b98d4cb77a8936eae8cbaad2e261d9062bdc08036096f4550092501","license":"MIT","urls":["bzz-raw://b710eb003944777135f027500a5a57b479fe857849f5f467c1ef9687401e3c95","dweb:/ipfs/QmcELzi6KRzAs3DXwxdsoKWRJ13KSeipKQsJgD3unctdZM"]},"@openzeppelin/contracts/introspection/IERC165.sol":{"keccak256":"0xf70bc25d981e4ec9673a995ad2995d5d493ea188d3d8f388bba9c227ce09fb82","license":"MIT","urls":["bzz-raw://bd970f51e3a77790c2f02b5b1759827c3b897c3d98c407b3631e8af32e3dc93c","dweb:/ipfs/QmPF85Amgbqjk3SNZKsPCsqCw8JfwYEPMnnhvMJUyX58je"]},"@openzeppelin/contracts/math/SafeMath.sol":{"keccak256":"0xcc78a17dd88fa5a2edc60c8489e2f405c0913b377216a5b26b35656b2d0dab52","license":"MIT","urls":["bzz-raw://526dc85e1f9b9b45830e202568d267d93dde7a4fcccf4ad7798dadcd92304d3c","dweb:/ipfs/QmaoXMB972J3cSDLtBq3xBo4jLwqD2uzXTwujtSPqkYVhR"]},"@openzeppelin/contracts/token/ERC721/ERC721.sol":{"keccak256":"0x118ed7540f56b21ff92e21ebaa73584048e98d2ac04ca67571329bb8dbd9032f","license":"MIT","urls":["bzz-raw://da2918b7aff73dd51d41bfcfa548f81eb50531b8353500fdbdacf297076db070","dweb:/ipfs/Qmb8ixAs1vBjZRowQNuNg6bRf2NZmgZ1JTBxmQS14PHpcL"]},"@openzeppelin/contracts/token/ERC721/IERC721.sol":{"keccak256":"0x2d99a0deb6648c34fbc66d6ac4a2d64798d7a5321b45624f6736fadc63da1962","license":"MIT","urls":["bzz-raw://2dcdce5ede1e5e650d174ec0b35be7d47b6a50f30bc895ef0d9e59fb75052e45","dweb:/ipfs/QmQ2XFsDLTYqfEdw7pYzHiGtFRY11yQm4b6ynYgKqDxeB8"]},"@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol":{"keccak256":"0xe6bd1b1218338b6f9fe17776f48623b4ac3d8a40405f74a44bc23c00abe2ca13","license":"MIT","urls":["bzz-raw://0c354c3f6e9c487759aa7869be4fba68e0b2efc777b514d289c4cbd3ff8f7e1a","dweb:/ipfs/QmdF9LcSYVmiUCL7JxLEYmSLrjga6zJsujfi6sgEJD4M1z"]},"@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol":{"keccak256":"0xccb917776f826ac6b68bd5a15a5f711e3967848a52ba11e6104d9a4f593314a7","license":"MIT","urls":["bzz-raw://430255ad2229ced6d880e61a67bdc6e48dbbaed8354a7c1fe918cd8b8714a886","dweb:/ipfs/QmTHY56odzqEpEC6v6tafaWMYY7vmULw25q5XHJLCCAeox"]},"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol":{"keccak256":"0x52146049d6709c870e8ddcd988b5155cb6c5d640cfcd8978aee52bc1ba2ec4eb","license":"MIT","urls":["bzz-raw://ada84513617b7c1b2f890b44503735abaec73a1acd030112a17aac7e6c66a4a1","dweb:/ipfs/QmaiFwdio67iJrfjAdkMac24eJ5sS1qD7CZW6PhUU6KjiK"]},"@openzeppelin/contracts/utils/Address.sol":{"keccak256":"0x28911e614500ae7c607a432a709d35da25f3bc5ddc8bd12b278b66358070c0ea","license":"MIT","urls":["bzz-raw://256c8c8af5eb072bc473226ab2b2187149b8fc04f5f4a4820db22527f5ce8e3c","dweb:/ipfs/QmRvi5BhnL7Rxf85KrJhwM6RRhukm4tzoctRdgQEheNyiN"]},"@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x8d3cb350f04ff49cfb10aef08d87f19dcbaecc8027b0bed12f3275cd12f38cf0","license":"MIT","urls":["bzz-raw://ded47ec7c96750f9bd04bbbc84f659992d4ba901cb7b532a52cd468272cf378f","dweb:/ipfs/QmfBrGtQP7rZEqEg6Wz6jh2N2Kukpj1z5v3CGWmAqrzm96"]},"@openzeppelin/contracts/utils/EnumerableMap.sol":{"keccak256":"0x4b087f06b6670a131a5a14e53b1d2a5ef19c034cc5ec42eeebcf9554325744ad","license":"MIT","urls":["bzz-raw://f6a6af5d848334e40db419773f6360601e311ffc21c2e274f730b8c542da99fd","dweb:/ipfs/QmfA24cxQ2g41ZWUuDF295dxDJ4xF1bSDYtC3EaLd7CzW8"]},"@openzeppelin/contracts/utils/EnumerableSet.sol":{"keccak256":"0x1562cd9922fbf739edfb979f506809e2743789cbde3177515542161c3d04b164","license":"MIT","urls":["bzz-raw://4580d57781513d98870d9738c7d39094336e0a70cdb90d68dad549c6ced466ec","dweb:/ipfs/Qmf9YZzzRFuvMnav9dgmeRUpdYMMECiZX8w25sHWVbA18V"]},"@openzeppelin/contracts/utils/Strings.sol":{"keccak256":"0xa1e12f97981f1d0964b1c048978606a57127c56c438bab61cdfe269cad859a74","license":"MIT","urls":["bzz-raw://5eefac1760f524971e14aa3f3d79515a3d54fd28c1d3bdca0b36127da349b830","dweb:/ipfs/QmUMzkyH3ytJX5gVPizQruNLhkKmuJb3nFqBDad4LPdg5U"]},"contracts/IBond.sol":{"keccak256":"0xf1e6556d19877f964cbc494cc9f11505e95ef46fb3c369c72a5fe7caa933b013","license":"Apache-2.0","urls":["bzz-raw://81d2b21db0e75497046b9f7bbe87fa114f76314c6aaee2c827341f65ec7cd001","dweb:/ipfs/QmPWaaSh73jzRn1hgDu1yskBTb5WXFdWhUysPDeVQqNpYV"]},"contracts/SeniorBond.sol":{"keccak256":"0xa47a8e9c8d5dfc530a49f316929d6f4f9088a2327b26a7d536b9e66dc1f7a1b1","license":"Apache-2.0","urls":["bzz-raw://04b842f86042a2ef51ff0173cdbaf598818afd92fe779d68acfa1dd45a43a04f","dweb:/ipfs/QmdMJXAcrFu8gWHFatqRpsjMXa2WBfHj9YPPyb3u96fs6t"]}},"version":1} \ No newline at end of file diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/introspection/ERC165.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/introspection/ERC165.sol new file mode 100644 index 0000000000..81ab7e5252 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/introspection/ERC165.sol @@ -0,0 +1,54 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +import "./IERC165.sol"; + +/** + * @dev Implementation of the {IERC165} interface. + * + * Contracts may inherit from this and call {_registerInterface} to declare + * their support of an interface. + */ +abstract contract ERC165 is IERC165 { + /* + * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7 + */ + bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7; + + /** + * @dev Mapping of interface ids to whether or not it's supported. + */ + mapping(bytes4 => bool) private _supportedInterfaces; + + constructor () internal { + // Derived contracts need only register support for their own interfaces, + // we register support for ERC165 itself here + _registerInterface(_INTERFACE_ID_ERC165); + } + + /** + * @dev See {IERC165-supportsInterface}. + * + * Time complexity O(1), guaranteed to always use less than 30 000 gas. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { + return _supportedInterfaces[interfaceId]; + } + + /** + * @dev Registers the contract as an implementer of the interface defined by + * `interfaceId`. Support of the actual ERC165 interface is automatic and + * registering its interface id is not required. + * + * See {IERC165-supportsInterface}. + * + * Requirements: + * + * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`). + */ + function _registerInterface(bytes4 interfaceId) internal virtual { + require(interfaceId != 0xffffffff, "ERC165: invalid interface id"); + _supportedInterfaces[interfaceId] = true; + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/introspection/IERC165.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/introspection/IERC165.sol new file mode 100644 index 0000000000..d474355258 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/introspection/IERC165.sol @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev Interface of the ERC165 standard, as defined in the + * https://eips.ethereum.org/EIPS/eip-165[EIP]. + * + * Implementers can declare support of contract interfaces, which can then be + * queried by others ({ERC165Checker}). + * + * For an implementation, see {ERC165}. + */ +interface IERC165 { + /** + * @dev Returns true if this contract implements the interface defined by + * `interfaceId`. See the corresponding + * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] + * to learn more about how these ids are created. + * + * This function call must use less than 30 000 gas. + */ + function supportsInterface(bytes4 interfaceId) external view returns (bool); +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/math/SafeMath.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/math/SafeMath.sol new file mode 100644 index 0000000000..3e81f295b2 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/math/SafeMath.sol @@ -0,0 +1,214 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev Wrappers over Solidity's arithmetic operations with added overflow + * checks. + * + * Arithmetic operations in Solidity wrap on overflow. This can easily result + * in bugs, because programmers usually assume that an overflow raises an + * error, which is the standard behavior in high level programming languages. + * `SafeMath` restores this intuition by reverting the transaction when an + * operation overflows. + * + * Using this library instead of the unchecked operations eliminates an entire + * class of bugs, so it's recommended to use it always. + */ +library SafeMath { + /** + * @dev Returns the addition of two unsigned integers, with an overflow flag. + * + * _Available since v3.4._ + */ + function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { + uint256 c = a + b; + if (c < a) return (false, 0); + return (true, c); + } + + /** + * @dev Returns the substraction of two unsigned integers, with an overflow flag. + * + * _Available since v3.4._ + */ + function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { + if (b > a) return (false, 0); + return (true, a - b); + } + + /** + * @dev Returns the multiplication of two unsigned integers, with an overflow flag. + * + * _Available since v3.4._ + */ + function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { + // Gas optimization: this is cheaper than requiring 'a' not being zero, but the + // benefit is lost if 'b' is also tested. + // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 + if (a == 0) return (true, 0); + uint256 c = a * b; + if (c / a != b) return (false, 0); + return (true, c); + } + + /** + * @dev Returns the division of two unsigned integers, with a division by zero flag. + * + * _Available since v3.4._ + */ + function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { + if (b == 0) return (false, 0); + return (true, a / b); + } + + /** + * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. + * + * _Available since v3.4._ + */ + function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { + if (b == 0) return (false, 0); + return (true, a % b); + } + + /** + * @dev Returns the addition of two unsigned integers, reverting on + * overflow. + * + * Counterpart to Solidity's `+` operator. + * + * Requirements: + * + * - Addition cannot overflow. + */ + function add(uint256 a, uint256 b) internal pure returns (uint256) { + uint256 c = a + b; + require(c >= a, "SafeMath: addition overflow"); + return c; + } + + /** + * @dev Returns the subtraction of two unsigned integers, reverting on + * overflow (when the result is negative). + * + * Counterpart to Solidity's `-` operator. + * + * Requirements: + * + * - Subtraction cannot overflow. + */ + function sub(uint256 a, uint256 b) internal pure returns (uint256) { + require(b <= a, "SafeMath: subtraction overflow"); + return a - b; + } + + /** + * @dev Returns the multiplication of two unsigned integers, reverting on + * overflow. + * + * Counterpart to Solidity's `*` operator. + * + * Requirements: + * + * - Multiplication cannot overflow. + */ + function mul(uint256 a, uint256 b) internal pure returns (uint256) { + if (a == 0) return 0; + uint256 c = a * b; + require(c / a == b, "SafeMath: multiplication overflow"); + return c; + } + + /** + * @dev Returns the integer division of two unsigned integers, reverting on + * division by zero. The result is rounded towards zero. + * + * Counterpart to Solidity's `/` operator. Note: this function uses a + * `revert` opcode (which leaves remaining gas untouched) while Solidity + * uses an invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * + * - The divisor cannot be zero. + */ + function div(uint256 a, uint256 b) internal pure returns (uint256) { + require(b > 0, "SafeMath: division by zero"); + return a / b; + } + + /** + * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), + * reverting when dividing by zero. + * + * Counterpart to Solidity's `%` operator. This function uses a `revert` + * opcode (which leaves remaining gas untouched) while Solidity uses an + * invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * + * - The divisor cannot be zero. + */ + function mod(uint256 a, uint256 b) internal pure returns (uint256) { + require(b > 0, "SafeMath: modulo by zero"); + return a % b; + } + + /** + * @dev Returns the subtraction of two unsigned integers, reverting with custom message on + * overflow (when the result is negative). + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {trySub}. + * + * Counterpart to Solidity's `-` operator. + * + * Requirements: + * + * - Subtraction cannot overflow. + */ + function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { + require(b <= a, errorMessage); + return a - b; + } + + /** + * @dev Returns the integer division of two unsigned integers, reverting with custom message on + * division by zero. The result is rounded towards zero. + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {tryDiv}. + * + * Counterpart to Solidity's `/` operator. Note: this function uses a + * `revert` opcode (which leaves remaining gas untouched) while Solidity + * uses an invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * + * - The divisor cannot be zero. + */ + function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { + require(b > 0, errorMessage); + return a / b; + } + + /** + * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), + * reverting with custom message when dividing by zero. + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {tryMod}. + * + * Counterpart to Solidity's `%` operator. This function uses a `revert` + * opcode (which leaves remaining gas untouched) while Solidity uses an + * invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * + * - The divisor cannot be zero. + */ + function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { + require(b > 0, errorMessage); + return a % b; + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/token/ERC721/ERC721.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/token/ERC721/ERC721.sol new file mode 100644 index 0000000000..7958fdf858 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/token/ERC721/ERC721.sol @@ -0,0 +1,478 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +import "../../utils/Context.sol"; +import "./IERC721.sol"; +import "./IERC721Metadata.sol"; +import "./IERC721Enumerable.sol"; +import "./IERC721Receiver.sol"; +import "../../introspection/ERC165.sol"; +import "../../math/SafeMath.sol"; +import "../../utils/Address.sol"; +import "../../utils/EnumerableSet.sol"; +import "../../utils/EnumerableMap.sol"; +import "../../utils/Strings.sol"; + +/** + * @title ERC721 Non-Fungible Token Standard basic implementation + * @dev see https://eips.ethereum.org/EIPS/eip-721 + */ +contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { + using SafeMath for uint256; + using Address for address; + using EnumerableSet for EnumerableSet.UintSet; + using EnumerableMap for EnumerableMap.UintToAddressMap; + using Strings for uint256; + + // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` + // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` + bytes4 private constant _ERC721_RECEIVED = 0x150b7a02; + + // Mapping from holder address to their (enumerable) set of owned tokens + mapping (address => EnumerableSet.UintSet) private _holderTokens; + + // Enumerable mapping from token ids to their owners + EnumerableMap.UintToAddressMap private _tokenOwners; + + // Mapping from token ID to approved address + mapping (uint256 => address) private _tokenApprovals; + + // Mapping from owner to operator approvals + mapping (address => mapping (address => bool)) private _operatorApprovals; + + // Token name + string private _name; + + // Token symbol + string private _symbol; + + // Optional mapping for token URIs + mapping (uint256 => string) private _tokenURIs; + + // Base URI + string private _baseURI; + + /* + * bytes4(keccak256('balanceOf(address)')) == 0x70a08231 + * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e + * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3 + * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc + * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465 + * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5 + * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd + * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e + * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde + * + * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^ + * 0xa22cb465 ^ 0xe985e9c5 ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd + */ + bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd; + + /* + * bytes4(keccak256('name()')) == 0x06fdde03 + * bytes4(keccak256('symbol()')) == 0x95d89b41 + * bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd + * + * => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f + */ + bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f; + + /* + * bytes4(keccak256('totalSupply()')) == 0x18160ddd + * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59 + * bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7 + * + * => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63 + */ + bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63; + + /** + * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. + */ + constructor (string memory name_, string memory symbol_) public { + _name = name_; + _symbol = symbol_; + + // register the supported interfaces to conform to ERC721 via ERC165 + _registerInterface(_INTERFACE_ID_ERC721); + _registerInterface(_INTERFACE_ID_ERC721_METADATA); + _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE); + } + + /** + * @dev See {IERC721-balanceOf}. + */ + function balanceOf(address owner) public view virtual override returns (uint256) { + require(owner != address(0), "ERC721: balance query for the zero address"); + return _holderTokens[owner].length(); + } + + /** + * @dev See {IERC721-ownerOf}. + */ + function ownerOf(uint256 tokenId) public view virtual override returns (address) { + return _tokenOwners.get(tokenId, "ERC721: owner query for nonexistent token"); + } + + /** + * @dev See {IERC721Metadata-name}. + */ + function name() public view virtual override returns (string memory) { + return _name; + } + + /** + * @dev See {IERC721Metadata-symbol}. + */ + function symbol() public view virtual override returns (string memory) { + return _symbol; + } + + /** + * @dev See {IERC721Metadata-tokenURI}. + */ + function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { + require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); + + string memory _tokenURI = _tokenURIs[tokenId]; + string memory base = baseURI(); + + // If there is no base URI, return the token URI. + if (bytes(base).length == 0) { + return _tokenURI; + } + // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked). + if (bytes(_tokenURI).length > 0) { + return string(abi.encodePacked(base, _tokenURI)); + } + // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI. + return string(abi.encodePacked(base, tokenId.toString())); + } + + /** + * @dev Returns the base URI set via {_setBaseURI}. This will be + * automatically added as a prefix in {tokenURI} to each token's URI, or + * to the token ID if no specific URI is set for that token ID. + */ + function baseURI() public view virtual returns (string memory) { + return _baseURI; + } + + /** + * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. + */ + function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { + return _holderTokens[owner].at(index); + } + + /** + * @dev See {IERC721Enumerable-totalSupply}. + */ + function totalSupply() public view virtual override returns (uint256) { + // _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds + return _tokenOwners.length(); + } + + /** + * @dev See {IERC721Enumerable-tokenByIndex}. + */ + function tokenByIndex(uint256 index) public view virtual override returns (uint256) { + (uint256 tokenId, ) = _tokenOwners.at(index); + return tokenId; + } + + /** + * @dev See {IERC721-approve}. + */ + function approve(address to, uint256 tokenId) public virtual override { + address owner = ERC721.ownerOf(tokenId); + require(to != owner, "ERC721: approval to current owner"); + + require(_msgSender() == owner || ERC721.isApprovedForAll(owner, _msgSender()), + "ERC721: approve caller is not owner nor approved for all" + ); + + _approve(to, tokenId); + } + + /** + * @dev See {IERC721-getApproved}. + */ + function getApproved(uint256 tokenId) public view virtual override returns (address) { + require(_exists(tokenId), "ERC721: approved query for nonexistent token"); + + return _tokenApprovals[tokenId]; + } + + /** + * @dev See {IERC721-setApprovalForAll}. + */ + function setApprovalForAll(address operator, bool approved) public virtual override { + require(operator != _msgSender(), "ERC721: approve to caller"); + + _operatorApprovals[_msgSender()][operator] = approved; + emit ApprovalForAll(_msgSender(), operator, approved); + } + + /** + * @dev See {IERC721-isApprovedForAll}. + */ + function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { + return _operatorApprovals[owner][operator]; + } + + /** + * @dev See {IERC721-transferFrom}. + */ + function transferFrom(address from, address to, uint256 tokenId) public virtual override { + //solhint-disable-next-line max-line-length + require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); + + _transfer(from, to, tokenId); + } + + /** + * @dev See {IERC721-safeTransferFrom}. + */ + function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override { + safeTransferFrom(from, to, tokenId, ""); + } + + /** + * @dev See {IERC721-safeTransferFrom}. + */ + function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override { + require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); + _safeTransfer(from, to, tokenId, _data); + } + + /** + * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients + * are aware of the ERC721 protocol to prevent tokens from being forever locked. + * + * `_data` is additional data, it has no specified format and it is sent in call to `to`. + * + * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. + * implement alternative mechanisms to perform token transfer, such as signature-based. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must exist and be owned by `from`. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal virtual { + _transfer(from, to, tokenId); + require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); + } + + /** + * @dev Returns whether `tokenId` exists. + * + * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. + * + * Tokens start existing when they are minted (`_mint`), + * and stop existing when they are burned (`_burn`). + */ + function _exists(uint256 tokenId) internal view virtual returns (bool) { + return _tokenOwners.contains(tokenId); + } + + /** + * @dev Returns whether `spender` is allowed to manage `tokenId`. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { + require(_exists(tokenId), "ERC721: operator query for nonexistent token"); + address owner = ERC721.ownerOf(tokenId); + return (spender == owner || getApproved(tokenId) == spender || ERC721.isApprovedForAll(owner, spender)); + } + + /** + * @dev Safely mints `tokenId` and transfers it to `to`. + * + * Requirements: + d* + * - `tokenId` must not exist. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function _safeMint(address to, uint256 tokenId) internal virtual { + _safeMint(to, tokenId, ""); + } + + /** + * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is + * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. + */ + function _safeMint(address to, uint256 tokenId, bytes memory _data) internal virtual { + _mint(to, tokenId); + require(_checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); + } + + /** + * @dev Mints `tokenId` and transfers it to `to`. + * + * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible + * + * Requirements: + * + * - `tokenId` must not exist. + * - `to` cannot be the zero address. + * + * Emits a {Transfer} event. + */ + function _mint(address to, uint256 tokenId) internal virtual { + require(to != address(0), "ERC721: mint to the zero address"); + require(!_exists(tokenId), "ERC721: token already minted"); + + _beforeTokenTransfer(address(0), to, tokenId); + + _holderTokens[to].add(tokenId); + + _tokenOwners.set(tokenId, to); + + emit Transfer(address(0), to, tokenId); + } + + /** + * @dev Destroys `tokenId`. + * The approval is cleared when the token is burned. + * + * Requirements: + * + * - `tokenId` must exist. + * + * Emits a {Transfer} event. + */ + function _burn(uint256 tokenId) internal virtual { + address owner = ERC721.ownerOf(tokenId); // internal owner + + _beforeTokenTransfer(owner, address(0), tokenId); + + // Clear approvals + _approve(address(0), tokenId); + + // Clear metadata (if any) + if (bytes(_tokenURIs[tokenId]).length != 0) { + delete _tokenURIs[tokenId]; + } + + _holderTokens[owner].remove(tokenId); + + _tokenOwners.remove(tokenId); + + emit Transfer(owner, address(0), tokenId); + } + + /** + * @dev Transfers `tokenId` from `from` to `to`. + * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. + * + * Requirements: + * + * - `to` cannot be the zero address. + * - `tokenId` token must be owned by `from`. + * + * Emits a {Transfer} event. + */ + function _transfer(address from, address to, uint256 tokenId) internal virtual { + require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); // internal owner + require(to != address(0), "ERC721: transfer to the zero address"); + + _beforeTokenTransfer(from, to, tokenId); + + // Clear approvals from the previous owner + _approve(address(0), tokenId); + + _holderTokens[from].remove(tokenId); + _holderTokens[to].add(tokenId); + + _tokenOwners.set(tokenId, to); + + emit Transfer(from, to, tokenId); + } + + /** + * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { + require(_exists(tokenId), "ERC721Metadata: URI set of nonexistent token"); + _tokenURIs[tokenId] = _tokenURI; + } + + /** + * @dev Internal function to set the base URI for all token IDs. It is + * automatically added as a prefix to the value returned in {tokenURI}, + * or to the token ID if {tokenURI} is empty. + */ + function _setBaseURI(string memory baseURI_) internal virtual { + _baseURI = baseURI_; + } + + /** + * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. + * The call is not executed if the target address is not a contract. + * + * @param from address representing the previous owner of the given token ID + * @param to target address that will receive the tokens + * @param tokenId uint256 ID of the token to be transferred + * @param _data bytes optional data to send along with the call + * @return bool whether the call correctly returned the expected magic value + */ + function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data) + private returns (bool) + { + if (!to.isContract()) { + return true; + } + bytes memory returndata = to.functionCall(abi.encodeWithSelector( + IERC721Receiver(to).onERC721Received.selector, + _msgSender(), + from, + tokenId, + _data + ), "ERC721: transfer to non ERC721Receiver implementer"); + bytes4 retval = abi.decode(returndata, (bytes4)); + return (retval == _ERC721_RECEIVED); + } + + /** + * @dev Approve `to` to operate on `tokenId` + * + * Emits an {Approval} event. + */ + function _approve(address to, uint256 tokenId) internal virtual { + _tokenApprovals[tokenId] = to; + emit Approval(ERC721.ownerOf(tokenId), to, tokenId); // internal owner + } + + /** + * @dev Hook that is called before any token transfer. This includes minting + * and burning. + * + * Calling conditions: + * + * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be + * transferred to `to`. + * - When `from` is zero, `tokenId` will be minted for `to`. + * - When `to` is zero, ``from``'s `tokenId` will be burned. + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * + * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. + */ + function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual { } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/token/ERC721/IERC721.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/token/ERC721/IERC721.sol new file mode 100644 index 0000000000..787afde6f8 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/token/ERC721/IERC721.sol @@ -0,0 +1,129 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.2 <0.8.0; + +import "../../introspection/IERC165.sol"; + +/** + * @dev Required interface of an ERC721 compliant contract. + */ +interface IERC721 is IERC165 { + /** + * @dev Emitted when `tokenId` token is transferred from `from` to `to`. + */ + event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); + + /** + * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. + */ + event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); + + /** + * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. + */ + event ApprovalForAll(address indexed owner, address indexed operator, bool approved); + + /** + * @dev Returns the number of tokens in ``owner``'s account. + */ + function balanceOf(address owner) external view returns (uint256 balance); + + /** + * @dev Returns the owner of the `tokenId` token. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function ownerOf(uint256 tokenId) external view returns (address owner); + + /** + * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients + * are aware of the ERC721 protocol to prevent tokens from being forever locked. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must exist and be owned by `from`. + * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function safeTransferFrom(address from, address to, uint256 tokenId) external; + + /** + * @dev Transfers `tokenId` token from `from` to `to`. + * + * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must be owned by `from`. + * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. + * + * Emits a {Transfer} event. + */ + function transferFrom(address from, address to, uint256 tokenId) external; + + /** + * @dev Gives permission to `to` to transfer `tokenId` token to another account. + * The approval is cleared when the token is transferred. + * + * Only a single account can be approved at a time, so approving the zero address clears previous approvals. + * + * Requirements: + * + * - The caller must own the token or be an approved operator. + * - `tokenId` must exist. + * + * Emits an {Approval} event. + */ + function approve(address to, uint256 tokenId) external; + + /** + * @dev Returns the account approved for `tokenId` token. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function getApproved(uint256 tokenId) external view returns (address operator); + + /** + * @dev Approve or remove `operator` as an operator for the caller. + * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. + * + * Requirements: + * + * - The `operator` cannot be the caller. + * + * Emits an {ApprovalForAll} event. + */ + function setApprovalForAll(address operator, bool _approved) external; + + /** + * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. + * + * See {setApprovalForAll} + */ + function isApprovedForAll(address owner, address operator) external view returns (bool); + + /** + * @dev Safely transfers `tokenId` token from `from` to `to`. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must exist and be owned by `from`. + * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol new file mode 100644 index 0000000000..cd08125fb5 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.2 <0.8.0; + +import "./IERC721.sol"; + +/** + * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension + * @dev See https://eips.ethereum.org/EIPS/eip-721 + */ +interface IERC721Enumerable is IERC721 { + + /** + * @dev Returns the total amount of tokens stored by the contract. + */ + function totalSupply() external view returns (uint256); + + /** + * @dev Returns a token ID owned by `owner` at a given `index` of its token list. + * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. + */ + function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); + + /** + * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. + * Use along with {totalSupply} to enumerate all tokens. + */ + function tokenByIndex(uint256 index) external view returns (uint256); +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol new file mode 100644 index 0000000000..9a64c87c21 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.2 <0.8.0; + +import "./IERC721.sol"; + +/** + * @title ERC-721 Non-Fungible Token Standard, optional metadata extension + * @dev See https://eips.ethereum.org/EIPS/eip-721 + */ +interface IERC721Metadata is IERC721 { + + /** + * @dev Returns the token collection name. + */ + function name() external view returns (string memory); + + /** + * @dev Returns the token collection symbol. + */ + function symbol() external view returns (string memory); + + /** + * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. + */ + function tokenURI(uint256 tokenId) external view returns (string memory); +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol new file mode 100644 index 0000000000..85fd1e4826 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @title ERC721 token receiver interface + * @dev Interface for any contract that wants to support safeTransfers + * from ERC721 asset contracts. + */ +interface IERC721Receiver { + /** + * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} + * by `operator` from `from`, this function is called. + * + * It must return its Solidity selector to confirm the token transfer. + * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. + * + * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. + */ + function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4); +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/utils/Address.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/utils/Address.sol new file mode 100644 index 0000000000..42a9dc1ebe --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/utils/Address.sol @@ -0,0 +1,189 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.2 <0.8.0; + +/** + * @dev Collection of functions related to the address type + */ +library Address { + /** + * @dev Returns true if `account` is a contract. + * + * [IMPORTANT] + * ==== + * It is unsafe to assume that an address for which this function returns + * false is an externally-owned account (EOA) and not a contract. + * + * Among others, `isContract` will return false for the following + * types of addresses: + * + * - an externally-owned account + * - a contract in construction + * - an address where a contract will be created + * - an address where a contract lived, but was destroyed + * ==== + */ + function isContract(address account) internal view returns (bool) { + // This method relies on extcodesize, which returns 0 for contracts in + // construction, since the code is only stored at the end of the + // constructor execution. + + uint256 size; + // solhint-disable-next-line no-inline-assembly + assembly { size := extcodesize(account) } + return size > 0; + } + + /** + * @dev Replacement for Solidity's `transfer`: sends `amount` wei to + * `recipient`, forwarding all available gas and reverting on errors. + * + * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost + * of certain opcodes, possibly making contracts go over the 2300 gas limit + * imposed by `transfer`, making them unable to receive funds via + * `transfer`. {sendValue} removes this limitation. + * + * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. + * + * IMPORTANT: because control is transferred to `recipient`, care must be + * taken to not create reentrancy vulnerabilities. Consider using + * {ReentrancyGuard} or the + * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. + */ + function sendValue(address payable recipient, uint256 amount) internal { + require(address(this).balance >= amount, "Address: insufficient balance"); + + // solhint-disable-next-line avoid-low-level-calls, avoid-call-value + (bool success, ) = recipient.call{ value: amount }(""); + require(success, "Address: unable to send value, recipient may have reverted"); + } + + /** + * @dev Performs a Solidity function call using a low level `call`. A + * plain`call` is an unsafe replacement for a function call: use this + * function instead. + * + * If `target` reverts with a revert reason, it is bubbled up by this + * function (like regular Solidity function calls). + * + * Returns the raw returned data. To convert to the expected return value, + * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. + * + * Requirements: + * + * - `target` must be a contract. + * - calling `target` with `data` must not revert. + * + * _Available since v3.1._ + */ + function functionCall(address target, bytes memory data) internal returns (bytes memory) { + return functionCall(target, data, "Address: low-level call failed"); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with + * `errorMessage` as a fallback revert reason when `target` reverts. + * + * _Available since v3.1._ + */ + function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { + return functionCallWithValue(target, data, 0, errorMessage); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but also transferring `value` wei to `target`. + * + * Requirements: + * + * - the calling contract must have an ETH balance of at least `value`. + * - the called Solidity function must be `payable`. + * + * _Available since v3.1._ + */ + function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { + return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); + } + + /** + * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but + * with `errorMessage` as a fallback revert reason when `target` reverts. + * + * _Available since v3.1._ + */ + function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { + require(address(this).balance >= value, "Address: insufficient balance for call"); + require(isContract(target), "Address: call to non-contract"); + + // solhint-disable-next-line avoid-low-level-calls + (bool success, bytes memory returndata) = target.call{ value: value }(data); + return _verifyCallResult(success, returndata, errorMessage); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but performing a static call. + * + * _Available since v3.3._ + */ + function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { + return functionStaticCall(target, data, "Address: low-level static call failed"); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], + * but performing a static call. + * + * _Available since v3.3._ + */ + function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { + require(isContract(target), "Address: static call to non-contract"); + + // solhint-disable-next-line avoid-low-level-calls + (bool success, bytes memory returndata) = target.staticcall(data); + return _verifyCallResult(success, returndata, errorMessage); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but performing a delegate call. + * + * _Available since v3.4._ + */ + function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { + return functionDelegateCall(target, data, "Address: low-level delegate call failed"); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], + * but performing a delegate call. + * + * _Available since v3.4._ + */ + function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { + require(isContract(target), "Address: delegate call to non-contract"); + + // solhint-disable-next-line avoid-low-level-calls + (bool success, bytes memory returndata) = target.delegatecall(data); + return _verifyCallResult(success, returndata, errorMessage); + } + + function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { + if (success) { + return returndata; + } else { + // Look for revert reason and bubble it up if present + if (returndata.length > 0) { + // The easiest way to bubble the revert reason is using memory via assembly + + // solhint-disable-next-line no-inline-assembly + assembly { + let returndata_size := mload(returndata) + revert(add(32, returndata), returndata_size) + } + } else { + revert(errorMessage); + } + } + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/utils/Context.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/utils/Context.sol new file mode 100644 index 0000000000..3d07c4aadb --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/utils/Context.sol @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/* + * @dev Provides information about the current execution context, including the + * sender of the transaction and its data. While these are generally available + * via msg.sender and msg.data, they should not be accessed in such a direct + * manner, since when dealing with GSN meta-transactions the account sending and + * paying for execution may not be the actual sender (as far as an application + * is concerned). + * + * This contract is only required for intermediate, library-like contracts. + */ +abstract contract Context { + function _msgSender() internal view virtual returns (address payable) { + return msg.sender; + } + + function _msgData() internal view virtual returns (bytes memory) { + this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 + return msg.data; + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/utils/EnumerableMap.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/utils/EnumerableMap.sol new file mode 100644 index 0000000000..a3e054cb14 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/utils/EnumerableMap.sol @@ -0,0 +1,266 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev Library for managing an enumerable variant of Solidity's + * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`] + * type. + * + * Maps have the following properties: + * + * - Entries are added, removed, and checked for existence in constant time + * (O(1)). + * - Entries are enumerated in O(n). No guarantees are made on the ordering. + * + * ``` + * contract Example { + * // Add the library methods + * using EnumerableMap for EnumerableMap.UintToAddressMap; + * + * // Declare a set state variable + * EnumerableMap.UintToAddressMap private myMap; + * } + * ``` + * + * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are + * supported. + */ +library EnumerableMap { + // To implement this library for multiple types with as little code + // repetition as possible, we write it in terms of a generic Map type with + // bytes32 keys and values. + // The Map implementation uses private functions, and user-facing + // implementations (such as Uint256ToAddressMap) are just wrappers around + // the underlying Map. + // This means that we can only create new EnumerableMaps for types that fit + // in bytes32. + + struct MapEntry { + bytes32 _key; + bytes32 _value; + } + + struct Map { + // Storage of map keys and values + MapEntry[] _entries; + + // Position of the entry defined by a key in the `entries` array, plus 1 + // because index 0 means a key is not in the map. + mapping (bytes32 => uint256) _indexes; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function _set(Map storage map, bytes32 key, bytes32 value) private returns (bool) { + // We read and store the key's index to prevent multiple reads from the same storage slot + uint256 keyIndex = map._indexes[key]; + + if (keyIndex == 0) { // Equivalent to !contains(map, key) + map._entries.push(MapEntry({ _key: key, _value: value })); + // The entry is stored at length-1, but we add 1 to all indexes + // and use 0 as a sentinel value + map._indexes[key] = map._entries.length; + return true; + } else { + map._entries[keyIndex - 1]._value = value; + return false; + } + } + + /** + * @dev Removes a key-value pair from a map. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function _remove(Map storage map, bytes32 key) private returns (bool) { + // We read and store the key's index to prevent multiple reads from the same storage slot + uint256 keyIndex = map._indexes[key]; + + if (keyIndex != 0) { // Equivalent to contains(map, key) + // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one + // in the array, and then remove the last entry (sometimes called as 'swap and pop'). + // This modifies the order of the array, as noted in {at}. + + uint256 toDeleteIndex = keyIndex - 1; + uint256 lastIndex = map._entries.length - 1; + + // When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs + // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. + + MapEntry storage lastEntry = map._entries[lastIndex]; + + // Move the last entry to the index where the entry to delete is + map._entries[toDeleteIndex] = lastEntry; + // Update the index for the moved entry + map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based + + // Delete the slot where the moved entry was stored + map._entries.pop(); + + // Delete the index for the deleted slot + delete map._indexes[key]; + + return true; + } else { + return false; + } + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function _contains(Map storage map, bytes32 key) private view returns (bool) { + return map._indexes[key] != 0; + } + + /** + * @dev Returns the number of key-value pairs in the map. O(1). + */ + function _length(Map storage map) private view returns (uint256) { + return map._entries.length; + } + + /** + * @dev Returns the key-value pair stored at position `index` in the map. O(1). + * + * Note that there are no guarantees on the ordering of entries inside the + * array, and it may change when more entries are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) { + require(map._entries.length > index, "EnumerableMap: index out of bounds"); + + MapEntry storage entry = map._entries[index]; + return (entry._key, entry._value); + } + + /** + * @dev Tries to returns the value associated with `key`. O(1). + * Does not revert if `key` is not in the map. + */ + function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) { + uint256 keyIndex = map._indexes[key]; + if (keyIndex == 0) return (false, 0); // Equivalent to contains(map, key) + return (true, map._entries[keyIndex - 1]._value); // All indexes are 1-based + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function _get(Map storage map, bytes32 key) private view returns (bytes32) { + uint256 keyIndex = map._indexes[key]; + require(keyIndex != 0, "EnumerableMap: nonexistent key"); // Equivalent to contains(map, key) + return map._entries[keyIndex - 1]._value; // All indexes are 1-based + } + + /** + * @dev Same as {_get}, with a custom error message when `key` is not in the map. + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {_tryGet}. + */ + function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) { + uint256 keyIndex = map._indexes[key]; + require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key) + return map._entries[keyIndex - 1]._value; // All indexes are 1-based + } + + // UintToAddressMap + + struct UintToAddressMap { + Map _inner; + } + + /** + * @dev Adds a key-value pair to a map, or updates the value for an existing + * key. O(1). + * + * Returns true if the key was added to the map, that is if it was not + * already present. + */ + function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) { + return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value)))); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the key was removed from the map, that is if it was present. + */ + function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) { + return _remove(map._inner, bytes32(key)); + } + + /** + * @dev Returns true if the key is in the map. O(1). + */ + function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) { + return _contains(map._inner, bytes32(key)); + } + + /** + * @dev Returns the number of elements in the map. O(1). + */ + function length(UintToAddressMap storage map) internal view returns (uint256) { + return _length(map._inner); + } + + /** + * @dev Returns the element stored at position `index` in the set. O(1). + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) { + (bytes32 key, bytes32 value) = _at(map._inner, index); + return (uint256(key), address(uint160(uint256(value)))); + } + + /** + * @dev Tries to returns the value associated with `key`. O(1). + * Does not revert if `key` is not in the map. + * + * _Available since v3.4._ + */ + function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) { + (bool success, bytes32 value) = _tryGet(map._inner, bytes32(key)); + return (success, address(uint160(uint256(value)))); + } + + /** + * @dev Returns the value associated with `key`. O(1). + * + * Requirements: + * + * - `key` must be in the map. + */ + function get(UintToAddressMap storage map, uint256 key) internal view returns (address) { + return address(uint160(uint256(_get(map._inner, bytes32(key))))); + } + + /** + * @dev Same as {get}, with a custom error message when `key` is not in the map. + * + * CAUTION: This function is deprecated because it requires allocating memory for the error + * message unnecessarily. For custom revert reasons use {tryGet}. + */ + function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) { + return address(uint160(uint256(_get(map._inner, bytes32(key), errorMessage)))); + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/utils/EnumerableSet.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/utils/EnumerableSet.sol new file mode 100644 index 0000000000..858312dd99 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/utils/EnumerableSet.sol @@ -0,0 +1,297 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev Library for managing + * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive + * types. + * + * Sets have the following properties: + * + * - Elements are added, removed, and checked for existence in constant time + * (O(1)). + * - Elements are enumerated in O(n). No guarantees are made on the ordering. + * + * ``` + * contract Example { + * // Add the library methods + * using EnumerableSet for EnumerableSet.AddressSet; + * + * // Declare a set state variable + * EnumerableSet.AddressSet private mySet; + * } + * ``` + * + * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) + * and `uint256` (`UintSet`) are supported. + */ +library EnumerableSet { + // To implement this library for multiple types with as little code + // repetition as possible, we write it in terms of a generic Set type with + // bytes32 values. + // The Set implementation uses private functions, and user-facing + // implementations (such as AddressSet) are just wrappers around the + // underlying Set. + // This means that we can only create new EnumerableSets for types that fit + // in bytes32. + + struct Set { + // Storage of set values + bytes32[] _values; + + // Position of the value in the `values` array, plus 1 because index 0 + // means a value is not in the set. + mapping (bytes32 => uint256) _indexes; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function _add(Set storage set, bytes32 value) private returns (bool) { + if (!_contains(set, value)) { + set._values.push(value); + // The value is stored at length-1, but we add 1 to all indexes + // and use 0 as a sentinel value + set._indexes[value] = set._values.length; + return true; + } else { + return false; + } + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function _remove(Set storage set, bytes32 value) private returns (bool) { + // We read and store the value's index to prevent multiple reads from the same storage slot + uint256 valueIndex = set._indexes[value]; + + if (valueIndex != 0) { // Equivalent to contains(set, value) + // To delete an element from the _values array in O(1), we swap the element to delete with the last one in + // the array, and then remove the last element (sometimes called as 'swap and pop'). + // This modifies the order of the array, as noted in {at}. + + uint256 toDeleteIndex = valueIndex - 1; + uint256 lastIndex = set._values.length - 1; + + // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs + // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. + + bytes32 lastvalue = set._values[lastIndex]; + + // Move the last value to the index where the value to delete is + set._values[toDeleteIndex] = lastvalue; + // Update the index for the moved value + set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based + + // Delete the slot where the moved value was stored + set._values.pop(); + + // Delete the index for the deleted slot + delete set._indexes[value]; + + return true; + } else { + return false; + } + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function _contains(Set storage set, bytes32 value) private view returns (bool) { + return set._indexes[value] != 0; + } + + /** + * @dev Returns the number of values on the set. O(1). + */ + function _length(Set storage set) private view returns (uint256) { + return set._values.length; + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function _at(Set storage set, uint256 index) private view returns (bytes32) { + require(set._values.length > index, "EnumerableSet: index out of bounds"); + return set._values[index]; + } + + // Bytes32Set + + struct Bytes32Set { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { + return _add(set._inner, value); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { + return _remove(set._inner, value); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { + return _contains(set._inner, value); + } + + /** + * @dev Returns the number of values in the set. O(1). + */ + function length(Bytes32Set storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { + return _at(set._inner, index); + } + + // AddressSet + + struct AddressSet { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(AddressSet storage set, address value) internal returns (bool) { + return _add(set._inner, bytes32(uint256(uint160(value)))); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(AddressSet storage set, address value) internal returns (bool) { + return _remove(set._inner, bytes32(uint256(uint160(value)))); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(AddressSet storage set, address value) internal view returns (bool) { + return _contains(set._inner, bytes32(uint256(uint160(value)))); + } + + /** + * @dev Returns the number of values in the set. O(1). + */ + function length(AddressSet storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(AddressSet storage set, uint256 index) internal view returns (address) { + return address(uint160(uint256(_at(set._inner, index)))); + } + + + // UintSet + + struct UintSet { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(UintSet storage set, uint256 value) internal returns (bool) { + return _add(set._inner, bytes32(value)); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(UintSet storage set, uint256 value) internal returns (bool) { + return _remove(set._inner, bytes32(value)); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(UintSet storage set, uint256 value) internal view returns (bool) { + return _contains(set._inner, bytes32(value)); + } + + /** + * @dev Returns the number of values on the set. O(1). + */ + function length(UintSet storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(UintSet storage set, uint256 index) internal view returns (uint256) { + return uint256(_at(set._inner, index)); + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/utils/Strings.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/utils/Strings.sol new file mode 100644 index 0000000000..5842448b34 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/@openzeppelin/contracts/utils/Strings.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT + +pragma solidity >=0.6.0 <0.8.0; + +/** + * @dev String operations. + */ +library Strings { + /** + * @dev Converts a `uint256` to its ASCII `string` representation. + */ + function toString(uint256 value) internal pure returns (string memory) { + // Inspired by OraclizeAPI's implementation - MIT licence + // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol + + if (value == 0) { + return "0"; + } + uint256 temp = value; + uint256 digits; + while (temp != 0) { + digits++; + temp /= 10; + } + bytes memory buffer = new bytes(digits); + uint256 index = digits - 1; + temp = value; + while (temp != 0) { + buffer[index--] = bytes1(uint8(48 + temp % 10)); + temp /= 10; + } + return string(buffer); + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/contracts/IBond.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/contracts/IBond.sol new file mode 100644 index 0000000000..dcd051fa55 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/contracts/IBond.sol @@ -0,0 +1,13 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.7.6; +pragma abicoder v2; + +import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; + +interface IBond is IERC721 { + function smartYield() external view returns (address); + + function mint(address to, uint256 tokenId) external; + + function burn(uint256 tokenId) external; +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/contracts/SeniorBond.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/contracts/SeniorBond.sol new file mode 100644 index 0000000000..b9c947830b --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/contracts/SeniorBond.sol @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.7.6; +pragma abicoder v2; + +import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; + +import "./IBond.sol"; + +contract SeniorBond is IBond, ERC721 { + + address public override smartYield; + + constructor( + address smartYield_, + string memory name_, + string memory symbol_ + ) ERC721(name_, symbol_) { + smartYield = smartYield_; + } + + function mint(address to_, uint256 tokenId_) public override { + require(msg.sender == smartYield, "SB: mint not smartYield"); + _mint(to_, tokenId_); + } + + function burn(uint256 tokenId_) public override { + require(msg.sender == smartYield, "SB: burn not smartYield"); + _burn(tokenId_); + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/meta.json b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/meta.json new file mode 100644 index 0000000000..68a34bce94 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/meta.json @@ -0,0 +1,19 @@ +{ + "language": "Solidity", + "sources": { + "contracts/SeniorBond.sol": { + "urls": [ + "contracts/SeniorBond.sol" + ] + } + }, + "settings": { + "outputSelection": { + "*": { + "": [ + "ast" + ] + } + } + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/constructor-args.txt b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/constructor-args.txt new file mode 100644 index 0000000000..bb2055af3f --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/constructor-args.txt @@ -0,0 +1 @@ +0x0000000000000000000000001337def16f9b486faed0293eb623dc8395dfe46a0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000baf9a5d4b0052359326a6cdab54babaa3a3a9643000000000000000000000000000000000000000000000000000000000000002031696e6368204c697175696469747920506f6f6c202841524d4f522d44414929000000000000000000000000000000000000000000000000000000000000000d314c502d41524d4f522d44414900000000000000000000000000000000000000 \ No newline at end of file diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/creator-tx-hash.txt b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/creator-tx-hash.txt new file mode 100644 index 0000000000..d88e43accb --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/creator-tx-hash.txt @@ -0,0 +1 @@ +0x5fbf1f09965b22131c0b1f7365d75c65be557989840ede3967f553957f954b56 \ No newline at end of file diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/immutable-references.json b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/immutable-references.json new file mode 100644 index 0000000000..31d7ddc3c4 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/immutable-references.json @@ -0,0 +1 @@ +{"105":[{"length":32,"start":4225},{"length":32,"start":5120},{"length":32,"start":5751},{"length":32,"start":6518},{"length":32,"start":6647},{"length":32,"start":7479},{"length":32,"start":9248},{"length":32,"start":12611}],"107":[{"length":32,"start":5157},{"length":32,"start":5799},{"length":32,"start":6573},{"length":32,"start":6782},{"length":32,"start":7516},{"length":32,"start":9326},{"length":32,"start":9903},{"length":32,"start":12672}]} \ No newline at end of file diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/metadata.json b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/metadata.json new file mode 100644 index 0000000000..520106b5da --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/metadata.json @@ -0,0 +1 @@ +{"compiler":{"version":"0.6.12+commit.27d51765"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"contract IERC20","name":"_token0","type":"address"},{"internalType":"contract IERC20","name":"_token1","type":"address"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"contract IMooniswapFactoryGovernance","name":"_mooniswapFactoryGovernance","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"decayPeriod","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isDefault","type":"bool"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"DecayPeriodVoteUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"share","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"token0Amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"token1Amount","type":"uint256"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"reason","type":"string"}],"name":"Error","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isDefault","type":"bool"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"FeeVoteUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"slippageFee","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isDefault","type":"bool"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"SlippageFeeVoteUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"address","name":"srcToken","type":"address"},{"indexed":false,"internalType":"address","name":"dstToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"result","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"srcAdditionBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"dstRemovalBalance","type":"uint256"},{"indexed":false,"internalType":"address","name":"referral","type":"address"}],"name":"Swapped","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"srcBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"dstBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"slippageFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"referralShare","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"governanceShare","type":"uint256"}],"name":"Sync","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"share","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"token0Amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"token1Amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decayPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"vote","type":"uint256"}],"name":"decayPeriodVote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"decayPeriodVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[2]","name":"maxAmounts","type":"uint256[2]"},{"internalType":"uint256[2]","name":"minAmounts","type":"uint256[2]"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"fairSupply","type":"uint256"},{"internalType":"uint256[2]","name":"receivedAmounts","type":"uint256[2]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256[2]","name":"maxAmounts","type":"uint256[2]"},{"internalType":"uint256[2]","name":"minAmounts","type":"uint256[2]"},{"internalType":"address","name":"target","type":"address"}],"name":"depositFor","outputs":[{"internalType":"uint256","name":"fairSupply","type":"uint256"},{"internalType":"uint256[2]","name":"receivedAmounts","type":"uint256[2]"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"discardDecayPeriodVote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"discardFeeVote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"discardSlippageFeeVote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"vote","type":"uint256"}],"name":"feeVote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"feeVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"getBalanceForAddition","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"getBalanceForRemoval","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"src","type":"address"},{"internalType":"contract IERC20","name":"dst","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"getReturn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTokens","outputs":[{"internalType":"contract IERC20[]","name":"tokens","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mooniswapFactoryGovernance","outputs":[{"internalType":"contract IMooniswapFactoryGovernance","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"rescueFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IMooniswapFactoryGovernance","name":"newMooniswapFactoryGovernance","type":"address"}],"name":"setMooniswapFactoryGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"slippageFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"vote","type":"uint256"}],"name":"slippageFeeVote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"slippageFeeVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"src","type":"address"},{"internalType":"contract IERC20","name":"dst","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"minReturn","type":"uint256"},{"internalType":"address","name":"referral","type":"address"}],"name":"swap","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"src","type":"address"},{"internalType":"contract IERC20","name":"dst","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"minReturn","type":"uint256"},{"internalType":"address","name":"referral","type":"address"},{"internalType":"address payable","name":"receiver","type":"address"}],"name":"swapFor","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token0","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token1","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"i","type":"uint256"}],"name":"tokens","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"name":"virtualBalancesForAddition","outputs":[{"internalType":"uint216","name":"balance","type":"uint216"},{"internalType":"uint40","name":"time","type":"uint40"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"name":"virtualBalancesForRemoval","outputs":[{"internalType":"uint216","name":"balance","type":"uint216"},{"internalType":"uint40","name":"time","type":"uint40"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"virtualDecayPeriod","outputs":[{"internalType":"uint104","name":"","type":"uint104"},{"internalType":"uint104","name":"","type":"uint104"},{"internalType":"uint48","name":"","type":"uint48"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"virtualFee","outputs":[{"internalType":"uint104","name":"","type":"uint104"},{"internalType":"uint104","name":"","type":"uint104"},{"internalType":"uint48","name":"","type":"uint48"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"virtualSlippageFee","outputs":[{"internalType":"uint104","name":"","type":"uint104"},{"internalType":"uint104","name":"","type":"uint104"},{"internalType":"uint48","name":"","type":"uint48"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"name":"volumes","outputs":[{"internalType":"uint128","name":"confirmed","type":"uint128"},{"internalType":"uint128","name":"result","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256[]","name":"minReturns","type":"uint256[]"}],"name":"withdraw","outputs":[{"internalType":"uint256[2]","name":"withdrawnAmounts","type":"uint256[2]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256[]","name":"minReturns","type":"uint256[]"},{"internalType":"address payable","name":"target","type":"address"}],"name":"withdrawFor","outputs":[{"internalType":"uint256[2]","name":"withdrawnAmounts","type":"uint256[2]"}],"stateMutability":"nonpayable","type":"function"}],"devdoc":{"kind":"dev","methods":{"allowance(address,address)":{"details":"See {IERC20-allowance}."},"approve(address,uint256)":{"details":"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address."},"balanceOf(address)":{"details":"See {IERC20-balanceOf}."},"decimals()":{"details":"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is called. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}."},"decreaseAllowance(address,uint256)":{"details":"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`."},"increaseAllowance(address,uint256)":{"details":"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address."},"name()":{"details":"Returns the name of the token."},"owner()":{"details":"Returns the address of the current owner."},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."},"symbol()":{"details":"Returns the symbol of the token, usually a shorter version of the name."},"totalSupply()":{"details":"See {IERC20-totalSupply}."},"transfer(address,uint256)":{"details":"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`."},"transferFrom(address,address,uint256)":{"details":"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}; Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"compilationTarget":{"/Users/k06a/Projects/mooniswap-v2/contracts/Mooniswap.sol":"Mooniswap"},"evmVersion":"istanbul","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":true,"runs":1000},"remappings":[]},"sources":{"/Users/k06a/Projects/mooniswap-v2/contracts/Mooniswap.sol":{"keccak256":"0xf4dfdd316f05e3a1519432a0fb8a4189674eb41928e979fd70189f8337262cc2","license":"MIT","urls":["bzz-raw://2bf714507dfcedb58fb8f38a7a8748141de9b2df028935aecfa71c2f79d9c1d4","dweb:/ipfs/QmcHVjDPWzjPAbKprDcvjgd3pn5su3kcMToMgin3WnN4d2"]},"/Users/k06a/Projects/mooniswap-v2/contracts/governance/MooniswapGovernance.sol":{"keccak256":"0x62430fc9ad87ad51c5820482201ad5f6df47c838e8b9e50a5207eb9dbe7cc12e","license":"MIT","urls":["bzz-raw://8066f5e4054bb4a4e253693b8782b431ad0110875faf47d7f69acb3206b4b4f1","dweb:/ipfs/QmPt2CMqahyXaQAg5DHdum4Df18ugUmqzVcdVeCHiJEdjF"]},"/Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IFeeCollector.sol":{"keccak256":"0x32a215750177362f8077d6e4cf48ae508e0b6565f20f8eaa4b130260bf238555","license":"MIT","urls":["bzz-raw://c596513c3e587dac583be0d65d7840ab0e6c16f8e2c0bdbec4ff4ff93b3ccc99","dweb:/ipfs/QmUu7vkg3sXMvqPx7nKjGcESnndxaw1ytGsMjpaHqEKts6"]},"/Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IMooniswapFactoryGovernance.sol":{"keccak256":"0xf5a2f873490e950f72125859dade8528e62c70e2abfc7be17c22488b84c8adb7","license":"MIT","urls":["bzz-raw://62d928b60661516da9f50bbddfb81082beedbbb4d83f0feb083b01fc955c0173","dweb:/ipfs/QmfS9FJ5zHbbxm21d29xWKit8PtAvpemqddVkmNTwrqiJ4"]},"/Users/k06a/Projects/mooniswap-v2/contracts/libraries/LiquidVoting.sol":{"keccak256":"0x0300c61b4bba9a58097ec0a843d04b42260f705dbc68bf3bbcc9e9011ffdfd7a","license":"MIT","urls":["bzz-raw://82deea804e69fc72159f9280eb4b2b72c4161c3143411e41bd2950c24195a1d0","dweb:/ipfs/QmSbhzSSNHiwywEGzdjK828KQijcbwQRF5ogPtd2jzXi3W"]},"/Users/k06a/Projects/mooniswap-v2/contracts/libraries/MooniswapConstants.sol":{"keccak256":"0x9f6421e5cf8734fbf5670148f3d6030b69aaeba473933f9a07fd3766fdaf1733","license":"MIT","urls":["bzz-raw://85827e493fb354b56f866a4b89b18fb4989c644bde58d736ec3316e270c0cc01","dweb:/ipfs/QmTeA6CXbuYNb2CTufzDgZokuUuZn8MJACpHnDyb81z6JY"]},"/Users/k06a/Projects/mooniswap-v2/contracts/libraries/SafeCast.sol":{"keccak256":"0x6f5e3e3d0bc762c2defe32c7bc62309cd7e60776bb5dc0d059a1bcf0874b4c51","license":"MIT","urls":["bzz-raw://037e1fec039b166eded383524aba14012639b20d05c03bce6dfae8ed77bdf6c8","dweb:/ipfs/Qma3nQzg3qR6vRXJyy4hiTeBNdrvyrm9a2G2NPXxmmqo1S"]},"/Users/k06a/Projects/mooniswap-v2/contracts/libraries/Sqrt.sol":{"keccak256":"0x5674ed7d1bb3655d9d6698ff6175cb23261d8cf837915d0af70404aa019b5267","license":"MIT","urls":["bzz-raw://b79b00374537e2b24bb4b0ef1e4f86e67f7c789201d2cfae430beb11d4deade3","dweb:/ipfs/QmWDXiQrtSHbbAQctNjCo9w3zG4woPQBxz8kGskNDZ3EgZ"]},"/Users/k06a/Projects/mooniswap-v2/contracts/libraries/UniERC20.sol":{"keccak256":"0x0edbb831cddd42ae71b178230188bd12c8f1cd362b148df704df6f0b1c9e015f","license":"MIT","urls":["bzz-raw://c2d8316e47def8848a0fbb7d8dd30de7f618b90c5ed7c0c193a553484a9fddb1","dweb:/ipfs/QmSttpg6nNScGrnQsuErFc4NXZtwLr2G4dwtgoHtL9YBdS"]},"/Users/k06a/Projects/mooniswap-v2/contracts/libraries/VirtualBalance.sol":{"keccak256":"0x0493d4b88ca464df713e7978a995c26f378e458ffeffc4a0ca966510e4cea8cb","license":"MIT","urls":["bzz-raw://83e74ce6f1c7e88953c81f5207a2a3571ecb672ad355219d246fce38731ee61a","dweb:/ipfs/QmYxsp2Zpu7ywiNyyUXhHtQFysdywJpTkU23C75nZTH6Mt"]},"/Users/k06a/Projects/mooniswap-v2/contracts/libraries/VirtualVote.sol":{"keccak256":"0xd62c910eb9b206eb6c2230be6c964824693fbe52436e53c3e69f02a84aa7c63d","license":"MIT","urls":["bzz-raw://8a8fae267dbafd1ea069cdbe58a01e8dc5327b3dd8b403766d35c4bd865b170b","dweb:/ipfs/Qmdpe4yUkvGNYyuVP92ZKZJ6Z46FUwi9TK4CRcP2tLzzjP"]},"/Users/k06a/Projects/mooniswap-v2/contracts/libraries/Vote.sol":{"keccak256":"0xa31a88aebf9a52ea8c02e611cd798631e7296b78e9ecdf37d2b0c7eb2badb252","license":"MIT","urls":["bzz-raw://5a13a7b2c121fdff792f8ce50e9e705a7d1fd97a4ecb4ffc62d2cb5d2d5099fa","dweb:/ipfs/QmPdQzh9sneGYrTEwGNJPncV5eBueM4L2fWkmy8ocCn2c7"]},"@openzeppelin/contracts/GSN/Context.sol":{"keccak256":"0xdb26cbf4d028490f49831a7865c2fe1b28db44b535ca8d343785a3b768aae183","license":"MIT","urls":["bzz-raw://840b14ce0315c47d49ba328f1f9fa7654ded1c9e1559e6c5e777a7b2dc28bf0a","dweb:/ipfs/QmTLLabn4wcfGro9LEmUXUN2nwKqZSotXMvjDCLXEnLtZP"]},"@openzeppelin/contracts/access/Ownable.sol":{"keccak256":"0x4bd6402ca6b3419008c2b482aff54e66836e8cb4eba2680e42ac5884ae6424fc","license":"MIT","urls":["bzz-raw://8f9f711fb8d0d92aeea1c327e3845d13ca1fa8f142e47f8723cd5b3106fb29a3","dweb:/ipfs/QmVQUReDW9f4zGqhizwHnyU8EntMs95tbASdqkGncnikba"]},"@openzeppelin/contracts/math/Math.sol":{"keccak256":"0x6c234834003dfb86e2c23d12dfdde7cc01e78013d71b52162cb308b4873562cb","license":"MIT","urls":["bzz-raw://f0e3f39b2ec26694a42c89a5d9e489d5228f1880fcf5e375c5c975ba816e5ffe","dweb:/ipfs/QmUErheHopnbBUSLDQAtWsmw6HsEvqTNp1QiBEuSJhmhHn"]},"@openzeppelin/contracts/math/SafeMath.sol":{"keccak256":"0x9a9cf02622cd7a64261b10534fc3260449da25c98c9e96d1b4ae8110a20e5806","license":"MIT","urls":["bzz-raw://2df142592d1dc267d9549049ee3317fa190d2f87eaa565f86ab05ec83f7ab8f5","dweb:/ipfs/QmSkJtcfWo7c42KnL5hho6GFxK6HRNV91XABx1P7xDtfLV"]},"@openzeppelin/contracts/token/ERC20/ERC20.sol":{"keccak256":"0xf204d98eef08edacf5a02a2af1516ea4febdb6aba7a1ae5ac8deb6e568fd3dbb","license":"MIT","urls":["bzz-raw://c4dea62bffbd180772a6cfe7cb90e3a045c52d6b502bdb2fdff83193da42d8d0","dweb:/ipfs/QmW8qGZ5nngajmv5Aamdrpkeuq7S5YCVaR7rtcqNekKHtK"]},"@openzeppelin/contracts/token/ERC20/IERC20.sol":{"keccak256":"0x5c26b39d26f7ed489e555d955dcd3e01872972e71fdd1528e93ec164e4f23385","license":"MIT","urls":["bzz-raw://efdc632af6960cf865dbc113665ea1f5b90eab75cc40ec062b2f6ae6da582017","dweb:/ipfs/QmfAZFDuG62vxmAN9DnXApv7e7PMzPqi4RkqqZHLMSQiY5"]},"@openzeppelin/contracts/token/ERC20/SafeERC20.sol":{"keccak256":"0xf3b30f8a49631420635a8c35daacfcaa338012755f18a76fdd118730256f9a27","license":"MIT","urls":["bzz-raw://0d7de652204c2ee291a61aa984103dfc7ae4392d651fbbc44a0079caee7c69a3","dweb:/ipfs/Qmcw1cQnq9eWDnrCBwU3TNyqLfTMUFg5YKpYUkELoMPuUE"]},"@openzeppelin/contracts/utils/Address.sol":{"keccak256":"0xdfb4f812600ba4ce6738c35584ceb8c9433472583051b48ba5b1f66cb758a498","license":"MIT","urls":["bzz-raw://df02dffe1c1de089d9b4f6192f0dcf464526f2230f420b3deec4645e0cdd2bff","dweb:/ipfs/QmcqXGAU3KJqwrgUVoGJ2W8osomhSJ4R5kdsRpbuW3fELS"]},"@openzeppelin/contracts/utils/ReentrancyGuard.sol":{"keccak256":"0x7ff0067f2d7df4187eaa1cb4800949b929602c9d9cb20fcaee6922a7613ef2fb","license":"MIT","urls":["bzz-raw://78aa63fd7fbb8df2942b6c6e7bd89349507e306edbd5909ee8d9575c31be57e5","dweb:/ipfs/Qmf6z9KWKCJCfEVokgTBhBVq5yHtE6is31N8AV5BHdMkqQ"]}},"version":1} \ No newline at end of file diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/mooniswap.json b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/mooniswap.json new file mode 100644 index 0000000000..2948e241f0 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/mooniswap.json @@ -0,0 +1,76021 @@ +{ + "sources": { + "@openzeppelin/contracts/GSN/Context.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/GSN/Context.sol", + "exportedSymbols": { + "Context": [ + 4138 + ] + }, + "id": 4139, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4117, + "literals": [ + "solidity", + "^", + "0.6", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "33:23:0" + }, + { + "abstract": true, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 4138, + "linearizedBaseContracts": [ + 4138 + ], + "name": "Context", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 4125, + "nodeType": "Block", + "src": "660:34:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4122, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "677:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "677:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "functionReturnParameters": 4121, + "id": 4124, + "nodeType": "Return", + "src": "670:17:0" + } + ] + }, + "documentation": null, + "id": 4126, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_msgSender", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4118, + "nodeType": "ParameterList", + "parameters": [], + "src": "609:2:0" + }, + "returnParameters": { + "id": 4121, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4120, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4126, + "src": "643:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 4119, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "643:15:0", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "642:17:0" + }, + "scope": 4138, + "src": "590:104:0", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 4136, + "nodeType": "Block", + "src": "765:165:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4131, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "775:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Context_$4138", + "typeString": "contract Context" + } + }, + "id": 4132, + "nodeType": "ExpressionStatement", + "src": "775:4:0" + }, + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4133, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "915:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 4134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "data", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "915:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_calldata_ptr", + "typeString": "bytes calldata" + } + }, + "functionReturnParameters": 4130, + "id": 4135, + "nodeType": "Return", + "src": "908:15:0" + } + ] + }, + "documentation": null, + "id": 4137, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_msgData", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4127, + "nodeType": "ParameterList", + "parameters": [], + "src": "717:2:0" + }, + "returnParameters": { + "id": 4130, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4129, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4137, + "src": "751:12:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4128, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "751:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "750:14:0" + }, + "scope": 4138, + "src": "700:230:0", + "stateMutability": "view", + "virtual": true, + "visibility": "internal" + } + ], + "scope": 4139, + "src": "558:374:0" + } + ], + "src": "33:900:0" + }, + "id": 0 + }, + "@openzeppelin/contracts/access/Ownable.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/access/Ownable.sol", + "exportedSymbols": { + "Ownable": [ + 4529 + ] + }, + "id": 4530, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4422, + "literals": [ + "solidity", + "^", + "0.6", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "33:23:1" + }, + { + "absolutePath": "@openzeppelin/contracts/GSN/Context.sol", + "file": "../GSN/Context.sol", + "id": 4423, + "nodeType": "ImportDirective", + "scope": 4530, + "sourceUnit": 4139, + "src": "58:28:1", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 4425, + "name": "Context", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4138, + "src": "602:7:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Context_$4138", + "typeString": "contract Context" + } + }, + "id": 4426, + "nodeType": "InheritanceSpecifier", + "src": "602:7:1" + } + ], + "contractDependencies": [ + 4138 + ], + "contractKind": "contract", + "documentation": { + "id": 4424, + "nodeType": "StructuredDocumentation", + "src": "87:494:1", + "text": " @dev Contract module which provides a basic access control mechanism, where\n there is an account (an owner) that can be granted exclusive access to\n specific functions.\n By default, the owner account will be the one that deploys the contract. This\n can later be changed with {transferOwnership}.\n This module is used through inheritance. It will make available the modifier\n `onlyOwner`, which can be applied to your functions to restrict their use to\n the owner." + }, + "fullyImplemented": true, + "id": 4529, + "linearizedBaseContracts": [ + 4529, + 4138 + ], + "name": "Ownable", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 4428, + "mutability": "mutable", + "name": "_owner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4529, + "src": "616:22:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4427, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "616:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "private" + }, + { + "anonymous": false, + "documentation": null, + "id": 4434, + "name": "OwnershipTransferred", + "nodeType": "EventDefinition", + "parameters": { + "id": 4433, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4430, + "indexed": true, + "mutability": "mutable", + "name": "previousOwner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4434, + "src": "672:29:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4429, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "672:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4432, + "indexed": true, + "mutability": "mutable", + "name": "newOwner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4434, + "src": "703:24:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4431, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "703:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "671:57:1" + }, + "src": "645:84:1" + }, + { + "body": { + "id": 4455, + "nodeType": "Block", + "src": "855:135:1", + "statements": [ + { + "assignments": [ + 4439 + ], + "declarations": [ + { + "constant": false, + "id": 4439, + "mutability": "mutable", + "name": "msgSender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4455, + "src": "865:17:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4438, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "865:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4442, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4440, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4126, + "src": "885:10:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 4441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "885:12:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "865:32:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 4445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 4443, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4428, + "src": "907:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 4444, + "name": "msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4439, + "src": "916:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "907:18:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4446, + "nodeType": "ExpressionStatement", + "src": "907:18:1" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 4450, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "969:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4449, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "961:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4448, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "961:7:1", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 4451, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "961:10:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 4452, + "name": "msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4439, + "src": "973:9:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4447, + "name": "OwnershipTransferred", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4434, + "src": "940:20:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 4453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "940:43:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4454, + "nodeType": "EmitStatement", + "src": "935:48:1" + } + ] + }, + "documentation": { + "id": 4435, + "nodeType": "StructuredDocumentation", + "src": "735:91:1", + "text": " @dev Initializes the contract setting the deployer as the initial owner." + }, + "id": 4456, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4436, + "nodeType": "ParameterList", + "parameters": [], + "src": "843:2:1" + }, + "returnParameters": { + "id": 4437, + "nodeType": "ParameterList", + "parameters": [], + "src": "855:0:1" + }, + "scope": 4529, + "src": "831:159:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4464, + "nodeType": "Block", + "src": "1113:30:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4462, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4428, + "src": "1130:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 4461, + "id": 4463, + "nodeType": "Return", + "src": "1123:13:1" + } + ] + }, + "documentation": { + "id": 4457, + "nodeType": "StructuredDocumentation", + "src": "996:65:1", + "text": " @dev Returns the address of the current owner." + }, + "functionSelector": "8da5cb5b", + "id": 4465, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "owner", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4458, + "nodeType": "ParameterList", + "parameters": [], + "src": "1080:2:1" + }, + "returnParameters": { + "id": 4461, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4460, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4465, + "src": "1104:7:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4459, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1104:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1103:9:1" + }, + "scope": 4529, + "src": "1066:77:1", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 4477, + "nodeType": "Block", + "src": "1252:95:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4472, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4469, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4428, + "src": "1270:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 4470, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4126, + "src": "1280:10:1", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 4471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1280:12:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1270:22:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572", + "id": 4473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1294:34:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", + "typeString": "literal_string \"Ownable: caller is not the owner\"" + }, + "value": "Ownable: caller is not the owner" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9924ebdf1add33d25d4ef888e16131f0a5687b0580a36c21b5c301a6c462effe", + "typeString": "literal_string \"Ownable: caller is not the owner\"" + } + ], + "id": 4468, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1262:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4474, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1262:67:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4475, + "nodeType": "ExpressionStatement", + "src": "1262:67:1" + }, + { + "id": 4476, + "nodeType": "PlaceholderStatement", + "src": "1339:1:1" + } + ] + }, + "documentation": { + "id": 4466, + "nodeType": "StructuredDocumentation", + "src": "1149:77:1", + "text": " @dev Throws if called by any account other than the owner." + }, + "id": 4478, + "name": "onlyOwner", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 4467, + "nodeType": "ParameterList", + "parameters": [], + "src": "1249:2:1" + }, + "src": "1231:116:1", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4499, + "nodeType": "Block", + "src": "1743:91:1", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4485, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4428, + "src": "1779:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 4488, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1795:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4487, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1787:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4486, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1787:7:1", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 4489, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1787:10:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 4484, + "name": "OwnershipTransferred", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4434, + "src": "1758:20:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 4490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1758:40:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4491, + "nodeType": "EmitStatement", + "src": "1753:45:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 4497, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 4492, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4428, + "src": "1808:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 4495, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1825:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4494, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1817:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4493, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1817:7:1", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 4496, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1817:10:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1808:19:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4498, + "nodeType": "ExpressionStatement", + "src": "1808:19:1" + } + ] + }, + "documentation": { + "id": 4479, + "nodeType": "StructuredDocumentation", + "src": "1353:331:1", + "text": " @dev Leaves the contract without owner. It will not be possible to call\n `onlyOwner` functions anymore. Can only be called by the current owner.\n NOTE: Renouncing ownership will leave the contract without an owner,\n thereby removing any functionality that is only available to the owner." + }, + "functionSelector": "715018a6", + "id": 4500, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 4482, + "modifierName": { + "argumentTypes": null, + "id": 4481, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4478, + "src": "1733:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1733:9:1" + } + ], + "name": "renounceOwnership", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4480, + "nodeType": "ParameterList", + "parameters": [], + "src": "1715:2:1" + }, + "returnParameters": { + "id": 4483, + "nodeType": "ParameterList", + "parameters": [], + "src": "1743:0:1" + }, + "scope": 4529, + "src": "1689:145:1", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 4527, + "nodeType": "Block", + "src": "2053:170:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 4514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4509, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4503, + "src": "2071:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 4512, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2091:1:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 4511, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2083:7:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4510, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2083:7:1", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 4513, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2083:10:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "2071:22:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373", + "id": 4515, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2095:40:1", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", + "typeString": "literal_string \"Ownable: new owner is the zero address\"" + }, + "value": "Ownable: new owner is the zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_245f15ff17f551913a7a18385165551503906a406f905ac1c2437281a7cd0cfe", + "typeString": "literal_string \"Ownable: new owner is the zero address\"" + } + ], + "id": 4508, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2063:7:1", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4516, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2063:73:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4517, + "nodeType": "ExpressionStatement", + "src": "2063:73:1" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4519, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4428, + "src": "2172:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4520, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4503, + "src": "2180:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4518, + "name": "OwnershipTransferred", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4434, + "src": "2151:20:1", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 4521, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2151:38:1", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4522, + "nodeType": "EmitStatement", + "src": "2146:43:1" + }, + { + "expression": { + "argumentTypes": null, + "id": 4525, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 4523, + "name": "_owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4428, + "src": "2199:6:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 4524, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4503, + "src": "2208:8:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2199:17:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4526, + "nodeType": "ExpressionStatement", + "src": "2199:17:1" + } + ] + }, + "documentation": { + "id": 4501, + "nodeType": "StructuredDocumentation", + "src": "1840:138:1", + "text": " @dev Transfers ownership of the contract to a new account (`newOwner`).\n Can only be called by the current owner." + }, + "functionSelector": "f2fde38b", + "id": 4528, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 4506, + "modifierName": { + "argumentTypes": null, + "id": 4505, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4478, + "src": "2043:9:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "2043:9:1" + } + ], + "name": "transferOwnership", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4504, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4503, + "mutability": "mutable", + "name": "newOwner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4528, + "src": "2010:16:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4502, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2010:7:1", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2009:18:1" + }, + "returnParameters": { + "id": 4507, + "nodeType": "ParameterList", + "parameters": [], + "src": "2053:0:1" + }, + "scope": 4529, + "src": "1983:240:1", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + } + ], + "scope": 4530, + "src": "582:1643:1" + } + ], + "src": "33:2193:1" + }, + "id": 1 + }, + "@openzeppelin/contracts/math/Math.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/math/Math.sol", + "exportedSymbols": { + "Math": [ + 1840 + ] + }, + "id": 1841, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1769, + "literals": [ + "solidity", + "^", + "0.6", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "33:23:2" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": { + "id": 1770, + "nodeType": "StructuredDocumentation", + "src": "58:73:2", + "text": " @dev Standard math utilities missing in the Solidity language." + }, + "fullyImplemented": true, + "id": 1840, + "linearizedBaseContracts": [ + 1840 + ], + "name": "Math", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1787, + "nodeType": "Block", + "src": "282:38:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1782, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1780, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1773, + "src": "299:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1781, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1775, + "src": "304:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "299:6:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "id": 1784, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1775, + "src": "312:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1785, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "299:14:2", + "trueExpression": { + "argumentTypes": null, + "id": 1783, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1773, + "src": "308:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1779, + "id": 1786, + "nodeType": "Return", + "src": "292:21:2" + } + ] + }, + "documentation": { + "id": 1771, + "nodeType": "StructuredDocumentation", + "src": "151:59:2", + "text": " @dev Returns the largest of two numbers." + }, + "id": 1788, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "max", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1776, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1773, + "mutability": "mutable", + "name": "a", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1788, + "src": "228:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1772, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "228:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1775, + "mutability": "mutable", + "name": "b", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1788, + "src": "239:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1774, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "239:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "227:22:2" + }, + "returnParameters": { + "id": 1779, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1778, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1788, + "src": "273:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1777, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "273:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "272:9:2" + }, + "scope": 1840, + "src": "215:105:2", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1805, + "nodeType": "Block", + "src": "458:37:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1800, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1798, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1791, + "src": "475:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 1799, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1793, + "src": "479:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "475:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "id": 1802, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1793, + "src": "487:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "475:13:2", + "trueExpression": { + "argumentTypes": null, + "id": 1801, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1791, + "src": "483:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1797, + "id": 1804, + "nodeType": "Return", + "src": "468:20:2" + } + ] + }, + "documentation": { + "id": 1789, + "nodeType": "StructuredDocumentation", + "src": "326:60:2", + "text": " @dev Returns the smallest of two numbers." + }, + "id": 1806, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "min", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1794, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1791, + "mutability": "mutable", + "name": "a", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1806, + "src": "404:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1790, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "404:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1793, + "mutability": "mutable", + "name": "b", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1806, + "src": "415:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1792, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "415:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "403:22:2" + }, + "returnParameters": { + "id": 1797, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1796, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1806, + "src": "449:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1795, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "449:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "448:9:2" + }, + "scope": 1840, + "src": "391:104:2", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1838, + "nodeType": "Block", + "src": "679:119:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1836, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1818, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1816, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1809, + "src": "751:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 1817, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "755:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "751:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1819, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "750:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1822, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1820, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1811, + "src": "761:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 1821, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "765:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "761:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1823, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "760:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "750:17:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1834, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1825, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1809, + "src": "772:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 1826, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "776:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "772:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1828, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1811, + "src": "780:1:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 1829, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "784:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "780:5:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "772:13:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1832, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "771:15:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 1833, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "789:1:2", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "771:19:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1835, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "770:21:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "750:41:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1815, + "id": 1837, + "nodeType": "Return", + "src": "743:48:2" + } + ] + }, + "documentation": { + "id": 1807, + "nodeType": "StructuredDocumentation", + "src": "501:102:2", + "text": " @dev Returns the average of two numbers. The result is rounded towards\n zero." + }, + "id": 1839, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "average", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1812, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1809, + "mutability": "mutable", + "name": "a", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1839, + "src": "625:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1808, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "625:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1811, + "mutability": "mutable", + "name": "b", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1839, + "src": "636:9:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1810, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "636:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "624:22:2" + }, + "returnParameters": { + "id": 1815, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1814, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1839, + "src": "670:7:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1813, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "670:7:2", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "669:9:2" + }, + "scope": 1840, + "src": "608:190:2", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 1841, + "src": "132:668:2" + } + ], + "src": "33:768:2" + }, + "id": 2 + }, + "@openzeppelin/contracts/math/SafeMath.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "exportedSymbols": { + "SafeMath": [ + 2036 + ] + }, + "id": 2037, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1842, + "literals": [ + "solidity", + "^", + "0.6", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "33:23:3" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": { + "id": 1843, + "nodeType": "StructuredDocumentation", + "src": "58:563:3", + "text": " @dev Wrappers over Solidity's arithmetic operations with added overflow\n checks.\n Arithmetic operations in Solidity wrap on overflow. This can easily result\n in bugs, because programmers usually assume that an overflow raises an\n error, which is the standard behavior in high level programming languages.\n `SafeMath` restores this intuition by reverting the transaction when an\n operation overflows.\n Using this library instead of the unchecked operations eliminates an entire\n class of bugs, so it's recommended to use it always." + }, + "fullyImplemented": true, + "id": 2036, + "linearizedBaseContracts": [ + 2036 + ], + "name": "SafeMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1868, + "nodeType": "Block", + "src": "941:109:3", + "statements": [ + { + "assignments": [ + 1854 + ], + "declarations": [ + { + "constant": false, + "id": 1854, + "mutability": "mutable", + "name": "c", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1868, + "src": "951:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1853, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "951:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1858, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1855, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1846, + "src": "963:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 1856, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1848, + "src": "967:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "963:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "951:17:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1860, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1854, + "src": "986:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1861, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1846, + "src": "991:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "986:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "536166654d6174683a206164646974696f6e206f766572666c6f77", + "id": 1863, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "994:29:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", + "typeString": "literal_string \"SafeMath: addition overflow\"" + }, + "value": "SafeMath: addition overflow" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_30cc447bcc13b3e22b45cef0dd9b0b514842d836dd9b6eb384e20dedfb47723a", + "typeString": "literal_string \"SafeMath: addition overflow\"" + } + ], + "id": 1859, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "978:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "978:46:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1865, + "nodeType": "ExpressionStatement", + "src": "978:46:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 1866, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1854, + "src": "1042:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1852, + "id": 1867, + "nodeType": "Return", + "src": "1035:8:3" + } + ] + }, + "documentation": { + "id": 1844, + "nodeType": "StructuredDocumentation", + "src": "645:224:3", + "text": " @dev Returns the addition of two unsigned integers, reverting on\n overflow.\n Counterpart to Solidity's `+` operator.\n Requirements:\n - Addition cannot overflow." + }, + "id": 1869, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1849, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1846, + "mutability": "mutable", + "name": "a", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1869, + "src": "887:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1845, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "887:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1848, + "mutability": "mutable", + "name": "b", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1869, + "src": "898:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1847, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "898:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "886:22:3" + }, + "returnParameters": { + "id": 1852, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1851, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1869, + "src": "932:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1850, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "932:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "931:9:3" + }, + "scope": 2036, + "src": "874:176:3", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1885, + "nodeType": "Block", + "src": "1388:67:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1880, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1872, + "src": "1409:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1881, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1874, + "src": "1412:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "536166654d6174683a207375627472616374696f6e206f766572666c6f77", + "id": 1882, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1415:32:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", + "typeString": "literal_string \"SafeMath: subtraction overflow\"" + }, + "value": "SafeMath: subtraction overflow" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_50b058e9b5320e58880d88223c9801cd9eecdcf90323d5c2318bc1b6b916e862", + "typeString": "literal_string \"SafeMath: subtraction overflow\"" + } + ], + "id": 1879, + "name": "sub", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1886, + 1914 + ], + "referencedDeclaration": 1914, + "src": "1405:3:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 1883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1405:43:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1878, + "id": 1884, + "nodeType": "Return", + "src": "1398:50:3" + } + ] + }, + "documentation": { + "id": 1870, + "nodeType": "StructuredDocumentation", + "src": "1056:260:3", + "text": " @dev Returns the subtraction of two unsigned integers, reverting on\n overflow (when the result is negative).\n Counterpart to Solidity's `-` operator.\n Requirements:\n - Subtraction cannot overflow." + }, + "id": 1886, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1875, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1872, + "mutability": "mutable", + "name": "a", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1886, + "src": "1334:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1871, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1334:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1874, + "mutability": "mutable", + "name": "b", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1886, + "src": "1345:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1873, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1345:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1333:22:3" + }, + "returnParameters": { + "id": 1878, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1877, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1886, + "src": "1379:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1876, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1379:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1378:9:3" + }, + "scope": 2036, + "src": "1321:134:3", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1913, + "nodeType": "Block", + "src": "1841:92:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1901, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1899, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1891, + "src": "1859:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 1900, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1889, + "src": "1864:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1859:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 1902, + "name": "errorMessage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1893, + "src": "1867:12:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 1898, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1851:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1851:29:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1904, + "nodeType": "ExpressionStatement", + "src": "1851:29:3" + }, + { + "assignments": [ + 1906 + ], + "declarations": [ + { + "constant": false, + "id": 1906, + "mutability": "mutable", + "name": "c", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1913, + "src": "1890:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1905, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1890:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1910, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1909, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1907, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1889, + "src": "1902:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 1908, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1891, + "src": "1906:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1902:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1890:17:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 1911, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1906, + "src": "1925:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1897, + "id": 1912, + "nodeType": "Return", + "src": "1918:8:3" + } + ] + }, + "documentation": { + "id": 1887, + "nodeType": "StructuredDocumentation", + "src": "1461:280:3", + "text": " @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n overflow (when the result is negative).\n Counterpart to Solidity's `-` operator.\n Requirements:\n - Subtraction cannot overflow." + }, + "id": 1914, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1894, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1889, + "mutability": "mutable", + "name": "a", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1914, + "src": "1759:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1888, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1759:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1891, + "mutability": "mutable", + "name": "b", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1914, + "src": "1770:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1890, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1770:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1893, + "mutability": "mutable", + "name": "errorMessage", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1914, + "src": "1781:26:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1892, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1781:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1758:50:3" + }, + "returnParameters": { + "id": 1897, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1896, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1914, + "src": "1832:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1895, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1832:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1831:9:3" + }, + "scope": 2036, + "src": "1746:187:3", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1948, + "nodeType": "Block", + "src": "2247:392:3", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1924, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1917, + "src": "2479:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1925, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2484:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2479:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1930, + "nodeType": "IfStatement", + "src": "2475:45:3", + "trueBody": { + "id": 1929, + "nodeType": "Block", + "src": "2487:33:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1927, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2508:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 1923, + "id": 1928, + "nodeType": "Return", + "src": "2501:8:3" + } + ] + } + }, + { + "assignments": [ + 1932 + ], + "declarations": [ + { + "constant": false, + "id": 1932, + "mutability": "mutable", + "name": "c", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1948, + "src": "2530:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1931, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2530:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1936, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1935, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1933, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1917, + "src": "2542:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1934, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1919, + "src": "2546:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2542:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2530:17:3" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1938, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1932, + "src": "2565:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1939, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1917, + "src": "2569:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2565:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1941, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1919, + "src": "2574:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2565:10:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77", + "id": 1943, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2577:35:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", + "typeString": "literal_string \"SafeMath: multiplication overflow\"" + }, + "value": "SafeMath: multiplication overflow" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9113bb53c2876a3805b2c9242029423fc540a728243ce887ab24c82cf119fba3", + "typeString": "literal_string \"SafeMath: multiplication overflow\"" + } + ], + "id": 1937, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2557:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1944, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2557:56:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1945, + "nodeType": "ExpressionStatement", + "src": "2557:56:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 1946, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1932, + "src": "2631:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1923, + "id": 1947, + "nodeType": "Return", + "src": "2624:8:3" + } + ] + }, + "documentation": { + "id": 1915, + "nodeType": "StructuredDocumentation", + "src": "1939:236:3", + "text": " @dev Returns the multiplication of two unsigned integers, reverting on\n overflow.\n Counterpart to Solidity's `*` operator.\n Requirements:\n - Multiplication cannot overflow." + }, + "id": 1949, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1920, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1917, + "mutability": "mutable", + "name": "a", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1949, + "src": "2193:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1916, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2193:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1919, + "mutability": "mutable", + "name": "b", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1949, + "src": "2204:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1918, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2204:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2192:22:3" + }, + "returnParameters": { + "id": 1923, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1922, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1949, + "src": "2238:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1921, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2238:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2237:9:3" + }, + "scope": 2036, + "src": "2180:459:3", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1965, + "nodeType": "Block", + "src": "3168:63:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1960, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1952, + "src": "3189:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1961, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1954, + "src": "3192:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "536166654d6174683a206469766973696f6e206279207a65726f", + "id": 1962, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3195:28:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", + "typeString": "literal_string \"SafeMath: division by zero\"" + }, + "value": "SafeMath: division by zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_5b7cc70dda4dc2143e5adb63bd5d1f349504f461dbdfd9bc76fac1f8ca6d019f", + "typeString": "literal_string \"SafeMath: division by zero\"" + } + ], + "id": 1959, + "name": "div", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1966, + 1994 + ], + "referencedDeclaration": 1994, + "src": "3185:3:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 1963, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3185:39:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1958, + "id": 1964, + "nodeType": "Return", + "src": "3178:46:3" + } + ] + }, + "documentation": { + "id": 1950, + "nodeType": "StructuredDocumentation", + "src": "2645:451:3", + "text": " @dev Returns the integer division of two unsigned integers. Reverts on\n division by zero. The result is rounded towards zero.\n Counterpart to Solidity's `/` operator. Note: this function uses a\n `revert` opcode (which leaves remaining gas untouched) while Solidity\n uses an invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero." + }, + "id": 1966, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1955, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1952, + "mutability": "mutable", + "name": "a", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1966, + "src": "3114:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1951, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3114:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1954, + "mutability": "mutable", + "name": "b", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1966, + "src": "3125:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1953, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3125:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3113:22:3" + }, + "returnParameters": { + "id": 1958, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1957, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1966, + "src": "3159:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1956, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3159:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3158:9:3" + }, + "scope": 2036, + "src": "3101:130:3", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1993, + "nodeType": "Block", + "src": "3808:177:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1981, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1979, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1971, + "src": "3826:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1980, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3830:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3826:5:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 1982, + "name": "errorMessage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1973, + "src": "3833:12:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 1978, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3818:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1983, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3818:28:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1984, + "nodeType": "ExpressionStatement", + "src": "3818:28:3" + }, + { + "assignments": [ + 1986 + ], + "declarations": [ + { + "constant": false, + "id": 1986, + "mutability": "mutable", + "name": "c", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1993, + "src": "3856:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1985, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3856:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1990, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1987, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1969, + "src": "3868:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1988, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1971, + "src": "3872:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3868:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3856:17:3" + }, + { + "expression": { + "argumentTypes": null, + "id": 1991, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1986, + "src": "3977:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1977, + "id": 1992, + "nodeType": "Return", + "src": "3970:8:3" + } + ] + }, + "documentation": { + "id": 1967, + "nodeType": "StructuredDocumentation", + "src": "3237:471:3", + "text": " @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n division by zero. The result is rounded towards zero.\n Counterpart to Solidity's `/` operator. Note: this function uses a\n `revert` opcode (which leaves remaining gas untouched) while Solidity\n uses an invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero." + }, + "id": 1994, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1974, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1969, + "mutability": "mutable", + "name": "a", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1994, + "src": "3726:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1968, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3726:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1971, + "mutability": "mutable", + "name": "b", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1994, + "src": "3737:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1970, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3737:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1973, + "mutability": "mutable", + "name": "errorMessage", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1994, + "src": "3748:26:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 1972, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3748:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3725:50:3" + }, + "returnParameters": { + "id": 1977, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1976, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1994, + "src": "3799:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1975, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3799:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3798:9:3" + }, + "scope": 2036, + "src": "3713:272:3", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2010, + "nodeType": "Block", + "src": "4503:61:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2005, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1997, + "src": "4524:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2006, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1999, + "src": "4527:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "536166654d6174683a206d6f64756c6f206279207a65726f", + "id": 2007, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4530:26:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", + "typeString": "literal_string \"SafeMath: modulo by zero\"" + }, + "value": "SafeMath: modulo by zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_726e51f7b81fce0a68f5f214f445e275313b20b1633f08ce954ee39abf8d7832", + "typeString": "literal_string \"SafeMath: modulo by zero\"" + } + ], + "id": 2004, + "name": "mod", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 2011, + 2035 + ], + "referencedDeclaration": 2035, + "src": "4520:3:3", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 2008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4520:37:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2003, + "id": 2009, + "nodeType": "Return", + "src": "4513:44:3" + } + ] + }, + "documentation": { + "id": 1995, + "nodeType": "StructuredDocumentation", + "src": "3991:440:3", + "text": " @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n Reverts when dividing by zero.\n Counterpart to Solidity's `%` operator. This function uses a `revert`\n opcode (which leaves remaining gas untouched) while Solidity uses an\n invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero." + }, + "id": 2011, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mod", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2000, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1997, + "mutability": "mutable", + "name": "a", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2011, + "src": "4449:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1996, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4449:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1999, + "mutability": "mutable", + "name": "b", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2011, + "src": "4460:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1998, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4460:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4448:22:3" + }, + "returnParameters": { + "id": 2003, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2002, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2011, + "src": "4494:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2001, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4494:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4493:9:3" + }, + "scope": 2036, + "src": "4436:128:3", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2034, + "nodeType": "Block", + "src": "5130:68:3", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2024, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2016, + "src": "5148:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 2025, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5153:1:3", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5148:6:3", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 2027, + "name": "errorMessage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2018, + "src": "5156:12:3", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 2023, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5140:7:3", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2028, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5140:29:3", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2029, + "nodeType": "ExpressionStatement", + "src": "5140:29:3" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2030, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2014, + "src": "5186:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "%", + "rightExpression": { + "argumentTypes": null, + "id": 2031, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2016, + "src": "5190:1:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5186:5:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2022, + "id": 2033, + "nodeType": "Return", + "src": "5179:12:3" + } + ] + }, + "documentation": { + "id": 2012, + "nodeType": "StructuredDocumentation", + "src": "4570:460:3", + "text": " @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n Reverts with custom message when dividing by zero.\n Counterpart to Solidity's `%` operator. This function uses a `revert`\n opcode (which leaves remaining gas untouched) while Solidity uses an\n invalid opcode to revert (consuming all remaining gas).\n Requirements:\n - The divisor cannot be zero." + }, + "id": 2035, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "mod", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2019, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2014, + "mutability": "mutable", + "name": "a", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2035, + "src": "5048:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2013, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5048:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2016, + "mutability": "mutable", + "name": "b", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2035, + "src": "5059:9:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2015, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5059:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2018, + "mutability": "mutable", + "name": "errorMessage", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2035, + "src": "5070:26:3", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2017, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5070:6:3", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5047:50:3" + }, + "returnParameters": { + "id": 2022, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2021, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2035, + "src": "5121:7:3", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2020, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5121:7:3", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5120:9:3" + }, + "scope": 2036, + "src": "5035:163:3", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 2037, + "src": "622:4578:3" + } + ], + "src": "33:5168:3" + }, + "id": 3 + }, + "@openzeppelin/contracts/token/ERC20/ERC20.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/token/ERC20/ERC20.sol", + "exportedSymbols": { + "ERC20": [ + 2543 + ] + }, + "id": 2544, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2038, + "literals": [ + "solidity", + "^", + "0.6", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "33:23:4" + }, + { + "absolutePath": "@openzeppelin/contracts/GSN/Context.sol", + "file": "../../GSN/Context.sol", + "id": 2039, + "nodeType": "ImportDirective", + "scope": 2544, + "sourceUnit": 4139, + "src": "58:31:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "file": "./IERC20.sol", + "id": 2040, + "nodeType": "ImportDirective", + "scope": 2544, + "sourceUnit": 4217, + "src": "90:22:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "file": "../../math/SafeMath.sol", + "id": 2041, + "nodeType": "ImportDirective", + "scope": 2544, + "sourceUnit": 2037, + "src": "113:33:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Address.sol", + "file": "../../utils/Address.sol", + "id": 2042, + "nodeType": "ImportDirective", + "scope": 2544, + "sourceUnit": 4421, + "src": "147:33:4", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2044, + "name": "Context", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4138, + "src": "1363:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Context_$4138", + "typeString": "contract Context" + } + }, + "id": 2045, + "nodeType": "InheritanceSpecifier", + "src": "1363:7:4" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2046, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "1372:6:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 2047, + "nodeType": "InheritanceSpecifier", + "src": "1372:6:4" + } + ], + "contractDependencies": [ + 4138, + 4216 + ], + "contractKind": "contract", + "documentation": { + "id": 2043, + "nodeType": "StructuredDocumentation", + "src": "182:1162:4", + "text": " @dev Implementation of the {IERC20} interface.\n This implementation is agnostic to the way tokens are created. This means\n that a supply mechanism has to be added in a derived contract using {_mint}.\n For a generic mechanism see {ERC20PresetMinterPauser}.\n TIP: For a detailed writeup see our guide\n https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n to implement supply mechanisms].\n We have followed general OpenZeppelin guidelines: functions revert instead\n of returning `false` on failure. This behavior is nonetheless conventional\n and does not conflict with the expectations of ERC20 applications.\n Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n This allows applications to reconstruct the allowance for all accounts just\n by listening to said events. Other implementations of the EIP may not emit\n these events, as it isn't required by the specification.\n Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n functions have been added to mitigate the well-known issues around setting\n allowances. See {IERC20-approve}." + }, + "fullyImplemented": true, + "id": 2543, + "linearizedBaseContracts": [ + 2543, + 4216, + 4138 + ], + "name": "ERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 2050, + "libraryName": { + "contractScope": null, + "id": 2048, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2036, + "src": "1391:8:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$2036", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "1385:27:4", + "typeName": { + "id": 2049, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1404:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "id": 2053, + "libraryName": { + "contractScope": null, + "id": 2051, + "name": "Address", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4420, + "src": "1423:7:4", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Address_$4420", + "typeString": "library Address" + } + }, + "nodeType": "UsingForDirective", + "src": "1417:26:4", + "typeName": { + "id": 2052, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1435:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + { + "constant": false, + "id": 2057, + "mutability": "mutable", + "name": "_balances", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2543, + "src": "1449:46:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 2056, + "keyType": { + "id": 2054, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1458:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1449:28:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 2055, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1469:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 2063, + "mutability": "mutable", + "name": "_allowances", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2543, + "src": "1502:69:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "typeName": { + "id": 2062, + "keyType": { + "id": 2058, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1511:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1502:49:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + }, + "valueType": { + "id": 2061, + "keyType": { + "id": 2059, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1531:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1522:28:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 2060, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1542:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 2065, + "mutability": "mutable", + "name": "_totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2543, + "src": "1578:28:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2064, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1578:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 2067, + "mutability": "mutable", + "name": "_name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2543, + "src": "1613:20:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 2066, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1613:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 2069, + "mutability": "mutable", + "name": "_symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2543, + "src": "1639:22:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 2068, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1639:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 2071, + "mutability": "mutable", + "name": "_decimals", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2543, + "src": "1667:23:4", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2070, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "1667:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 2091, + "nodeType": "Block", + "src": "2075:79:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2079, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2067, + "src": "2085:5:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2080, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2074, + "src": "2093:4:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "2085:12:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 2082, + "nodeType": "ExpressionStatement", + "src": "2085:12:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 2085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2083, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2069, + "src": "2107:7:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2084, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2076, + "src": "2117:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "2107:16:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 2086, + "nodeType": "ExpressionStatement", + "src": "2107:16:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 2089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2087, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2071, + "src": "2133:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "3138", + "id": 2088, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2145:2:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "src": "2133:14:4", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 2090, + "nodeType": "ExpressionStatement", + "src": "2133:14:4" + } + ] + }, + "documentation": { + "id": 2072, + "nodeType": "StructuredDocumentation", + "src": "1697:311:4", + "text": " @dev Sets the values for {name} and {symbol}, initializes {decimals} with\n a default value of 18.\n To select a different value for {decimals}, use {_setupDecimals}.\n All three of these values are immutable: they can only be set once during\n construction." + }, + "id": 2092, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2077, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2074, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2092, + "src": "2026:18:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2073, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2026:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2076, + "mutability": "mutable", + "name": "symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2092, + "src": "2046:20:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2075, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2046:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2025:42:4" + }, + "returnParameters": { + "id": 2078, + "nodeType": "ParameterList", + "parameters": [], + "src": "2075:0:4" + }, + "scope": 2543, + "src": "2013:141:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2100, + "nodeType": "Block", + "src": "2271:29:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2098, + "name": "_name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2067, + "src": "2288:5:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 2097, + "id": 2099, + "nodeType": "Return", + "src": "2281:12:4" + } + ] + }, + "documentation": { + "id": 2093, + "nodeType": "StructuredDocumentation", + "src": "2160:54:4", + "text": " @dev Returns the name of the token." + }, + "functionSelector": "06fdde03", + "id": 2101, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "name", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2094, + "nodeType": "ParameterList", + "parameters": [], + "src": "2232:2:4" + }, + "returnParameters": { + "id": 2097, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2096, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2101, + "src": "2256:13:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2095, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2256:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2255:15:4" + }, + "scope": 2543, + "src": "2219:81:4", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2109, + "nodeType": "Block", + "src": "2467:31:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2107, + "name": "_symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2069, + "src": "2484:7:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "functionReturnParameters": 2106, + "id": 2108, + "nodeType": "Return", + "src": "2477:14:4" + } + ] + }, + "documentation": { + "id": 2102, + "nodeType": "StructuredDocumentation", + "src": "2306:102:4", + "text": " @dev Returns the symbol of the token, usually a shorter version of the\n name." + }, + "functionSelector": "95d89b41", + "id": 2110, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "symbol", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2103, + "nodeType": "ParameterList", + "parameters": [], + "src": "2428:2:4" + }, + "returnParameters": { + "id": 2106, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2105, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2110, + "src": "2452:13:4", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 2104, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2452:6:4", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2451:15:4" + }, + "scope": 2543, + "src": "2413:85:4", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2118, + "nodeType": "Block", + "src": "3169:33:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2116, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2071, + "src": "3186:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "functionReturnParameters": 2115, + "id": 2117, + "nodeType": "Return", + "src": "3179:16:4" + } + ] + }, + "documentation": { + "id": 2111, + "nodeType": "StructuredDocumentation", + "src": "2504:612:4", + "text": " @dev Returns the number of decimals used to get its user representation.\n For example, if `decimals` equals `2`, a balance of `505` tokens should\n be displayed to a user as `5,05` (`505 / 10 ** 2`).\n Tokens usually opt for a value of 18, imitating the relationship between\n Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\n called.\n NOTE: This information is only used for _display_ purposes: it in\n no way affects any of the arithmetic of the contract, including\n {IERC20-balanceOf} and {IERC20-transfer}." + }, + "functionSelector": "313ce567", + "id": 2119, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "decimals", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2112, + "nodeType": "ParameterList", + "parameters": [], + "src": "3138:2:4" + }, + "returnParameters": { + "id": 2115, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2114, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2119, + "src": "3162:5:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2113, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3162:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3161:7:4" + }, + "scope": 2543, + "src": "3121:81:4", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 4147 + ], + "body": { + "id": 2128, + "nodeType": "Block", + "src": "3324:36:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2126, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2065, + "src": "3341:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2125, + "id": 2127, + "nodeType": "Return", + "src": "3334:19:4" + } + ] + }, + "documentation": { + "id": 2120, + "nodeType": "StructuredDocumentation", + "src": "3208:49:4", + "text": " @dev See {IERC20-totalSupply}." + }, + "functionSelector": "18160ddd", + "id": 2129, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2122, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3297:8:4" + }, + "parameters": { + "id": 2121, + "nodeType": "ParameterList", + "parameters": [], + "src": "3282:2:4" + }, + "returnParameters": { + "id": 2125, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2124, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2129, + "src": "3315:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2123, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3315:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3314:9:4" + }, + "scope": 2543, + "src": "3262:98:4", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 4155 + ], + "body": { + "id": 2142, + "nodeType": "Block", + "src": "3493:42:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2138, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2057, + "src": "3510:9:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2140, + "indexExpression": { + "argumentTypes": null, + "id": 2139, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2132, + "src": "3520:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3510:18:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2137, + "id": 2141, + "nodeType": "Return", + "src": "3503:25:4" + } + ] + }, + "documentation": { + "id": 2130, + "nodeType": "StructuredDocumentation", + "src": "3366:47:4", + "text": " @dev See {IERC20-balanceOf}." + }, + "functionSelector": "70a08231", + "id": 2143, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2134, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3466:8:4" + }, + "parameters": { + "id": 2133, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2132, + "mutability": "mutable", + "name": "account", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2143, + "src": "3437:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2131, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3437:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3436:17:4" + }, + "returnParameters": { + "id": 2137, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2136, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2143, + "src": "3484:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2135, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3484:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3483:9:4" + }, + "scope": 2543, + "src": "3418:117:4", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "baseFunctions": [ + 4165 + ], + "body": { + "id": 2163, + "nodeType": "Block", + "src": "3830:80:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2155, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4126, + "src": "3850:10:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 2156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3850:12:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 2157, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2146, + "src": "3864:9:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2158, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2148, + "src": "3875:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2154, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2364, + "src": "3840:9:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 2159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3840:42:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2160, + "nodeType": "ExpressionStatement", + "src": "3840:42:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2161, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3899:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2153, + "id": 2162, + "nodeType": "Return", + "src": "3892:11:4" + } + ] + }, + "documentation": { + "id": 2144, + "nodeType": "StructuredDocumentation", + "src": "3541:192:4", + "text": " @dev See {IERC20-transfer}.\n Requirements:\n - `recipient` cannot be the zero address.\n - the caller must have a balance of at least `amount`." + }, + "functionSelector": "a9059cbb", + "id": 2164, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2150, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "3806:8:4" + }, + "parameters": { + "id": 2149, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2146, + "mutability": "mutable", + "name": "recipient", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2164, + "src": "3756:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2145, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3756:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2148, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2164, + "src": "3775:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2147, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3775:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3755:35:4" + }, + "returnParameters": { + "id": 2153, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2152, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2164, + "src": "3824:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2151, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3824:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3823:6:4" + }, + "scope": 2543, + "src": "3738:172:4", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 4175 + ], + "body": { + "id": 2181, + "nodeType": "Block", + "src": "4066:51:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2175, + "name": "_allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2063, + "src": "4083:11:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 2177, + "indexExpression": { + "argumentTypes": null, + "id": 2176, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2167, + "src": "4095:5:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4083:18:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2179, + "indexExpression": { + "argumentTypes": null, + "id": 2178, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2169, + "src": "4102:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4083:27:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2174, + "id": 2180, + "nodeType": "Return", + "src": "4076:34:4" + } + ] + }, + "documentation": { + "id": 2165, + "nodeType": "StructuredDocumentation", + "src": "3916:47:4", + "text": " @dev See {IERC20-allowance}." + }, + "functionSelector": "dd62ed3e", + "id": 2182, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2171, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4039:8:4" + }, + "parameters": { + "id": 2170, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2167, + "mutability": "mutable", + "name": "owner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2182, + "src": "3987:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2166, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3987:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2169, + "mutability": "mutable", + "name": "spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2182, + "src": "4002:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2168, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4002:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3986:32:4" + }, + "returnParameters": { + "id": 2174, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2173, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2182, + "src": "4057:7:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2172, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4057:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4056:9:4" + }, + "scope": 2543, + "src": "3968:149:4", + "stateMutability": "view", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 4185 + ], + "body": { + "id": 2202, + "nodeType": "Block", + "src": "4344:77:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2194, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4126, + "src": "4363:10:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 2195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4363:12:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 2196, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2185, + "src": "4377:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2197, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2187, + "src": "4386:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2193, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2520, + "src": "4354:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 2198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4354:39:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2199, + "nodeType": "ExpressionStatement", + "src": "4354:39:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2200, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4410:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2192, + "id": 2201, + "nodeType": "Return", + "src": "4403:11:4" + } + ] + }, + "documentation": { + "id": 2183, + "nodeType": "StructuredDocumentation", + "src": "4123:127:4", + "text": " @dev See {IERC20-approve}.\n Requirements:\n - `spender` cannot be the zero address." + }, + "functionSelector": "095ea7b3", + "id": 2203, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2189, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4320:8:4" + }, + "parameters": { + "id": 2188, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2185, + "mutability": "mutable", + "name": "spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2203, + "src": "4272:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2184, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4272:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2187, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2203, + "src": "4289:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2186, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4289:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4271:33:4" + }, + "returnParameters": { + "id": 2192, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2191, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2203, + "src": "4338:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2190, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4338:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4337:6:4" + }, + "scope": 2543, + "src": "4255:166:4", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "baseFunctions": [ + 4197 + ], + "body": { + "id": 2240, + "nodeType": "Block", + "src": "4993:205:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2217, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2206, + "src": "5013:6:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2218, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2208, + "src": "5021:9:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2219, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2210, + "src": "5032:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2216, + "name": "_transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2364, + "src": "5003:9:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 2220, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5003:36:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2221, + "nodeType": "ExpressionStatement", + "src": "5003:36:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2223, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2206, + "src": "5058:6:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2224, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4126, + "src": "5066:10:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 2225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5066:12:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2233, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2210, + "src": "5118:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365", + "id": 2234, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5126:42:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_974d1b4421da69cc60b481194f0dad36a5bb4e23da810da7a7fb30cdba178330", + "typeString": "literal_string \"ERC20: transfer amount exceeds allowance\"" + }, + "value": "ERC20: transfer amount exceeds allowance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_974d1b4421da69cc60b481194f0dad36a5bb4e23da810da7a7fb30cdba178330", + "typeString": "literal_string \"ERC20: transfer amount exceeds allowance\"" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2226, + "name": "_allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2063, + "src": "5080:11:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 2228, + "indexExpression": { + "argumentTypes": null, + "id": 2227, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2206, + "src": "5092:6:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5080:19:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2231, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2229, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4126, + "src": "5100:10:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 2230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5100:12:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5080:33:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2232, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1914, + "src": "5080:37:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 2235, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5080:89:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2222, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2520, + "src": "5049:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 2236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5049:121:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2237, + "nodeType": "ExpressionStatement", + "src": "5049:121:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2238, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5187:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2215, + "id": 2239, + "nodeType": "Return", + "src": "5180:11:4" + } + ] + }, + "documentation": { + "id": 2204, + "nodeType": "StructuredDocumentation", + "src": "4427:449:4", + "text": " @dev See {IERC20-transferFrom}.\n Emits an {Approval} event indicating the updated allowance. This is not\n required by the EIP. See the note at the beginning of {ERC20};\n Requirements:\n - `sender` and `recipient` cannot be the zero address.\n - `sender` must have a balance of at least `amount`.\n - the caller must have allowance for ``sender``'s tokens of at least\n `amount`." + }, + "functionSelector": "23b872dd", + "id": 2241, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 2212, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "4969:8:4" + }, + "parameters": { + "id": 2211, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2206, + "mutability": "mutable", + "name": "sender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2241, + "src": "4903:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2205, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4903:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2208, + "mutability": "mutable", + "name": "recipient", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2241, + "src": "4919:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2207, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4919:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2210, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2241, + "src": "4938:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2209, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4938:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4902:51:4" + }, + "returnParameters": { + "id": 2215, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2214, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2241, + "src": "4987:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2213, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "4987:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4986:6:4" + }, + "scope": 2543, + "src": "4881:317:4", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 2268, + "nodeType": "Block", + "src": "5687:121:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2252, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4126, + "src": "5706:10:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 2253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5706:12:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 2254, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2244, + "src": "5720:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2262, + "name": "addedValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2246, + "src": "5768:10:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2255, + "name": "_allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2063, + "src": "5729:11:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 2258, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2256, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4126, + "src": "5741:10:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 2257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5741:12:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5729:25:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2260, + "indexExpression": { + "argumentTypes": null, + "id": 2259, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2244, + "src": "5755:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5729:34:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2261, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1869, + "src": "5729:38:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5729:50:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2251, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2520, + "src": "5697:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 2264, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5697:83:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2265, + "nodeType": "ExpressionStatement", + "src": "5697:83:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2266, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5797:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2250, + "id": 2267, + "nodeType": "Return", + "src": "5790:11:4" + } + ] + }, + "documentation": { + "id": 2242, + "nodeType": "StructuredDocumentation", + "src": "5204:384:4", + "text": " @dev Atomically increases the allowance granted to `spender` by the caller.\n This is an alternative to {approve} that can be used as a mitigation for\n problems described in {IERC20-approve}.\n Emits an {Approval} event indicating the updated allowance.\n Requirements:\n - `spender` cannot be the zero address." + }, + "functionSelector": "39509351", + "id": 2269, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "increaseAllowance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2247, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2244, + "mutability": "mutable", + "name": "spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2269, + "src": "5620:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5620:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2246, + "mutability": "mutable", + "name": "addedValue", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2269, + "src": "5637:18:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2245, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5637:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5619:37:4" + }, + "returnParameters": { + "id": 2250, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2249, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2269, + "src": "5681:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2248, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5681:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5680:6:4" + }, + "scope": 2543, + "src": "5593:215:4", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 2297, + "nodeType": "Block", + "src": "6394:167:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2280, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4126, + "src": "6413:10:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 2281, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6413:12:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 2282, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2272, + "src": "6427:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2290, + "name": "subtractedValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2274, + "src": "6475:15:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", + "id": 2291, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6492:39:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8", + "typeString": "literal_string \"ERC20: decreased allowance below zero\"" + }, + "value": "ERC20: decreased allowance below zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_f8b476f7d28209d77d4a4ac1fe36b9f8259aa1bb6bddfa6e89de7e51615cf8a8", + "typeString": "literal_string \"ERC20: decreased allowance below zero\"" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2283, + "name": "_allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2063, + "src": "6436:11:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 2286, + "indexExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2284, + "name": "_msgSender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4126, + "src": "6448:10:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_address_payable_$", + "typeString": "function () view returns (address payable)" + } + }, + "id": 2285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6448:12:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6436:25:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2288, + "indexExpression": { + "argumentTypes": null, + "id": 2287, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2272, + "src": "6462:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6436:34:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2289, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1914, + "src": "6436:38:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 2292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6436:96:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2279, + "name": "_approve", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2520, + "src": "6404:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 2293, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6404:129:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2294, + "nodeType": "ExpressionStatement", + "src": "6404:129:4" + }, + { + "expression": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 2295, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6550:4:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "functionReturnParameters": 2278, + "id": 2296, + "nodeType": "Return", + "src": "6543:11:4" + } + ] + }, + "documentation": { + "id": 2270, + "nodeType": "StructuredDocumentation", + "src": "5814:476:4", + "text": " @dev Atomically decreases the allowance granted to `spender` by the caller.\n This is an alternative to {approve} that can be used as a mitigation for\n problems described in {IERC20-approve}.\n Emits an {Approval} event indicating the updated allowance.\n Requirements:\n - `spender` cannot be the zero address.\n - `spender` must have allowance for the caller of at least\n `subtractedValue`." + }, + "functionSelector": "a457c2d7", + "id": 2298, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "decreaseAllowance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2275, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2272, + "mutability": "mutable", + "name": "spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2298, + "src": "6322:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2271, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6322:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2274, + "mutability": "mutable", + "name": "subtractedValue", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2298, + "src": "6339:23:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2273, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6339:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6321:42:4" + }, + "returnParameters": { + "id": 2278, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2277, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2298, + "src": "6388:4:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2276, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6388:4:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6387:6:4" + }, + "scope": 2543, + "src": "6295:266:4", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "public" + }, + { + "body": { + "id": 2363, + "nodeType": "Block", + "src": "7122:443:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2314, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2309, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2301, + "src": "7140:6:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 2312, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7158:1:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 2311, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7150:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2310, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7150:7:4", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 2313, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7150:10:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "7140:20:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a207472616e736665722066726f6d20746865207a65726f2061646472657373", + "id": 2315, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7162:39:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea", + "typeString": "literal_string \"ERC20: transfer from the zero address\"" + }, + "value": "ERC20: transfer from the zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_baecc556b46f4ed0f2b4cb599d60785ac8563dd2dc0a5bf12edea1c39e5e1fea", + "typeString": "literal_string \"ERC20: transfer from the zero address\"" + } + ], + "id": 2308, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "7132:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2316, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7132:70:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2317, + "nodeType": "ExpressionStatement", + "src": "7132:70:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2324, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2319, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2303, + "src": "7220:9:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 2322, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7241:1:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 2321, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7233:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2320, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7233:7:4", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 2323, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7233:10:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "7220:23:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a207472616e7366657220746f20746865207a65726f2061646472657373", + "id": 2325, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7245:37:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f", + "typeString": "literal_string \"ERC20: transfer to the zero address\"" + }, + "value": "ERC20: transfer to the zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0557e210f7a69a685100a7e4e3d0a7024c546085cee28910fd17d0b081d9516f", + "typeString": "literal_string \"ERC20: transfer to the zero address\"" + } + ], + "id": 2318, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "7212:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7212:71:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2327, + "nodeType": "ExpressionStatement", + "src": "7212:71:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2329, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2301, + "src": "7315:6:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2330, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2303, + "src": "7323:9:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2331, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2305, + "src": "7334:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2328, + "name": "_beforeTokenTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2542, + "src": "7294:20:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 2332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7294:47:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2333, + "nodeType": "ExpressionStatement", + "src": "7294:47:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 2344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2334, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2057, + "src": "7352:9:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2336, + "indexExpression": { + "argumentTypes": null, + "id": 2335, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2301, + "src": "7362:6:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7352:17:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2341, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2305, + "src": "7394:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365", + "id": 2342, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7402:40:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6", + "typeString": "literal_string \"ERC20: transfer amount exceeds balance\"" + }, + "value": "ERC20: transfer amount exceeds balance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_4107e8a8b9e94bf8ff83080ddec1c0bffe897ebc2241b89d44f66b3d274088b6", + "typeString": "literal_string \"ERC20: transfer amount exceeds balance\"" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2337, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2057, + "src": "7372:9:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2339, + "indexExpression": { + "argumentTypes": null, + "id": 2338, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2301, + "src": "7382:6:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7372:17:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1914, + "src": "7372:21:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 2343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7372:71:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7352:91:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2345, + "nodeType": "ExpressionStatement", + "src": "7352:91:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 2355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2346, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2057, + "src": "7453:9:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2348, + "indexExpression": { + "argumentTypes": null, + "id": 2347, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2303, + "src": "7463:9:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7453:20:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2353, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2305, + "src": "7501:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2349, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2057, + "src": "7476:9:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2351, + "indexExpression": { + "argumentTypes": null, + "id": 2350, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2303, + "src": "7486:9:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7476:20:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2352, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1869, + "src": "7476:24:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7476:32:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7453:55:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2356, + "nodeType": "ExpressionStatement", + "src": "7453:55:4" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2358, + "name": "sender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2301, + "src": "7532:6:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2359, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2303, + "src": "7540:9:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2360, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2305, + "src": "7551:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2357, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4206, + "src": "7523:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 2361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7523:35:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2362, + "nodeType": "EmitStatement", + "src": "7518:40:4" + } + ] + }, + "documentation": { + "id": 2299, + "nodeType": "StructuredDocumentation", + "src": "6567:463:4", + "text": " @dev Moves tokens `amount` from `sender` to `recipient`.\n This is internal function is equivalent to {transfer}, and can be used to\n e.g. implement automatic token fees, slashing mechanisms, etc.\n Emits a {Transfer} event.\n Requirements:\n - `sender` cannot be the zero address.\n - `recipient` cannot be the zero address.\n - `sender` must have a balance of at least `amount`." + }, + "id": 2364, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2306, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2301, + "mutability": "mutable", + "name": "sender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2364, + "src": "7054:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2300, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7054:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2303, + "mutability": "mutable", + "name": "recipient", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2364, + "src": "7070:17:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2302, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7070:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2305, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2364, + "src": "7089:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2304, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7089:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7053:51:4" + }, + "returnParameters": { + "id": 2307, + "nodeType": "ParameterList", + "parameters": [], + "src": "7122:0:4" + }, + "scope": 2543, + "src": "7035:530:4", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 2418, + "nodeType": "Block", + "src": "7900:305:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2373, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2367, + "src": "7918:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 2376, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7937:1:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 2375, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7929:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2374, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7929:7:4", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 2377, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7929:10:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "7918:21:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a206d696e7420746f20746865207a65726f2061646472657373", + "id": 2379, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7941:33:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e", + "typeString": "literal_string \"ERC20: mint to the zero address\"" + }, + "value": "ERC20: mint to the zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_fc0b381caf0a47702017f3c4b358ebe3d3aff6c60ce819a8bf3ef5a95d4f202e", + "typeString": "literal_string \"ERC20: mint to the zero address\"" + } + ], + "id": 2372, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "7910:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7910:65:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2381, + "nodeType": "ExpressionStatement", + "src": "7910:65:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 2385, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8015:1:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 2384, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8007:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2383, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8007:7:4", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 2386, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8007:10:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 2387, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2367, + "src": "8019:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2388, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2369, + "src": "8028:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2382, + "name": "_beforeTokenTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2542, + "src": "7986:20:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 2389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7986:49:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2390, + "nodeType": "ExpressionStatement", + "src": "7986:49:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 2396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2391, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2065, + "src": "8046:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2394, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2369, + "src": "8078:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 2392, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2065, + "src": "8061:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1869, + "src": "8061:16:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2395, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8061:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8046:39:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2397, + "nodeType": "ExpressionStatement", + "src": "8046:39:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 2407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2398, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2057, + "src": "8095:9:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2400, + "indexExpression": { + "argumentTypes": null, + "id": 2399, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2367, + "src": "8105:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8095:18:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2405, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2369, + "src": "8139:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2401, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2057, + "src": "8116:9:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2403, + "indexExpression": { + "argumentTypes": null, + "id": 2402, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2367, + "src": "8126:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8116:18:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2404, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1869, + "src": "8116:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8116:30:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8095:51:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2408, + "nodeType": "ExpressionStatement", + "src": "8095:51:4" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 2412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8178:1:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 2411, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8170:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2410, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8170:7:4", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 2413, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8170:10:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 2414, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2367, + "src": "8182:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2415, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2369, + "src": "8191:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2409, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4206, + "src": "8161:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 2416, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8161:37:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2417, + "nodeType": "EmitStatement", + "src": "8156:42:4" + } + ] + }, + "documentation": { + "id": 2365, + "nodeType": "StructuredDocumentation", + "src": "7571:259:4", + "text": "@dev Creates `amount` tokens and assigns them to `account`, increasing\n the total supply.\n Emits a {Transfer} event with `from` set to the zero address.\n Requirements\n - `to` cannot be the zero address." + }, + "id": 2419, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_mint", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2370, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2367, + "mutability": "mutable", + "name": "account", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2419, + "src": "7850:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2366, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7850:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2369, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2419, + "src": "7867:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2368, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7867:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7849:33:4" + }, + "returnParameters": { + "id": 2371, + "nodeType": "ParameterList", + "parameters": [], + "src": "7900:0:4" + }, + "scope": 2543, + "src": "7835:370:4", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 2474, + "nodeType": "Block", + "src": "8589:345:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2433, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2428, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2422, + "src": "8607:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 2431, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8626:1:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 2430, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8618:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2429, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8618:7:4", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 2432, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8618:10:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "8607:21:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a206275726e2066726f6d20746865207a65726f2061646472657373", + "id": 2434, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8630:35:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f", + "typeString": "literal_string \"ERC20: burn from the zero address\"" + }, + "value": "ERC20: burn from the zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b16788493b576042bb52c50ed56189e0b250db113c7bfb1c3897d25cf9632d7f", + "typeString": "literal_string \"ERC20: burn from the zero address\"" + } + ], + "id": 2427, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8599:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2435, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8599:67:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2436, + "nodeType": "ExpressionStatement", + "src": "8599:67:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2438, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2422, + "src": "8698:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 2441, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8715:1:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 2440, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8707:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2439, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8707:7:4", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 2442, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8707:10:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 2443, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2424, + "src": "8719:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2437, + "name": "_beforeTokenTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2542, + "src": "8677:20:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 2444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8677:49:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2445, + "nodeType": "ExpressionStatement", + "src": "8677:49:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 2456, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2446, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2057, + "src": "8737:9:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2448, + "indexExpression": { + "argumentTypes": null, + "id": 2447, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2422, + "src": "8747:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "8737:18:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2453, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2424, + "src": "8781:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a206275726e20616d6f756e7420657863656564732062616c616e6365", + "id": 2454, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8789:36:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_149b126e7125232b4200af45303d04fba8b74653b1a295a6a561a528c33fefdd", + "typeString": "literal_string \"ERC20: burn amount exceeds balance\"" + }, + "value": "ERC20: burn amount exceeds balance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_149b126e7125232b4200af45303d04fba8b74653b1a295a6a561a528c33fefdd", + "typeString": "literal_string \"ERC20: burn amount exceeds balance\"" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2449, + "name": "_balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2057, + "src": "8758:9:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2451, + "indexExpression": { + "argumentTypes": null, + "id": 2450, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2422, + "src": "8768:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8758:18:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2452, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1914, + "src": "8758:22:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 2455, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8758:68:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8737:89:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2457, + "nodeType": "ExpressionStatement", + "src": "8737:89:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 2463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2458, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2065, + "src": "8836:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2461, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2424, + "src": "8868:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 2459, + "name": "_totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2065, + "src": "8851:12:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1886, + "src": "8851:16:4", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 2462, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8851:24:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8836:39:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2464, + "nodeType": "ExpressionStatement", + "src": "8836:39:4" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2466, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2422, + "src": "8899:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 2469, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8916:1:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 2468, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8908:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2467, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8908:7:4", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 2470, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8908:10:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 2471, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2424, + "src": "8920:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2465, + "name": "Transfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4206, + "src": "8890:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 2472, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8890:37:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2473, + "nodeType": "EmitStatement", + "src": "8885:42:4" + } + ] + }, + "documentation": { + "id": 2420, + "nodeType": "StructuredDocumentation", + "src": "8211:308:4", + "text": " @dev Destroys `amount` tokens from `account`, reducing the\n total supply.\n Emits a {Transfer} event with `to` set to the zero address.\n Requirements\n - `account` cannot be the zero address.\n - `account` must have at least `amount` tokens." + }, + "id": 2475, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_burn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2425, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2422, + "mutability": "mutable", + "name": "account", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2475, + "src": "8539:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2421, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8539:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2424, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2475, + "src": "8556:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2423, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8556:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8538:33:4" + }, + "returnParameters": { + "id": 2426, + "nodeType": "ParameterList", + "parameters": [], + "src": "8589:0:4" + }, + "scope": 2543, + "src": "8524:410:4", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 2519, + "nodeType": "Block", + "src": "9442:257:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2491, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2486, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2478, + "src": "9460:5:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 2489, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9477:1:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 2488, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9469:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2487, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9469:7:4", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 2490, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9469:10:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "9460:19:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373", + "id": 2492, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9481:38:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208", + "typeString": "literal_string \"ERC20: approve from the zero address\"" + }, + "value": "ERC20: approve from the zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_c953f4879035ed60e766b34720f656aab5c697b141d924c283124ecedb91c208", + "typeString": "literal_string \"ERC20: approve from the zero address\"" + } + ], + "id": 2485, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "9452:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2493, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9452:68:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2494, + "nodeType": "ExpressionStatement", + "src": "9452:68:4" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 2501, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2496, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2480, + "src": "9538:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 2499, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9557:1:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 2498, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9549:7:4", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 2497, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9549:7:4", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 2500, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9549:10:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "9538:21:4", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "45524332303a20617070726f766520746f20746865207a65726f2061646472657373", + "id": 2502, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "9561:36:4", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029", + "typeString": "literal_string \"ERC20: approve to the zero address\"" + }, + "value": "ERC20: approve to the zero address" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_24883cc5fe64ace9d0df1893501ecb93c77180f0ff69cca79affb3c316dc8029", + "typeString": "literal_string \"ERC20: approve to the zero address\"" + } + ], + "id": 2495, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "9530:7:4", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2503, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9530:68:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2504, + "nodeType": "ExpressionStatement", + "src": "9530:68:4" + }, + { + "expression": { + "argumentTypes": null, + "id": 2511, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 2505, + "name": "_allowances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2063, + "src": "9609:11:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_mapping$_t_address_$_t_uint256_$_$", + "typeString": "mapping(address => mapping(address => uint256))" + } + }, + "id": 2508, + "indexExpression": { + "argumentTypes": null, + "id": 2506, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2478, + "src": "9621:5:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9609:18:4", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 2509, + "indexExpression": { + "argumentTypes": null, + "id": 2507, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2480, + "src": "9628:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "9609:27:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2510, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2482, + "src": "9639:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9609:36:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2512, + "nodeType": "ExpressionStatement", + "src": "9609:36:4" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2514, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2478, + "src": "9669:5:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2515, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2480, + "src": "9676:7:4", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 2516, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2482, + "src": "9685:6:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 2513, + "name": "Approval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4215, + "src": "9660:8:4", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256)" + } + }, + "id": 2517, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9660:32:4", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2518, + "nodeType": "EmitStatement", + "src": "9655:37:4" + } + ] + }, + "documentation": { + "id": 2476, + "nodeType": "StructuredDocumentation", + "src": "8940:414:4", + "text": " @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.\n This is internal function is equivalent to `approve`, and can be used to\n e.g. set automatic allowances for certain subsystems, etc.\n Emits an {Approval} event.\n Requirements:\n - `owner` cannot be the zero address.\n - `spender` cannot be the zero address." + }, + "id": 2520, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2483, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2478, + "mutability": "mutable", + "name": "owner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2520, + "src": "9377:13:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2477, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9377:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2480, + "mutability": "mutable", + "name": "spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2520, + "src": "9392:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2479, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9392:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2482, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2520, + "src": "9409:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2481, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9409:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9376:48:4" + }, + "returnParameters": { + "id": 2484, + "nodeType": "ParameterList", + "parameters": [], + "src": "9442:0:4" + }, + "scope": 2543, + "src": "9359:340:4", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + }, + { + "body": { + "id": 2530, + "nodeType": "Block", + "src": "10072:38:4", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2528, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2526, + "name": "_decimals", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2071, + "src": "10082:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2527, + "name": "decimals_", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2523, + "src": "10094:9:4", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "10082:21:4", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "id": 2529, + "nodeType": "ExpressionStatement", + "src": "10082:21:4" + } + ] + }, + "documentation": { + "id": 2521, + "nodeType": "StructuredDocumentation", + "src": "9705:312:4", + "text": " @dev Sets {decimals} to a value other than the default one of 18.\n WARNING: This function should only be called from the constructor. Most\n applications that interact with token contracts will not expect\n {decimals} to ever change, and may work incorrectly if it does." + }, + "id": 2531, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_setupDecimals", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2524, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2523, + "mutability": "mutable", + "name": "decimals_", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2531, + "src": "10046:15:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "typeName": { + "id": 2522, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "10046:5:4", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10045:17:4" + }, + "returnParameters": { + "id": 2525, + "nodeType": "ParameterList", + "parameters": [], + "src": "10072:0:4" + }, + "scope": 2543, + "src": "10022:88:4", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2541, + "nodeType": "Block", + "src": "10786:3:4", + "statements": [] + }, + "documentation": { + "id": 2532, + "nodeType": "StructuredDocumentation", + "src": "10116:576:4", + "text": " @dev Hook that is called before any transfer of tokens. This includes\n minting and burning.\n Calling conditions:\n - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n will be to transferred to `to`.\n - when `from` is zero, `amount` tokens will be minted for `to`.\n - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n - `from` and `to` are never both zero.\n To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]." + }, + "id": 2542, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_beforeTokenTransfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2539, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2534, + "mutability": "mutable", + "name": "from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2542, + "src": "10727:12:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2533, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10727:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2536, + "mutability": "mutable", + "name": "to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2542, + "src": "10741:10:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2535, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10741:7:4", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2538, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2542, + "src": "10753:14:4", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2537, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10753:7:4", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10726:42:4" + }, + "returnParameters": { + "id": 2540, + "nodeType": "ParameterList", + "parameters": [], + "src": "10786:0:4" + }, + "scope": 2543, + "src": "10697:92:4", + "stateMutability": "nonpayable", + "virtual": true, + "visibility": "internal" + } + ], + "scope": 2544, + "src": "1345:9446:4" + } + ], + "src": "33:10759:4" + }, + "id": 4 + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "exportedSymbols": { + "IERC20": [ + 4216 + ] + }, + "id": 4217, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4140, + "literals": [ + "solidity", + "^", + "0.6", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "33:23:5" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": { + "id": 4141, + "nodeType": "StructuredDocumentation", + "src": "58:70:5", + "text": " @dev Interface of the ERC20 standard as defined in the EIP." + }, + "fullyImplemented": false, + "id": 4216, + "linearizedBaseContracts": [ + 4216 + ], + "name": "IERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": { + "id": 4142, + "nodeType": "StructuredDocumentation", + "src": "152:66:5", + "text": " @dev Returns the amount of tokens in existence." + }, + "functionSelector": "18160ddd", + "id": 4147, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "totalSupply", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4143, + "nodeType": "ParameterList", + "parameters": [], + "src": "243:2:5" + }, + "returnParameters": { + "id": 4146, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4145, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4147, + "src": "269:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4144, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "269:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "268:9:5" + }, + "scope": 4216, + "src": "223:55:5", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": { + "id": 4148, + "nodeType": "StructuredDocumentation", + "src": "284:72:5", + "text": " @dev Returns the amount of tokens owned by `account`." + }, + "functionSelector": "70a08231", + "id": 4155, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4151, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4150, + "mutability": "mutable", + "name": "account", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4155, + "src": "380:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4149, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "380:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "379:17:5" + }, + "returnParameters": { + "id": 4154, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4153, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4155, + "src": "420:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4152, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "420:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "419:9:5" + }, + "scope": 4216, + "src": "361:68:5", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": { + "id": 4156, + "nodeType": "StructuredDocumentation", + "src": "435:209:5", + "text": " @dev Moves `amount` tokens from the caller's account to `recipient`.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event." + }, + "functionSelector": "a9059cbb", + "id": 4165, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4161, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4158, + "mutability": "mutable", + "name": "recipient", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4165, + "src": "667:17:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4157, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "667:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4160, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4165, + "src": "686:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4159, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "686:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "666:35:5" + }, + "returnParameters": { + "id": 4164, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4163, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4165, + "src": "720:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4162, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "720:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "719:6:5" + }, + "scope": 4216, + "src": "649:77:5", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": { + "id": 4166, + "nodeType": "StructuredDocumentation", + "src": "732:264:5", + "text": " @dev Returns the remaining number of tokens that `spender` will be\n allowed to spend on behalf of `owner` through {transferFrom}. This is\n zero by default.\n This value changes when {approve} or {transferFrom} are called." + }, + "functionSelector": "dd62ed3e", + "id": 4175, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4171, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4168, + "mutability": "mutable", + "name": "owner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4175, + "src": "1020:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4167, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1020:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4170, + "mutability": "mutable", + "name": "spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4175, + "src": "1035:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4169, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1035:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1019:32:5" + }, + "returnParameters": { + "id": 4174, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4173, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4175, + "src": "1075:7:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4172, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1075:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1074:9:5" + }, + "scope": 4216, + "src": "1001:83:5", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": { + "id": 4176, + "nodeType": "StructuredDocumentation", + "src": "1090:642:5", + "text": " @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n Returns a boolean value indicating whether the operation succeeded.\n IMPORTANT: Beware that changing an allowance with this method brings the risk\n that someone may use both the old and the new allowance by unfortunate\n transaction ordering. One possible solution to mitigate this race\n condition is to first reduce the spender's allowance to 0 and set the\n desired value afterwards:\n https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n Emits an {Approval} event." + }, + "functionSelector": "095ea7b3", + "id": 4185, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4181, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4178, + "mutability": "mutable", + "name": "spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4185, + "src": "1754:15:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4177, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1754:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4180, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4185, + "src": "1771:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4179, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1771:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1753:33:5" + }, + "returnParameters": { + "id": 4184, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4183, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4185, + "src": "1805:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4182, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1805:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1804:6:5" + }, + "scope": 4216, + "src": "1737:74:5", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": { + "id": 4186, + "nodeType": "StructuredDocumentation", + "src": "1817:296:5", + "text": " @dev Moves `amount` tokens from `sender` to `recipient` using the\n allowance mechanism. `amount` is then deducted from the caller's\n allowance.\n Returns a boolean value indicating whether the operation succeeded.\n Emits a {Transfer} event." + }, + "functionSelector": "23b872dd", + "id": 4197, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4193, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4188, + "mutability": "mutable", + "name": "sender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4197, + "src": "2140:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4187, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2140:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4190, + "mutability": "mutable", + "name": "recipient", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4197, + "src": "2156:17:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4189, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2156:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4192, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4197, + "src": "2175:14:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4191, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2175:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2139:51:5" + }, + "returnParameters": { + "id": 4196, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4195, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4197, + "src": "2209:4:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4194, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2209:4:5", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2208:6:5" + }, + "scope": 4216, + "src": "2118:97:5", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "anonymous": false, + "documentation": { + "id": 4198, + "nodeType": "StructuredDocumentation", + "src": "2221:158:5", + "text": " @dev Emitted when `value` tokens are moved from one account (`from`) to\n another (`to`).\n Note that `value` may be zero." + }, + "id": 4206, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 4205, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4200, + "indexed": true, + "mutability": "mutable", + "name": "from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4206, + "src": "2399:20:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4199, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2399:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4202, + "indexed": true, + "mutability": "mutable", + "name": "to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4206, + "src": "2421:18:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4201, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2421:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4204, + "indexed": false, + "mutability": "mutable", + "name": "value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4206, + "src": "2441:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4203, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2441:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2398:57:5" + }, + "src": "2384:72:5" + }, + { + "anonymous": false, + "documentation": { + "id": 4207, + "nodeType": "StructuredDocumentation", + "src": "2462:148:5", + "text": " @dev Emitted when the allowance of a `spender` for an `owner` is set by\n a call to {approve}. `value` is the new allowance." + }, + "id": 4215, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 4214, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4209, + "indexed": true, + "mutability": "mutable", + "name": "owner", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4215, + "src": "2630:21:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4208, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2630:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4211, + "indexed": true, + "mutability": "mutable", + "name": "spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4215, + "src": "2653:23:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4210, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2653:7:5", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4213, + "indexed": false, + "mutability": "mutable", + "name": "value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4215, + "src": "2678:13:5", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4212, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2678:7:5", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2629:63:5" + }, + "src": "2615:78:5" + } + ], + "scope": 4217, + "src": "129:2566:5" + } + ], + "src": "33:2663:5" + }, + "id": 5 + }, + "@openzeppelin/contracts/token/ERC20/SafeERC20.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol", + "exportedSymbols": { + "SafeERC20": [ + 5316 + ] + }, + "id": 5317, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 5105, + "literals": [ + "solidity", + "^", + "0.6", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "33:23:6" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "file": "./IERC20.sol", + "id": 5106, + "nodeType": "ImportDirective", + "scope": 5317, + "sourceUnit": 4217, + "src": "58:22:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "file": "../../math/SafeMath.sol", + "id": 5107, + "nodeType": "ImportDirective", + "scope": 5317, + "sourceUnit": 2037, + "src": "81:33:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/Address.sol", + "file": "../../utils/Address.sol", + "id": 5108, + "nodeType": "ImportDirective", + "scope": 5317, + "sourceUnit": 4421, + "src": "115:33:6", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": { + "id": 5109, + "nodeType": "StructuredDocumentation", + "src": "150:457:6", + "text": " @title SafeERC20\n @dev Wrappers around ERC20 operations that throw on failure (when the token\n contract returns false). Tokens that return no value (and instead revert or\n throw on failure) are also supported, non-reverting calls are assumed to be\n successful.\n To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n which allows you to call the safe operations as `token.safeTransfer(...)`, etc." + }, + "fullyImplemented": true, + "id": 5316, + "linearizedBaseContracts": [ + 5316 + ], + "name": "SafeERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 5112, + "libraryName": { + "contractScope": null, + "id": 5110, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2036, + "src": "638:8:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$2036", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "632:27:6", + "typeName": { + "id": 5111, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "651:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "id": 5115, + "libraryName": { + "contractScope": null, + "id": 5113, + "name": "Address", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4420, + "src": "670:7:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Address_$4420", + "typeString": "library Address" + } + }, + "nodeType": "UsingForDirective", + "src": "664:26:6", + "typeName": { + "id": 5114, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "682:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + }, + { + "body": { + "id": 5136, + "nodeType": "Block", + "src": "768:103:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5125, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5117, + "src": "798:5:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5128, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5117, + "src": "828:5:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 5129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 4165, + "src": "828:14:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 5130, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "selector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "828:23:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + { + "argumentTypes": null, + "id": 5131, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5119, + "src": "853:2:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 5132, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5121, + "src": "857:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5126, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "805:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 5127, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "805:22:6", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 5133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "805:58:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 5124, + "name": "_callOptionalReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5315, + "src": "778:19:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4216_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (contract IERC20,bytes memory)" + } + }, + "id": 5134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "778:86:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5135, + "nodeType": "ExpressionStatement", + "src": "778:86:6" + } + ] + }, + "documentation": null, + "id": 5137, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 5122, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5117, + "mutability": "mutable", + "name": "token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5137, + "src": "718:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 5116, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "718:6:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5119, + "mutability": "mutable", + "name": "to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5137, + "src": "732:10:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5118, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "732:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5121, + "mutability": "mutable", + "name": "value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5137, + "src": "744:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5120, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "744:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "717:41:6" + }, + "returnParameters": { + "id": 5123, + "nodeType": "ParameterList", + "parameters": [], + "src": "768:0:6" + }, + "scope": 5316, + "src": "696:175:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5161, + "nodeType": "Block", + "src": "967:113:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5149, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5139, + "src": "997:5:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5152, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5139, + "src": "1027:5:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 5153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 4197, + "src": "1027:18:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,address,uint256) external returns (bool)" + } + }, + "id": 5154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "selector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1027:27:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + { + "argumentTypes": null, + "id": 5155, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5141, + "src": "1056:4:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 5156, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5143, + "src": "1062:2:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 5157, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5145, + "src": "1066:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5150, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "1004:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 5151, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1004:22:6", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 5158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1004:68:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 5148, + "name": "_callOptionalReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5315, + "src": "977:19:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4216_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (contract IERC20,bytes memory)" + } + }, + "id": 5159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "977:96:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5160, + "nodeType": "ExpressionStatement", + "src": "977:96:6" + } + ] + }, + "documentation": null, + "id": 5162, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeTransferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 5146, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5139, + "mutability": "mutable", + "name": "token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5162, + "src": "903:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 5138, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "903:6:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5141, + "mutability": "mutable", + "name": "from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5162, + "src": "917:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5140, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "917:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5143, + "mutability": "mutable", + "name": "to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5162, + "src": "931:10:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5142, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "931:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5145, + "mutability": "mutable", + "name": "value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5162, + "src": "943:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5144, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "943:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "902:55:6" + }, + "returnParameters": { + "id": 5147, + "nodeType": "ParameterList", + "parameters": [], + "src": "967:0:6" + }, + "scope": 5316, + "src": "877:203:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5204, + "nodeType": "Block", + "src": "1416:537:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 5188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5173, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5169, + "src": "1705:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5174, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1714:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1705:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 5176, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1704:12:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5181, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "1745:4:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$5316", + "typeString": "library SafeERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_SafeERC20_$5316", + "typeString": "library SafeERC20" + } + ], + "id": 5180, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1737:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5179, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1737:7:6", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 5182, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1737:13:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 5183, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5167, + "src": "1752:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 5177, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5165, + "src": "1721:5:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 5178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 4175, + "src": "1721:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 5184, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1721:39:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5185, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1764:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1721:44:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 5187, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1720:46:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1704:62:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365", + "id": 5189, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1780:56:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", + "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" + }, + "value": "SafeERC20: approve from non-zero to non-zero allowance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ef945ddb1bfdc0da870feb4560d868b047642b4ac7f2fb7f8b7c51cb4a411e25", + "typeString": "literal_string \"SafeERC20: approve from non-zero to non-zero allowance\"" + } + ], + "id": 5172, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1696:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1696:150:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5191, + "nodeType": "ExpressionStatement", + "src": "1696:150:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5193, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5165, + "src": "1876:5:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5196, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5165, + "src": "1906:5:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 5197, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 4185, + "src": "1906:13:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 5198, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "selector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1906:22:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + { + "argumentTypes": null, + "id": 5199, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5167, + "src": "1930:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 5200, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5169, + "src": "1939:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5194, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "1883:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 5195, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1883:22:6", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 5201, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1883:62:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 5192, + "name": "_callOptionalReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5315, + "src": "1856:19:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4216_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (contract IERC20,bytes memory)" + } + }, + "id": 5202, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1856:90:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5203, + "nodeType": "ExpressionStatement", + "src": "1856:90:6" + } + ] + }, + "documentation": { + "id": 5163, + "nodeType": "StructuredDocumentation", + "src": "1086:249:6", + "text": " @dev Deprecated. This function has issues similar to the ones found in\n {IERC20-approve}, and its usage is discouraged.\n Whenever possible, use {safeIncreaseAllowance} and\n {safeDecreaseAllowance} instead." + }, + "id": 5205, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeApprove", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 5170, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5165, + "mutability": "mutable", + "name": "token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5205, + "src": "1361:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 5164, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "1361:6:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5167, + "mutability": "mutable", + "name": "spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5205, + "src": "1375:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5166, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1375:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5169, + "mutability": "mutable", + "name": "value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5205, + "src": "1392:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5168, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1392:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1360:46:6" + }, + "returnParameters": { + "id": 5171, + "nodeType": "ParameterList", + "parameters": [], + "src": "1416:0:6" + }, + "scope": 5316, + "src": "1340:613:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5240, + "nodeType": "Block", + "src": "2045:197:6", + "statements": [ + { + "assignments": [ + 5215 + ], + "declarations": [ + { + "constant": false, + "id": 5215, + "mutability": "mutable", + "name": "newAllowance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5240, + "src": "2055:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5214, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2055:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5227, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5225, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5211, + "src": "2122:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5220, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "2102:4:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$5316", + "typeString": "library SafeERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_SafeERC20_$5316", + "typeString": "library SafeERC20" + } + ], + "id": 5219, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2094:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5218, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2094:7:6", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 5221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2094:13:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 5222, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5209, + "src": "2109:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 5216, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5207, + "src": "2078:5:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 5217, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 4175, + "src": "2078:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 5223, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2078:39:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1869, + "src": "2078:43:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 5226, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2078:50:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2055:73:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5229, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5207, + "src": "2158:5:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5232, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5207, + "src": "2188:5:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 5233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 4185, + "src": "2188:13:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 5234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "selector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2188:22:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + { + "argumentTypes": null, + "id": 5235, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5209, + "src": "2212:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 5236, + "name": "newAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5215, + "src": "2221:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5230, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2165:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 5231, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2165:22:6", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 5237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2165:69:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 5228, + "name": "_callOptionalReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5315, + "src": "2138:19:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4216_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (contract IERC20,bytes memory)" + } + }, + "id": 5238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2138:97:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5239, + "nodeType": "ExpressionStatement", + "src": "2138:97:6" + } + ] + }, + "documentation": null, + "id": 5241, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeIncreaseAllowance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 5212, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5207, + "mutability": "mutable", + "name": "token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5241, + "src": "1990:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 5206, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "1990:6:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5209, + "mutability": "mutable", + "name": "spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5241, + "src": "2004:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5208, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2004:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5211, + "mutability": "mutable", + "name": "value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5241, + "src": "2021:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5210, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2021:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1989:46:6" + }, + "returnParameters": { + "id": 5213, + "nodeType": "ParameterList", + "parameters": [], + "src": "2045:0:6" + }, + "scope": 5316, + "src": "1959:283:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5277, + "nodeType": "Block", + "src": "2334:242:6", + "statements": [ + { + "assignments": [ + 5251 + ], + "declarations": [ + { + "constant": false, + "id": 5251, + "mutability": "mutable", + "name": "newAllowance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5277, + "src": "2344:20:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5250, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2344:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5264, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5261, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5247, + "src": "2411:5:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "5361666545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f", + "id": 5262, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2418:43:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", + "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" + }, + "value": "SafeERC20: decreased allowance below zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_2c3af60974a758b7e72e108c9bf0943ecc9e4f2e8af4695da5f52fbf57a63d3a", + "typeString": "literal_string \"SafeERC20: decreased allowance below zero\"" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5256, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "2391:4:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$5316", + "typeString": "library SafeERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_SafeERC20_$5316", + "typeString": "library SafeERC20" + } + ], + "id": 5255, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2383:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5254, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2383:7:6", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 5257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2383:13:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 5258, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5245, + "src": "2398:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 5252, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "2367:5:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 5253, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "allowance", + "nodeType": "MemberAccess", + "referencedDeclaration": 4175, + "src": "2367:15:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view external returns (uint256)" + } + }, + "id": 5259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2367:39:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1914, + "src": "2367:43:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_string_memory_ptr_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,string memory) pure returns (uint256)" + } + }, + "id": 5263, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2367:95:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2344:118:6" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5266, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "2492:5:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5269, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5243, + "src": "2522:5:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 5270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "approve", + "nodeType": "MemberAccess", + "referencedDeclaration": 4185, + "src": "2522:13:6", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 5271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "selector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2522:22:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + } + }, + { + "argumentTypes": null, + "id": 5272, + "name": "spender", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5245, + "src": "2546:7:6", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 5273, + "name": "newAllowance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5251, + "src": "2555:12:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes4", + "typeString": "bytes4" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5267, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2499:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 5268, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSelector", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2499:22:6", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithselector_pure$_t_bytes4_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (bytes4) pure returns (bytes memory)" + } + }, + "id": 5274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2499:69:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 5265, + "name": "_callOptionalReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5315, + "src": "2472:19:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4216_$_t_bytes_memory_ptr_$returns$__$", + "typeString": "function (contract IERC20,bytes memory)" + } + }, + "id": 5275, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2472:97:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5276, + "nodeType": "ExpressionStatement", + "src": "2472:97:6" + } + ] + }, + "documentation": null, + "id": 5278, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "safeDecreaseAllowance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 5248, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5243, + "mutability": "mutable", + "name": "token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5278, + "src": "2279:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 5242, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "2279:6:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5245, + "mutability": "mutable", + "name": "spender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5278, + "src": "2293:15:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 5244, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2293:7:6", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5247, + "mutability": "mutable", + "name": "value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5278, + "src": "2310:13:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5246, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2310:7:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2278:46:6" + }, + "returnParameters": { + "id": 5249, + "nodeType": "ParameterList", + "parameters": [], + "src": "2334:0:6" + }, + "scope": 5316, + "src": "2248:328:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5314, + "nodeType": "Block", + "src": "3029:681:6", + "statements": [ + { + "assignments": [ + 5287 + ], + "declarations": [ + { + "constant": false, + "id": 5287, + "mutability": "mutable", + "name": "returndata", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5314, + "src": "3378:23:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5286, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3378:5:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5296, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5293, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5283, + "src": "3432:4:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "hexValue": "5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564", + "id": 5294, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3438:34:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", + "typeString": "literal_string \"SafeERC20: low-level call failed\"" + }, + "value": "SafeERC20: low-level call failed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_stringliteral_47fb62c2c272651d2f0f342bac006756b8ba07f21cc5cb87e0fbb9d50c0c585b", + "typeString": "literal_string \"SafeERC20: low-level call failed\"" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5290, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5281, + "src": "3412:5:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + ], + "id": 5289, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3404:7:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 5288, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3404:7:6", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 5291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3404:14:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 5292, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "functionCall", + "nodeType": "MemberAccess", + "referencedDeclaration": 4316, + "src": "3404:27:6", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$bound_to$_t_address_$", + "typeString": "function (address,bytes memory,string memory) returns (bytes memory)" + } + }, + "id": 5295, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3404:69:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3378:95:6" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5300, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5297, + "name": "returndata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5287, + "src": "3487:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 5298, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3487:17:6", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5299, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3507:1:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3487:21:6", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5313, + "nodeType": "IfStatement", + "src": "3483:221:6", + "trueBody": { + "id": 5312, + "nodeType": "Block", + "src": "3510:194:6", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5304, + "name": "returndata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5287, + "src": "3627:10:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 5306, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3640:4:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + }, + "typeName": { + "id": 5305, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3640:4:6", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + } + ], + "id": 5307, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "3639:6:6", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bool_$", + "typeString": "type(bool)" + } + ], + "expression": { + "argumentTypes": null, + "id": 5302, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "3616:3:6", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 5303, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3616:10:6", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 5308, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3616:30:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564", + "id": 5309, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3648:44:6", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", + "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" + }, + "value": "SafeERC20: ERC20 operation did not succeed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e11ad79d1e4a7f2e5f376964cb99e8e8f7904e3fc16a109f7a7ecb9aa7956dcd", + "typeString": "literal_string \"SafeERC20: ERC20 operation did not succeed\"" + } + ], + "id": 5301, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3608:7:6", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5310, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3608:85:6", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5311, + "nodeType": "ExpressionStatement", + "src": "3608:85:6" + } + ] + } + } + ] + }, + "documentation": { + "id": 5279, + "nodeType": "StructuredDocumentation", + "src": "2582:372:6", + "text": " @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n on the return value: the return value is optional (but if data is returned, it must not be false).\n @param token The token targeted by the call.\n @param data The call data (encoded using abi.encode or one of its variants)." + }, + "id": 5315, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_callOptionalReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 5284, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5281, + "mutability": "mutable", + "name": "token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5315, + "src": "2988:12:6", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 5280, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "2988:6:6", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5283, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5315, + "src": "3002:17:6", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 5282, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3002:5:6", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2987:33:6" + }, + "returnParameters": { + "id": 5285, + "nodeType": "ParameterList", + "parameters": [], + "src": "3029:0:6" + }, + "scope": 5316, + "src": "2959:751:6", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + } + ], + "scope": 5317, + "src": "608:3104:6" + } + ], + "src": "33:3680:6" + }, + "id": 6 + }, + "@openzeppelin/contracts/utils/Address.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/utils/Address.sol", + "exportedSymbols": { + "Address": [ + 4420 + ] + }, + "id": 4421, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4218, + "literals": [ + "solidity", + "^", + "0.6", + ".2" + ], + "nodeType": "PragmaDirective", + "src": "33:23:7" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": { + "id": 4219, + "nodeType": "StructuredDocumentation", + "src": "58:67:7", + "text": " @dev Collection of functions related to the address type" + }, + "fullyImplemented": true, + "id": 4420, + "linearizedBaseContracts": [ + 4420 + ], + "name": "Address", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 4244, + "nodeType": "Block", + "src": "784:544:7", + "statements": [ + { + "assignments": [ + 4228 + ], + "declarations": [ + { + "constant": false, + "id": 4228, + "mutability": "mutable", + "name": "codehash", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4244, + "src": "1036:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4227, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1036:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4229, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "1036:16:7" + }, + { + "assignments": [ + 4231 + ], + "declarations": [ + { + "constant": false, + "id": 4231, + "mutability": "mutable", + "name": "accountHash", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4244, + "src": "1062:19:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "typeName": { + "id": 4230, + "name": "bytes32", + "nodeType": "ElementaryTypeName", + "src": "1062:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4233, + "initialValue": { + "argumentTypes": null, + "hexValue": "307863356432343630313836663732333363393237653764623264636337303363306535303062363533636138323237336237626661643830343564383561343730", + "id": 4232, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1084:66:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_89477152217924674838424037953991966239322087453347756267410168184682657981552_by_1", + "typeString": "int_const 8947...(69 digits omitted)...1552" + }, + "value": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470" + }, + "nodeType": "VariableDeclarationStatement", + "src": "1062:88:7" + }, + { + "AST": { + "nodeType": "YulBlock", + "src": "1225:36:7", + "statements": [ + { + "nodeType": "YulAssignment", + "src": "1227:32:7", + "value": { + "arguments": [ + { + "name": "account", + "nodeType": "YulIdentifier", + "src": "1251:7:7" + } + ], + "functionName": { + "name": "extcodehash", + "nodeType": "YulIdentifier", + "src": "1239:11:7" + }, + "nodeType": "YulFunctionCall", + "src": "1239:20:7" + }, + "variableNames": [ + { + "name": "codehash", + "nodeType": "YulIdentifier", + "src": "1227:8:7" + } + ] + } + ] + }, + "evmVersion": "istanbul", + "externalReferences": [ + { + "declaration": 4222, + "isOffset": false, + "isSlot": false, + "src": "1251:7:7", + "valueSize": 1 + }, + { + "declaration": 4228, + "isOffset": false, + "isSlot": false, + "src": "1227:8:7", + "valueSize": 1 + } + ], + "id": 4234, + "nodeType": "InlineAssembly", + "src": "1216:45:7" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 4241, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 4237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4235, + "name": "codehash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4228, + "src": "1278:8:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 4236, + "name": "accountHash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4231, + "src": "1290:11:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "1278:23:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 4240, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4238, + "name": "codehash", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4228, + "src": "1305:8:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "307830", + "id": 4239, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1317:3:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0x0" + }, + "src": "1305:15:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "1278:42:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 4242, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "1277:44:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 4226, + "id": 4243, + "nodeType": "Return", + "src": "1270:51:7" + } + ] + }, + "documentation": { + "id": 4220, + "nodeType": "StructuredDocumentation", + "src": "148:565:7", + "text": " @dev Returns true if `account` is a contract.\n [IMPORTANT]\n ====\n It is unsafe to assume that an address for which this function returns\n false is an externally-owned account (EOA) and not a contract.\n Among others, `isContract` will return false for the following\n types of addresses:\n - an externally-owned account\n - a contract in construction\n - an address where a contract will be created\n - an address where a contract lived, but was destroyed\n ====" + }, + "id": 4245, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isContract", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4223, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4222, + "mutability": "mutable", + "name": "account", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4245, + "src": "738:15:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4221, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "738:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "737:17:7" + }, + "returnParameters": { + "id": 4226, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4225, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4245, + "src": "778:4:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4224, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "778:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "777:6:7" + }, + "scope": 4420, + "src": "718:610:7", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4278, + "nodeType": "Block", + "src": "2316:320:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4256, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "2342:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Address_$4420", + "typeString": "library Address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Address_$4420", + "typeString": "library Address" + } + ], + "id": 4255, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2334:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4254, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2334:7:7", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 4257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2334:13:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4258, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2334:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 4259, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4250, + "src": "2359:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2334:31:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "416464726573733a20696e73756666696369656e742062616c616e6365", + "id": 4261, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2367:31:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", + "typeString": "literal_string \"Address: insufficient balance\"" + }, + "value": "Address: insufficient balance" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_5597a22abd0ef5332f8053862eb236db7590f17e2b93a53f63a103becfb561f9", + "typeString": "literal_string \"Address: insufficient balance\"" + } + ], + "id": 4253, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2326:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4262, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2326:73:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4263, + "nodeType": "ExpressionStatement", + "src": "2326:73:7" + }, + { + "assignments": [ + 4265, + null + ], + "declarations": [ + { + "constant": false, + "id": 4265, + "mutability": "mutable", + "name": "success", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4278, + "src": "2488:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4264, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2488:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + null + ], + "id": 4272, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "", + "id": 4270, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2538:2:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + }, + "value": "" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", + "typeString": "literal_string \"\"" + } + ], + "expression": { + "argumentTypes": null, + "id": 4266, + "name": "recipient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4248, + "src": "2506:9:7", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 4267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2506:14:7", + "typeDescriptions": { + "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory) payable returns (bool,bytes memory)" + } + }, + "id": 4269, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "argumentTypes": null, + "id": 4268, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4250, + "src": "2529:6:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "src": "2506:31:7", + "typeDescriptions": { + "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value", + "typeString": "function (bytes memory) payable returns (bool,bytes memory)" + } + }, + "id": 4271, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2506:35:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2487:54:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4274, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4265, + "src": "2559:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "416464726573733a20756e61626c6520746f2073656e642076616c75652c20726563697069656e74206d61792068617665207265766572746564", + "id": 4275, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2568:60:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", + "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" + }, + "value": "Address: unable to send value, recipient may have reverted" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_51ddaa38748c0a1144620fb5bfe8edab31ea437571ad591a7734bbfd0429aeae", + "typeString": "literal_string \"Address: unable to send value, recipient may have reverted\"" + } + ], + "id": 4273, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2551:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2551:78:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4277, + "nodeType": "ExpressionStatement", + "src": "2551:78:7" + } + ] + }, + "documentation": { + "id": 4246, + "nodeType": "StructuredDocumentation", + "src": "1334:906:7", + "text": " @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n `recipient`, forwarding all available gas and reverting on errors.\n https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n of certain opcodes, possibly making contracts go over the 2300 gas limit\n imposed by `transfer`, making them unable to receive funds via\n `transfer`. {sendValue} removes this limitation.\n https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n IMPORTANT: because control is transferred to `recipient`, care must be\n taken to not create reentrancy vulnerabilities. Consider using\n {ReentrancyGuard} or the\n https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]." + }, + "id": 4279, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sendValue", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4251, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4248, + "mutability": "mutable", + "name": "recipient", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4279, + "src": "2264:25:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 4247, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2264:15:7", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4250, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4279, + "src": "2291:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4249, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2291:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2263:43:7" + }, + "returnParameters": { + "id": 4252, + "nodeType": "ParameterList", + "parameters": [], + "src": "2316:0:7" + }, + "scope": 4420, + "src": "2245:391:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4295, + "nodeType": "Block", + "src": "3466:82:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4290, + "name": "target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4282, + "src": "3494:6:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4291, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4284, + "src": "3502:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "hexValue": "416464726573733a206c6f772d6c6576656c2063616c6c206661696c6564", + "id": 4292, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3508:32:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_24d7ab5d382116e64324f19950ca9340b8af1ddeb09a8d026e0a3c6a01dcc9df", + "typeString": "literal_string \"Address: low-level call failed\"" + }, + "value": "Address: low-level call failed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_stringliteral_24d7ab5d382116e64324f19950ca9340b8af1ddeb09a8d026e0a3c6a01dcc9df", + "typeString": "literal_string \"Address: low-level call failed\"" + } + ], + "id": 4289, + "name": "functionCall", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4296, + 4316 + ], + "referencedDeclaration": 4316, + "src": "3481:12:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (address,bytes memory,string memory) returns (bytes memory)" + } + }, + "id": 4293, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3481:60:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "functionReturnParameters": 4288, + "id": 4294, + "nodeType": "Return", + "src": "3474:67:7" + } + ] + }, + "documentation": { + "id": 4280, + "nodeType": "StructuredDocumentation", + "src": "2642:730:7", + "text": " @dev Performs a Solidity function call using a low level `call`. A\n plain`call` is an unsafe replacement for a function call: use this\n function instead.\n If `target` reverts with a revert reason, it is bubbled up by this\n function (like regular Solidity function calls).\n Returns the raw returned data. To convert to the expected return value,\n use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n Requirements:\n - `target` must be a contract.\n - calling `target` with `data` must not revert.\n _Available since v3.1._" + }, + "id": 4296, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "functionCall", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4285, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4282, + "mutability": "mutable", + "name": "target", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4296, + "src": "3399:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4281, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3399:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4284, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4296, + "src": "3415:17:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4283, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3415:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3398:35:7" + }, + "returnParameters": { + "id": 4288, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4287, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4296, + "src": "3452:12:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4286, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3452:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3451:14:7" + }, + "scope": 4420, + "src": "3377:171:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4315, + "nodeType": "Block", + "src": "3887:77:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4309, + "name": "target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4299, + "src": "3927:6:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4310, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4301, + "src": "3935:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "hexValue": "30", + "id": 4311, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3941:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + { + "argumentTypes": null, + "id": 4312, + "name": "errorMessage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4303, + "src": "3944:12:7", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 4308, + "name": "_functionCallWithValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4419, + "src": "3904:22:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (address,bytes memory,uint256,string memory) returns (bytes memory)" + } + }, + "id": 4313, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3904:53:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "functionReturnParameters": 4307, + "id": 4314, + "nodeType": "Return", + "src": "3897:60:7" + } + ] + }, + "documentation": { + "id": 4297, + "nodeType": "StructuredDocumentation", + "src": "3554:211:7", + "text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n `errorMessage` as a fallback revert reason when `target` reverts.\n _Available since v3.1._" + }, + "id": 4316, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "functionCall", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4304, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4299, + "mutability": "mutable", + "name": "target", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4316, + "src": "3792:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4298, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3792:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4301, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4316, + "src": "3808:17:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4300, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3808:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4303, + "mutability": "mutable", + "name": "errorMessage", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4316, + "src": "3827:26:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4302, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3827:6:7", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3791:63:7" + }, + "returnParameters": { + "id": 4307, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4306, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4316, + "src": "3873:12:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4305, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3873:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3872:14:7" + }, + "scope": 4420, + "src": "3770:194:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4335, + "nodeType": "Block", + "src": "4439:111:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4329, + "name": "target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4319, + "src": "4478:6:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4330, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4321, + "src": "4486:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "id": 4331, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4323, + "src": "4492:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "416464726573733a206c6f772d6c6576656c2063616c6c20776974682076616c7565206661696c6564", + "id": 4332, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4499:43:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_88a4a0b5e975840320a0475d4027005235904fdb5ece94df156f3d717cb2dbfc", + "typeString": "literal_string \"Address: low-level call with value failed\"" + }, + "value": "Address: low-level call with value failed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_stringliteral_88a4a0b5e975840320a0475d4027005235904fdb5ece94df156f3d717cb2dbfc", + "typeString": "literal_string \"Address: low-level call with value failed\"" + } + ], + "id": 4328, + "name": "functionCallWithValue", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 4336, + 4369 + ], + "referencedDeclaration": 4369, + "src": "4456:21:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (address,bytes memory,uint256,string memory) returns (bytes memory)" + } + }, + "id": 4333, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4456:87:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "functionReturnParameters": 4327, + "id": 4334, + "nodeType": "Return", + "src": "4449:94:7" + } + ] + }, + "documentation": { + "id": 4317, + "nodeType": "StructuredDocumentation", + "src": "3970:351:7", + "text": " @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n but also transferring `value` wei to `target`.\n Requirements:\n - the calling contract must have an ETH balance of at least `value`.\n - the called Solidity function must be `payable`.\n _Available since v3.1._" + }, + "id": 4336, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "functionCallWithValue", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4324, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4319, + "mutability": "mutable", + "name": "target", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4336, + "src": "4357:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4318, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4357:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4321, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4336, + "src": "4373:17:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4320, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4373:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4323, + "mutability": "mutable", + "name": "value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4336, + "src": "4392:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4322, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4392:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4356:50:7" + }, + "returnParameters": { + "id": 4327, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4326, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4336, + "src": "4425:12:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4325, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4425:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4424:14:7" + }, + "scope": 4420, + "src": "4326:224:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4368, + "nodeType": "Block", + "src": "4939:172:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4357, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4353, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "4965:4:7", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Address_$4420", + "typeString": "library Address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Address_$4420", + "typeString": "library Address" + } + ], + "id": 4352, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4957:7:7", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 4351, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4957:7:7", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 4354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4957:13:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4957:21:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 4356, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4343, + "src": "4982:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4957:30:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c", + "id": 4358, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4989:40:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c", + "typeString": "literal_string \"Address: insufficient balance for call\"" + }, + "value": "Address: insufficient balance for call" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_565f1a77334fc4792800921178c71e4521acffab18ff9e7885b49377ee80ab4c", + "typeString": "literal_string \"Address: insufficient balance for call\"" + } + ], + "id": 4350, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4949:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4949:81:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4360, + "nodeType": "ExpressionStatement", + "src": "4949:81:7" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4362, + "name": "target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4339, + "src": "5070:6:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4363, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4341, + "src": "5078:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "id": 4364, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4343, + "src": "5084:5:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4365, + "name": "errorMessage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4345, + "src": "5091:12:7", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 4361, + "name": "_functionCallWithValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4419, + "src": "5047:22:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$_t_uint256_$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (address,bytes memory,uint256,string memory) returns (bytes memory)" + } + }, + "id": 4366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5047:57:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "functionReturnParameters": 4349, + "id": 4367, + "nodeType": "Return", + "src": "5040:64:7" + } + ] + }, + "documentation": { + "id": 4337, + "nodeType": "StructuredDocumentation", + "src": "4556:237:7", + "text": " @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n with `errorMessage` as a fallback revert reason when `target` reverts.\n _Available since v3.1._" + }, + "id": 4369, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "functionCallWithValue", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4346, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4339, + "mutability": "mutable", + "name": "target", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4369, + "src": "4829:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4338, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4829:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4341, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4369, + "src": "4845:17:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4340, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4845:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4343, + "mutability": "mutable", + "name": "value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4369, + "src": "4864:13:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4342, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4864:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4345, + "mutability": "mutable", + "name": "errorMessage", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4369, + "src": "4879:26:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4344, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4879:6:7", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4828:78:7" + }, + "returnParameters": { + "id": 4349, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4348, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4369, + "src": "4925:12:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4347, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "4925:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4924:14:7" + }, + "scope": 4420, + "src": "4798:313:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4418, + "nodeType": "Block", + "src": "5261:814:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4384, + "name": "target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4371, + "src": "5290:6:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 4383, + "name": "isContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4245, + "src": "5279:10:7", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view returns (bool)" + } + }, + "id": 4385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5279:18:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374", + "id": 4386, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5299:31:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad", + "typeString": "literal_string \"Address: call to non-contract\"" + }, + "value": "Address: call to non-contract" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_cc2e4e38850b7c0a3e942cfed89b71c77302df25bcb2ec297a0c4ff9ff6b90ad", + "typeString": "literal_string \"Address: call to non-contract\"" + } + ], + "id": 4382, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5271:7:7", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5271:60:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4388, + "nodeType": "ExpressionStatement", + "src": "5271:60:7" + }, + { + "assignments": [ + 4390, + 4392 + ], + "declarations": [ + { + "constant": false, + "id": 4390, + "mutability": "mutable", + "name": "success", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4418, + "src": "5402:12:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4389, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5402:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4392, + "mutability": "mutable", + "name": "returndata", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4418, + "src": "5416:23:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4391, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5416:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4399, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4397, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4373, + "src": "5474:4:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 4393, + "name": "target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4371, + "src": "5443:6:7", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 4394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "call", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5443:11:7", + "typeDescriptions": { + "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory) payable returns (bool,bytes memory)" + } + }, + "id": 4396, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "argumentTypes": null, + "id": 4395, + "name": "weiValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4375, + "src": "5463:8:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "src": "5443:30:7", + "typeDescriptions": { + "typeIdentifier": "t_function_barecall_payable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$value", + "typeString": "function (bytes memory) payable returns (bool,bytes memory)" + } + }, + "id": 4398, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5443:36:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5401:78:7" + }, + { + "condition": { + "argumentTypes": null, + "id": 4400, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4390, + "src": "5493:7:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 4416, + "nodeType": "Block", + "src": "5550:519:7", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4404, + "name": "returndata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4392, + "src": "5634:10:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 4405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5634:17:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 4406, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5654:1:7", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5634:21:7", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 4414, + "nodeType": "Block", + "src": "6006:53:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4411, + "name": "errorMessage", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4377, + "src": "6031:12:7", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 4410, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "6024:6:7", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 4412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6024:20:7", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4413, + "nodeType": "ExpressionStatement", + "src": "6024:20:7" + } + ] + }, + "id": 4415, + "nodeType": "IfStatement", + "src": "5630:429:7", + "trueBody": { + "id": 4409, + "nodeType": "Block", + "src": "5657:343:7", + "statements": [ + { + "AST": { + "nodeType": "YulBlock", + "src": "5841:145:7", + "statements": [ + { + "nodeType": "YulVariableDeclaration", + "src": "5863:40:7", + "value": { + "arguments": [ + { + "name": "returndata", + "nodeType": "YulIdentifier", + "src": "5892:10:7" + } + ], + "functionName": { + "name": "mload", + "nodeType": "YulIdentifier", + "src": "5886:5:7" + }, + "nodeType": "YulFunctionCall", + "src": "5886:17:7" + }, + "variables": [ + { + "name": "returndata_size", + "nodeType": "YulTypedName", + "src": "5867:15:7", + "type": "" + } + ] + }, + { + "expression": { + "arguments": [ + { + "arguments": [ + { + "kind": "number", + "nodeType": "YulLiteral", + "src": "5935:2:7", + "type": "", + "value": "32" + }, + { + "name": "returndata", + "nodeType": "YulIdentifier", + "src": "5939:10:7" + } + ], + "functionName": { + "name": "add", + "nodeType": "YulIdentifier", + "src": "5931:3:7" + }, + "nodeType": "YulFunctionCall", + "src": "5931:19:7" + }, + { + "name": "returndata_size", + "nodeType": "YulIdentifier", + "src": "5952:15:7" + } + ], + "functionName": { + "name": "revert", + "nodeType": "YulIdentifier", + "src": "5924:6:7" + }, + "nodeType": "YulFunctionCall", + "src": "5924:44:7" + }, + "nodeType": "YulExpressionStatement", + "src": "5924:44:7" + } + ] + }, + "evmVersion": "istanbul", + "externalReferences": [ + { + "declaration": 4392, + "isOffset": false, + "isSlot": false, + "src": "5892:10:7", + "valueSize": 1 + }, + { + "declaration": 4392, + "isOffset": false, + "isSlot": false, + "src": "5939:10:7", + "valueSize": 1 + } + ], + "id": 4408, + "nodeType": "InlineAssembly", + "src": "5832:154:7" + } + ] + } + } + ] + }, + "id": 4417, + "nodeType": "IfStatement", + "src": "5489:580:7", + "trueBody": { + "id": 4403, + "nodeType": "Block", + "src": "5502:42:7", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4401, + "name": "returndata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4392, + "src": "5523:10:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "functionReturnParameters": 4381, + "id": 4402, + "nodeType": "Return", + "src": "5516:17:7" + } + ] + } + } + ] + }, + "documentation": null, + "id": 4419, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_functionCallWithValue", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4378, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4371, + "mutability": "mutable", + "name": "target", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4419, + "src": "5149:14:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4370, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5149:7:7", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4373, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4419, + "src": "5165:17:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4372, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5165:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4375, + "mutability": "mutable", + "name": "weiValue", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4419, + "src": "5184:16:7", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4374, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5184:7:7", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4377, + "mutability": "mutable", + "name": "errorMessage", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4419, + "src": "5202:26:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 4376, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5202:6:7", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5148:81:7" + }, + "returnParameters": { + "id": 4381, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4380, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4419, + "src": "5247:12:7", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 4379, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "5247:5:7", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5246:14:7" + }, + "scope": 4420, + "src": "5117:958:7", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + } + ], + "scope": 4421, + "src": "126:5951:7" + } + ], + "src": "33:6045:7" + }, + "id": 7 + }, + "@openzeppelin/contracts/utils/ReentrancyGuard.sol": { + "ast": { + "absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", + "exportedSymbols": { + "ReentrancyGuard": [ + 4569 + ] + }, + "id": 4570, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4531, + "literals": [ + "solidity", + "^", + "0.6", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "33:23:8" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": { + "id": 4532, + "nodeType": "StructuredDocumentation", + "src": "58:750:8", + "text": " @dev Contract module that helps prevent reentrant calls to a function.\n Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n available, which can be applied to functions to make sure there are no nested\n (reentrant) calls to them.\n Note that because there is a single `nonReentrant` guard, functions marked as\n `nonReentrant` may not call one another. This can be worked around by making\n those functions `private`, and then adding `external` `nonReentrant` entry\n points to them.\n TIP: If you would like to learn more about reentrancy and alternative ways\n to protect against it, check out our blog post\n https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]." + }, + "fullyImplemented": true, + "id": 4569, + "linearizedBaseContracts": [ + 4569 + ], + "name": "ReentrancyGuard", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 4535, + "mutability": "constant", + "name": "_NOT_ENTERED", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4569, + "src": "1588:41:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4533, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1588:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "31", + "id": 4534, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1628:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "visibility": "private" + }, + { + "constant": true, + "id": 4538, + "mutability": "constant", + "name": "_ENTERED", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4569, + "src": "1635:37:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4536, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1635:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "32", + "id": 4537, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1671:1:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "visibility": "private" + }, + { + "constant": false, + "id": 4540, + "mutability": "mutable", + "name": "_status", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4569, + "src": "1679:23:8", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4539, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1679:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 4547, + "nodeType": "Block", + "src": "1733:39:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 4543, + "name": "_status", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4540, + "src": "1743:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 4544, + "name": "_NOT_ENTERED", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4535, + "src": "1753:12:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1743:22:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4546, + "nodeType": "ExpressionStatement", + "src": "1743:22:8" + } + ] + }, + "documentation": null, + "id": 4548, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4541, + "nodeType": "ParameterList", + "parameters": [], + "src": "1721:2:8" + }, + "returnParameters": { + "id": 4542, + "nodeType": "ParameterList", + "parameters": [], + "src": "1733:0:8" + }, + "scope": 4569, + "src": "1709:63:8", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4567, + "nodeType": "Block", + "src": "2171:421:8", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4554, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4552, + "name": "_status", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4540, + "src": "2260:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 4553, + "name": "_ENTERED", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4538, + "src": "2271:8:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2260:19:8", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "5265656e7472616e637947756172643a207265656e7472616e742063616c6c", + "id": 4555, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2281:33:8", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_ebf73bba305590e4764d5cb53b69bffd6d4d092d1a67551cb346f8cfcdab8619", + "typeString": "literal_string \"ReentrancyGuard: reentrant call\"" + }, + "value": "ReentrancyGuard: reentrant call" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_ebf73bba305590e4764d5cb53b69bffd6d4d092d1a67551cb346f8cfcdab8619", + "typeString": "literal_string \"ReentrancyGuard: reentrant call\"" + } + ], + "id": 4551, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2252:7:8", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 4556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2252:63:8", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4557, + "nodeType": "ExpressionStatement", + "src": "2252:63:8" + }, + { + "expression": { + "argumentTypes": null, + "id": 4560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 4558, + "name": "_status", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4540, + "src": "2390:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 4559, + "name": "_ENTERED", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4538, + "src": "2400:8:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2390:18:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4561, + "nodeType": "ExpressionStatement", + "src": "2390:18:8" + }, + { + "id": 4562, + "nodeType": "PlaceholderStatement", + "src": "2419:1:8" + }, + { + "expression": { + "argumentTypes": null, + "id": 4565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 4563, + "name": "_status", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4540, + "src": "2563:7:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 4564, + "name": "_NOT_ENTERED", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4535, + "src": "2573:12:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2563:22:8", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4566, + "nodeType": "ExpressionStatement", + "src": "2563:22:8" + } + ] + }, + "documentation": { + "id": 4549, + "nodeType": "StructuredDocumentation", + "src": "1778:364:8", + "text": " @dev Prevents a contract from calling itself, directly or indirectly.\n Calling a `nonReentrant` function from another `nonReentrant`\n function is not supported. It is possible to prevent this from happening\n by making the `nonReentrant` function external, and make it call a\n `private` function that does the actual work." + }, + "id": 4568, + "name": "nonReentrant", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 4550, + "nodeType": "ParameterList", + "parameters": [], + "src": "2168:2:8" + }, + "src": "2147:445:8", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 4570, + "src": "809:1785:8" + } + ], + "src": "33:2562:8" + }, + "id": 8 + }, + "Users/k06a/Projects/mooniswap-v2/contracts/Mooniswap.sol": { + "ast": { + "absolutePath": "Users/k06a/Projects/mooniswap-v2/contracts/Mooniswap.sol", + "exportedSymbols": { + "Mooniswap": [ + 1767 + ] + }, + "id": 1768, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.6", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "33:23:9" + }, + { + "absolutePath": "@openzeppelin/contracts/math/Math.sol", + "file": "@openzeppelin/contracts/math/Math.sol", + "id": 2, + "nodeType": "ImportDirective", + "scope": 1768, + "sourceUnit": 1841, + "src": "58:47:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "file": "@openzeppelin/contracts/math/SafeMath.sol", + "id": 3, + "nodeType": "ImportDirective", + "scope": 1768, + "sourceUnit": 2037, + "src": "106:51:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/ERC20.sol", + "file": "@openzeppelin/contracts/token/ERC20/ERC20.sol", + "id": 4, + "nodeType": "ImportDirective", + "scope": 1768, + "sourceUnit": 2544, + "src": "158:55:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IFeeCollector.sol", + "file": "./interfaces/IFeeCollector.sol", + "id": 5, + "nodeType": "ImportDirective", + "scope": 1768, + "sourceUnit": 3438, + "src": "214:40:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "Users/k06a/Projects/mooniswap-v2/contracts/libraries/UniERC20.sol", + "file": "./libraries/UniERC20.sol", + "id": 6, + "nodeType": "ImportDirective", + "scope": 1768, + "sourceUnit": 3971, + "src": "255:34:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "Users/k06a/Projects/mooniswap-v2/contracts/libraries/Sqrt.sol", + "file": "./libraries/Sqrt.sol", + "id": 7, + "nodeType": "ImportDirective", + "scope": 1768, + "sourceUnit": 3498, + "src": "290:30:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "Users/k06a/Projects/mooniswap-v2/contracts/libraries/VirtualBalance.sol", + "file": "./libraries/VirtualBalance.sol", + "id": 8, + "nodeType": "ImportDirective", + "scope": 1768, + "sourceUnit": 4116, + "src": "321:40:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "Users/k06a/Projects/mooniswap-v2/contracts/governance/MooniswapGovernance.sol", + "file": "./governance/MooniswapGovernance.sol", + "id": 9, + "nodeType": "ImportDirective", + "scope": 1768, + "sourceUnit": 3419, + "src": "362:46:9", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 10, + "name": "MooniswapGovernance", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3418, + "src": "433:19:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MooniswapGovernance_$3418", + "typeString": "contract MooniswapGovernance" + } + }, + "id": 11, + "nodeType": "InheritanceSpecifier", + "src": "433:19:9" + } + ], + "contractDependencies": [ + 2543, + 3418, + 4138, + 4216, + 4529, + 4569 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 1767, + "linearizedBaseContracts": [ + 1767, + 3418, + 4569, + 4529, + 2543, + 4216, + 4138 + ], + "name": "Mooniswap", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 14, + "libraryName": { + "contractScope": null, + "id": 12, + "name": "Sqrt", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3497, + "src": "465:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Sqrt_$3497", + "typeString": "library Sqrt" + } + }, + "nodeType": "UsingForDirective", + "src": "459:23:9", + "typeName": { + "id": 13, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "474:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "id": 17, + "libraryName": { + "contractScope": null, + "id": 15, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2036, + "src": "493:8:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$2036", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "487:27:9", + "typeName": { + "id": 16, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "506:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "id": 20, + "libraryName": { + "contractScope": null, + "id": 18, + "name": "UniERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3970, + "src": "525:8:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UniERC20_$3970", + "typeString": "library UniERC20" + } + }, + "nodeType": "UsingForDirective", + "src": "519:26:9", + "typeName": { + "contractScope": null, + "id": 19, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "538:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + } + }, + { + "id": 23, + "libraryName": { + "contractScope": null, + "id": 21, + "name": "VirtualBalance", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4115, + "src": "556:14:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_VirtualBalance_$4115", + "typeString": "library VirtualBalance" + } + }, + "nodeType": "UsingForDirective", + "src": "550:45:9", + "typeName": { + "contractScope": null, + "id": 22, + "name": "VirtualBalance.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3986, + "src": "575:19:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_storage_ptr", + "typeString": "struct VirtualBalance.Data" + } + } + }, + { + "canonicalName": "Mooniswap.Balances", + "id": 28, + "members": [ + { + "constant": false, + "id": 25, + "mutability": "mutable", + "name": "src", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 28, + "src": "627:11:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 24, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "627:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 27, + "mutability": "mutable", + "name": "dst", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 28, + "src": "648:11:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 26, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "648:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Balances", + "nodeType": "StructDefinition", + "scope": 1767, + "src": "601:65:9", + "visibility": "public" + }, + { + "canonicalName": "Mooniswap.SwapVolumes", + "id": 33, + "members": [ + { + "constant": false, + "id": 30, + "mutability": "mutable", + "name": "confirmed", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 33, + "src": "701:17:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 29, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "701:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 32, + "mutability": "mutable", + "name": "result", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 33, + "src": "728:14:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + }, + "typeName": { + "id": 31, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "728:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "SwapVolumes", + "nodeType": "StructDefinition", + "scope": 1767, + "src": "672:77:9", + "visibility": "public" + }, + { + "canonicalName": "Mooniswap.Fees", + "id": 38, + "members": [ + { + "constant": false, + "id": 35, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 38, + "src": "777:11:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 34, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "777:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 37, + "mutability": "mutable", + "name": "slippageFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 38, + "src": "798:19:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 36, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "798:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Fees", + "nodeType": "StructDefinition", + "scope": 1767, + "src": "755:69:9", + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 42, + "name": "Error", + "nodeType": "EventDefinition", + "parameters": { + "id": 41, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 40, + "indexed": false, + "mutability": "mutable", + "name": "reason", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 42, + "src": "842:13:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 39, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "842:6:9", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "841:15:9" + }, + "src": "830:27:9" + }, + { + "anonymous": false, + "documentation": null, + "id": 54, + "name": "Deposited", + "nodeType": "EventDefinition", + "parameters": { + "id": 53, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 44, + "indexed": true, + "mutability": "mutable", + "name": "sender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 54, + "src": "888:22:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 43, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "888:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 46, + "indexed": true, + "mutability": "mutable", + "name": "receiver", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 54, + "src": "920:24:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 45, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "920:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 48, + "indexed": false, + "mutability": "mutable", + "name": "share", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 54, + "src": "954:13:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 47, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "954:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 50, + "indexed": false, + "mutability": "mutable", + "name": "token0Amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 54, + "src": "977:20:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 49, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "977:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 52, + "indexed": false, + "mutability": "mutable", + "name": "token1Amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 54, + "src": "1007:20:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 51, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1007:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "878:155:9" + }, + "src": "863:171:9" + }, + { + "anonymous": false, + "documentation": null, + "id": 66, + "name": "Withdrawn", + "nodeType": "EventDefinition", + "parameters": { + "id": 65, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 56, + "indexed": true, + "mutability": "mutable", + "name": "sender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 66, + "src": "1065:22:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 55, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1065:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 58, + "indexed": true, + "mutability": "mutable", + "name": "receiver", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 66, + "src": "1097:24:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 57, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1097:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 60, + "indexed": false, + "mutability": "mutable", + "name": "share", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 66, + "src": "1131:13:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 59, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1131:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 62, + "indexed": false, + "mutability": "mutable", + "name": "token0Amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 66, + "src": "1154:20:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 61, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1154:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 64, + "indexed": false, + "mutability": "mutable", + "name": "token1Amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 66, + "src": "1184:20:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 63, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1184:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1055:155:9" + }, + "src": "1040:171:9" + }, + { + "anonymous": false, + "documentation": null, + "id": 86, + "name": "Swapped", + "nodeType": "EventDefinition", + "parameters": { + "id": 85, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 68, + "indexed": true, + "mutability": "mutable", + "name": "sender", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 86, + "src": "1240:22:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 67, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1240:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 70, + "indexed": true, + "mutability": "mutable", + "name": "receiver", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 86, + "src": "1272:24:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 69, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1272:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 72, + "indexed": true, + "mutability": "mutable", + "name": "srcToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 86, + "src": "1306:24:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 71, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1306:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 74, + "indexed": false, + "mutability": "mutable", + "name": "dstToken", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 86, + "src": "1340:16:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 73, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1340:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 76, + "indexed": false, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 86, + "src": "1366:14:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 75, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1366:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 78, + "indexed": false, + "mutability": "mutable", + "name": "result", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 86, + "src": "1390:14:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 77, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1390:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 80, + "indexed": false, + "mutability": "mutable", + "name": "srcAdditionBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 86, + "src": "1414:26:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 79, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1414:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 82, + "indexed": false, + "mutability": "mutable", + "name": "dstRemovalBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 86, + "src": "1450:25:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 81, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1450:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 84, + "indexed": false, + "mutability": "mutable", + "name": "referral", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 86, + "src": "1485:16:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 83, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1485:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1230:277:9" + }, + "src": "1217:291:9" + }, + { + "anonymous": false, + "documentation": null, + "id": 100, + "name": "Sync", + "nodeType": "EventDefinition", + "parameters": { + "id": 99, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 88, + "indexed": false, + "mutability": "mutable", + "name": "srcBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 100, + "src": "1534:18:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 87, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1534:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 90, + "indexed": false, + "mutability": "mutable", + "name": "dstBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 100, + "src": "1562:18:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 89, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1562:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 92, + "indexed": false, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 100, + "src": "1590:11:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 91, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1590:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 94, + "indexed": false, + "mutability": "mutable", + "name": "slippageFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 100, + "src": "1611:19:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 93, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1611:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 96, + "indexed": false, + "mutability": "mutable", + "name": "referralShare", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 100, + "src": "1640:21:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 95, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1640:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 98, + "indexed": false, + "mutability": "mutable", + "name": "governanceShare", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 100, + "src": "1671:23:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 97, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1671:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1524:176:9" + }, + "src": "1514:187:9" + }, + { + "constant": true, + "id": 103, + "mutability": "constant", + "name": "_BASE_SUPPLY", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1767, + "src": "1707:44:9", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 101, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1707:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "31303030", + "id": 102, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1747:4:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000_by_1", + "typeString": "int_const 1000" + }, + "value": "1000" + }, + "visibility": "private" + }, + { + "constant": false, + "functionSelector": "0dfe1681", + "id": 105, + "mutability": "immutable", + "name": "token0", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1767, + "src": "1792:30:9", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 104, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "1792:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "d21220a7", + "id": 107, + "mutability": "immutable", + "name": "token1", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1767, + "src": "1828:30:9", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 106, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "1828:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "b1ec4c40", + "id": 111, + "mutability": "mutable", + "name": "volumes", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1767, + "src": "1864:45:9", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20_$4216_$_t_struct$_SwapVolumes_$33_storage_$", + "typeString": "mapping(contract IERC20 => struct Mooniswap.SwapVolumes)" + }, + "typeName": { + "id": 110, + "keyType": { + "contractScope": null, + "id": 108, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "1872:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "nodeType": "Mapping", + "src": "1864:30:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20_$4216_$_t_struct$_SwapVolumes_$33_storage_$", + "typeString": "mapping(contract IERC20 => struct Mooniswap.SwapVolumes)" + }, + "valueType": { + "contractScope": null, + "id": 109, + "name": "SwapVolumes", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 33, + "src": "1882:11:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_SwapVolumes_$33_storage_ptr", + "typeString": "struct Mooniswap.SwapVolumes" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "6edc2c09", + "id": 115, + "mutability": "mutable", + "name": "virtualBalancesForAddition", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1767, + "src": "1915:72:9", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20_$4216_$_t_struct$_Data_$3986_storage_$", + "typeString": "mapping(contract IERC20 => struct VirtualBalance.Data)" + }, + "typeName": { + "id": 114, + "keyType": { + "contractScope": null, + "id": 112, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "1923:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "nodeType": "Mapping", + "src": "1915:38:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20_$4216_$_t_struct$_Data_$3986_storage_$", + "typeString": "mapping(contract IERC20 => struct VirtualBalance.Data)" + }, + "valueType": { + "contractScope": null, + "id": 113, + "name": "VirtualBalance.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3986, + "src": "1933:19:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_storage_ptr", + "typeString": "struct VirtualBalance.Data" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "functionSelector": "5ed9156d", + "id": 119, + "mutability": "mutable", + "name": "virtualBalancesForRemoval", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1767, + "src": "1993:71:9", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20_$4216_$_t_struct$_Data_$3986_storage_$", + "typeString": "mapping(contract IERC20 => struct VirtualBalance.Data)" + }, + "typeName": { + "id": 118, + "keyType": { + "contractScope": null, + "id": 116, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "2001:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "nodeType": "Mapping", + "src": "1993:38:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20_$4216_$_t_struct$_Data_$3986_storage_$", + "typeString": "mapping(contract IERC20 => struct VirtualBalance.Data)" + }, + "valueType": { + "contractScope": null, + "id": 117, + "name": "VirtualBalance.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3986, + "src": "2011:19:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_storage_ptr", + "typeString": "struct VirtualBalance.Data" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 129, + "nodeType": "Block", + "src": "2096:105:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 122, + "name": "mooniswapFactoryGovernance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2602, + "src": "2114:26:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + } + }, + "id": 123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isActive", + "nodeType": "MemberAccess", + "referencedDeclaration": 4638, + "src": "2114:35:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_bool_$", + "typeString": "function () view external returns (bool)" + } + }, + "id": 124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2114:37:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4d6f6f6e69737761703a20666163746f72792073687574646f776e", + "id": 125, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2153:29:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7e3e7598007f60067256f34700f4b446de5d2562619344d0c78960cf5015109a", + "typeString": "literal_string \"Mooniswap: factory shutdown\"" + }, + "value": "Mooniswap: factory shutdown" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7e3e7598007f60067256f34700f4b446de5d2562619344d0c78960cf5015109a", + "typeString": "literal_string \"Mooniswap: factory shutdown\"" + } + ], + "id": 121, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2106:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2106:77:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 127, + "nodeType": "ExpressionStatement", + "src": "2106:77:9" + }, + { + "id": 128, + "nodeType": "PlaceholderStatement", + "src": "2193:1:9" + } + ] + }, + "documentation": null, + "id": 130, + "name": "whenNotShutdown", + "nodeType": "ModifierDefinition", + "overrides": null, + "parameters": { + "id": 120, + "nodeType": "ParameterList", + "parameters": [], + "src": "2096:0:9" + }, + "src": "2071:130:9", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 187, + "nodeType": "Block", + "src": "2500:269:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 153, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 136, + "src": "2524:4:9", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 152, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2518:5:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 151, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2518:5:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 154, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2518:11:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 155, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2518:18:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 156, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2539:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2518:22:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4d6f6f6e69737761703a206e616d6520697320656d707479", + "id": 158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2542:26:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b3688c826615edd84ce35072dd88cf4ed97a454a8259f487f96ab0569e132aa0", + "typeString": "literal_string \"Mooniswap: name is empty\"" + }, + "value": "Mooniswap: name is empty" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b3688c826615edd84ce35072dd88cf4ed97a454a8259f487f96ab0569e132aa0", + "typeString": "literal_string \"Mooniswap: name is empty\"" + } + ], + "id": 150, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2510:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2510:59:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 160, + "nodeType": "ExpressionStatement", + "src": "2510:59:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 164, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 138, + "src": "2593:6:9", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 163, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2587:5:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 162, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2587:5:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 165, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2587:13:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 166, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2587:20:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2610:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2587:24:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4d6f6f6e69737761703a2073796d626f6c20697320656d707479", + "id": 169, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2613:28:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0bff2690540bf6a71e4bc4df8f13a2a0ce154df8fa2a162fd8a5ecf25ba13bc5", + "typeString": "literal_string \"Mooniswap: symbol is empty\"" + }, + "value": "Mooniswap: symbol is empty" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0bff2690540bf6a71e4bc4df8f13a2a0ce154df8fa2a162fd8a5ecf25ba13bc5", + "typeString": "literal_string \"Mooniswap: symbol is empty\"" + } + ], + "id": 161, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2579:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2579:63:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 171, + "nodeType": "ExpressionStatement", + "src": "2579:63:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "id": 175, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 173, + "name": "_token0", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 132, + "src": "2660:7:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 174, + "name": "_token1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "2671:7:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "src": "2660:18:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4d6f6f6e69737761703a206475706c696361746520746f6b656e73", + "id": 176, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2680:29:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_547823f16aa68ed72eaba26635066d8a04b97b159dc2bd42bd24bd95e9cdacb6", + "typeString": "literal_string \"Mooniswap: duplicate tokens\"" + }, + "value": "Mooniswap: duplicate tokens" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_547823f16aa68ed72eaba26635066d8a04b97b159dc2bd42bd24bd95e9cdacb6", + "typeString": "literal_string \"Mooniswap: duplicate tokens\"" + } + ], + "id": 172, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "2652:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2652:58:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 178, + "nodeType": "ExpressionStatement", + "src": "2652:58:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 179, + "name": "token0", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 105, + "src": "2720:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 180, + "name": "_token0", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 132, + "src": "2729:7:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "src": "2720:16:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 182, + "nodeType": "ExpressionStatement", + "src": "2720:16:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 183, + "name": "token1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 107, + "src": "2746:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 184, + "name": "_token1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 134, + "src": "2755:7:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "src": "2746:16:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 186, + "nodeType": "ExpressionStatement", + "src": "2746:16:9" + } + ] + }, + "documentation": null, + "id": 188, + "implemented": true, + "kind": "constructor", + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 143, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 136, + "src": "2425:4:9", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 144, + "name": "symbol", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 138, + "src": "2431:6:9", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "id": 145, + "modifierName": { + "argumentTypes": null, + "id": 142, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2543, + "src": "2419:5:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$2543_$", + "typeString": "type(contract ERC20)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2419:19:9" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 147, + "name": "_mooniswapFactoryGovernance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 140, + "src": "2467:27:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + } + } + ], + "id": 148, + "modifierName": { + "argumentTypes": null, + "id": 146, + "name": "MooniswapGovernance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3418, + "src": "2447:19:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MooniswapGovernance_$3418_$", + "typeString": "type(contract MooniswapGovernance)" + } + }, + "nodeType": "ModifierInvocation", + "src": "2447:48:9" + } + ], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 141, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 132, + "mutability": "mutable", + "name": "_token0", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 188, + "src": "2228:14:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 131, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "2228:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 134, + "mutability": "mutable", + "name": "_token1", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 188, + "src": "2252:14:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 133, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "2252:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 136, + "mutability": "mutable", + "name": "name", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 188, + "src": "2276:18:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 135, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2276:6:9", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 138, + "mutability": "mutable", + "name": "symbol", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 188, + "src": "2304:20:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 137, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2304:6:9", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 140, + "mutability": "mutable", + "name": "_mooniswapFactoryGovernance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 188, + "src": "2334:55:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + }, + "typeName": { + "contractScope": null, + "id": 139, + "name": "IMooniswapFactoryGovernance", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4639, + "src": "2334:27:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2218:177:9" + }, + "returnParameters": { + "id": 149, + "nodeType": "ParameterList", + "parameters": [], + "src": "2500:0:9" + }, + "scope": 1767, + "src": "2207:562:9", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 214, + "nodeType": "Block", + "src": "2842:97:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 194, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 192, + "src": "2852:6:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20_$4216_$dyn_memory_ptr", + "typeString": "contract IERC20[] memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "32", + "id": 198, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2874:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + } + ], + "id": 197, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "2861:12:9", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_contract$_IERC20_$4216_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (contract IERC20[] memory)" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 195, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "2865:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 196, + "length": null, + "nodeType": "ArrayTypeName", + "src": "2865:8:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20_$4216_$dyn_storage_ptr", + "typeString": "contract IERC20[]" + } + } + }, + "id": 199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2861:15:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20_$4216_$dyn_memory_ptr", + "typeString": "contract IERC20[] memory" + } + }, + "src": "2852:24:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20_$4216_$dyn_memory_ptr", + "typeString": "contract IERC20[] memory" + } + }, + "id": 201, + "nodeType": "ExpressionStatement", + "src": "2852:24:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 206, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 202, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 192, + "src": "2886:6:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20_$4216_$dyn_memory_ptr", + "typeString": "contract IERC20[] memory" + } + }, + "id": 204, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 203, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2893:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2886:9:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 205, + "name": "token0", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 105, + "src": "2898:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "src": "2886:18:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 207, + "nodeType": "ExpressionStatement", + "src": "2886:18:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 212, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 208, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 192, + "src": "2914:6:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20_$4216_$dyn_memory_ptr", + "typeString": "contract IERC20[] memory" + } + }, + "id": 210, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 209, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2921:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2914:9:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 211, + "name": "token1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 107, + "src": "2926:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "src": "2914:18:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 213, + "nodeType": "ExpressionStatement", + "src": "2914:18:9" + } + ] + }, + "documentation": null, + "functionSelector": "aa6ca808", + "id": 215, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getTokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 189, + "nodeType": "ParameterList", + "parameters": [], + "src": "2793:2:9" + }, + "returnParameters": { + "id": 193, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 192, + "mutability": "mutable", + "name": "tokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 215, + "src": "2818:22:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20_$4216_$dyn_memory_ptr", + "typeString": "contract IERC20[]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 190, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "2818:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 191, + "length": null, + "nodeType": "ArrayTypeName", + "src": "2818:8:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20_$4216_$dyn_storage_ptr", + "typeString": "contract IERC20[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2817:24:9" + }, + "scope": 1767, + "src": "2775:164:9", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 241, + "nodeType": "Block", + "src": "3002:182:9", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 222, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 217, + "src": "3016:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 223, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3021:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "3016:6:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 228, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 217, + "src": "3072:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 229, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3077:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "3072:6:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 238, + "nodeType": "Block", + "src": "3124:54:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "506f6f6c206861732074776f20746f6b656e73", + "id": 235, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3145:21:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_77e125b9ee4dfb1bd88dbf528920a2226bc41979df5a414f7b51b8d592db591d", + "typeString": "literal_string \"Pool has two tokens\"" + }, + "value": "Pool has two tokens" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_77e125b9ee4dfb1bd88dbf528920a2226bc41979df5a414f7b51b8d592db591d", + "typeString": "literal_string \"Pool has two tokens\"" + } + ], + "id": 234, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -19, + -19 + ], + "referencedDeclaration": -19, + "src": "3138:6:9", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory) pure" + } + }, + "id": 236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3138:29:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 237, + "nodeType": "ExpressionStatement", + "src": "3138:29:9" + } + ] + }, + "id": 239, + "nodeType": "IfStatement", + "src": "3068:110:9", + "trueBody": { + "id": 233, + "nodeType": "Block", + "src": "3080:38:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 231, + "name": "token1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 107, + "src": "3101:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "functionReturnParameters": 221, + "id": 232, + "nodeType": "Return", + "src": "3094:13:9" + } + ] + } + }, + "id": 240, + "nodeType": "IfStatement", + "src": "3012:166:9", + "trueBody": { + "id": 227, + "nodeType": "Block", + "src": "3024:38:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 225, + "name": "token0", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 105, + "src": "3045:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "functionReturnParameters": 221, + "id": 226, + "nodeType": "Return", + "src": "3038:13:9" + } + ] + } + } + ] + }, + "documentation": null, + "functionSelector": "4f64b2be", + "id": 242, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "tokens", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 218, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 217, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 242, + "src": "2961:9:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 216, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2961:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2960:11:9" + }, + "returnParameters": { + "id": 221, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 220, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 242, + "src": "2994:6:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 219, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "2994:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2993:8:9" + }, + "scope": 1767, + "src": "2945:239:9", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 272, + "nodeType": "Block", + "src": "3264:169:9", + "statements": [ + { + "assignments": [ + 250 + ], + "declarations": [ + { + "constant": false, + "id": 250, + "mutability": "mutable", + "name": "balance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 272, + "src": "3274:15:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 249, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3274:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 258, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 255, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "3319:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + ], + "id": 254, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3311:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 253, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3311:7:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3311:13:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 251, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 244, + "src": "3292:5:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "uniBalanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 3551, + "src": "3292:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$4216_$_t_address_$returns$_t_uint256_$bound_to$_t_contract$_IERC20_$4216_$", + "typeString": "function (contract IERC20,address) view returns (uint256)" + } + }, + "id": 257, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3292:33:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3274:51:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 265, + "name": "decayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2714, + "src": "3393:11:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 266, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3393:13:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 267, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 250, + "src": "3408:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 261, + "name": "virtualBalancesForAddition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 115, + "src": "3351:26:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20_$4216_$_t_struct$_Data_$3986_storage_$", + "typeString": "mapping(contract IERC20 => struct VirtualBalance.Data storage ref)" + } + }, + "id": 263, + "indexExpression": { + "argumentTypes": null, + "id": 262, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 244, + "src": "3378:5:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3351:33:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_storage", + "typeString": "struct VirtualBalance.Data storage ref" + } + }, + "id": 264, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "current", + "nodeType": "MemberAccess", + "referencedDeclaration": 4114, + "src": "3351:41:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$3986_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_Data_$3986_memory_ptr_$", + "typeString": "function (struct VirtualBalance.Data memory,uint256,uint256) view returns (uint256)" + } + }, + "id": 268, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3351:65:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 269, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 250, + "src": "3418:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 259, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1840, + "src": "3342:4:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$1840_$", + "typeString": "type(library Math)" + } + }, + "id": 260, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "max", + "nodeType": "MemberAccess", + "referencedDeclaration": 1788, + "src": "3342:8:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 270, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3342:84:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 248, + "id": 271, + "nodeType": "Return", + "src": "3335:91:9" + } + ] + }, + "documentation": null, + "functionSelector": "d7d3aab5", + "id": 273, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBalanceForAddition", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 245, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 244, + "mutability": "mutable", + "name": "token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 273, + "src": "3221:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 243, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "3221:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3220:14:9" + }, + "returnParameters": { + "id": 248, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 247, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 273, + "src": "3255:7:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 246, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3255:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3254:9:9" + }, + "scope": 1767, + "src": "3190:243:9", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 303, + "nodeType": "Block", + "src": "3512:168:9", + "statements": [ + { + "assignments": [ + 281 + ], + "declarations": [ + { + "constant": false, + "id": 281, + "mutability": "mutable", + "name": "balance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 303, + "src": "3522:15:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 280, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3522:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 289, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 286, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "3567:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + ], + "id": 285, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3559:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 284, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3559:7:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 287, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3559:13:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 282, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 275, + "src": "3540:5:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 283, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "uniBalanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 3551, + "src": "3540:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$4216_$_t_address_$returns$_t_uint256_$bound_to$_t_contract$_IERC20_$4216_$", + "typeString": "function (contract IERC20,address) view returns (uint256)" + } + }, + "id": 288, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3540:33:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3522:51:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 296, + "name": "decayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2714, + "src": "3640:11:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 297, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3640:13:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 298, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 281, + "src": "3655:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 292, + "name": "virtualBalancesForRemoval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "3599:25:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20_$4216_$_t_struct$_Data_$3986_storage_$", + "typeString": "mapping(contract IERC20 => struct VirtualBalance.Data storage ref)" + } + }, + "id": 294, + "indexExpression": { + "argumentTypes": null, + "id": 293, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 275, + "src": "3625:5:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3599:32:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_storage", + "typeString": "struct VirtualBalance.Data storage ref" + } + }, + "id": 295, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "current", + "nodeType": "MemberAccess", + "referencedDeclaration": 4114, + "src": "3599:40:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$3986_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_Data_$3986_memory_ptr_$", + "typeString": "function (struct VirtualBalance.Data memory,uint256,uint256) view returns (uint256)" + } + }, + "id": 299, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3599:64:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 300, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 281, + "src": "3665:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 290, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1840, + "src": "3590:4:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$1840_$", + "typeString": "type(library Math)" + } + }, + "id": 291, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 1806, + "src": "3590:8:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 301, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3590:83:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 279, + "id": 302, + "nodeType": "Return", + "src": "3583:90:9" + } + ] + }, + "documentation": null, + "functionSelector": "e7ff42c9", + "id": 304, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getBalanceForRemoval", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 276, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 275, + "mutability": "mutable", + "name": "token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 304, + "src": "3469:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 274, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "3469:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3468:14:9" + }, + "returnParameters": { + "id": 279, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 278, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 304, + "src": "3503:7:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 277, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3503:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3502:9:9" + }, + "scope": 1767, + "src": "3439:241:9", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 331, + "nodeType": "Block", + "src": "3776:129:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 316, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 306, + "src": "3804:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + { + "argumentTypes": null, + "id": 317, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 308, + "src": "3809:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + { + "argumentTypes": null, + "id": 318, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 310, + "src": "3814:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 320, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 306, + "src": "3844:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + ], + "id": 319, + "name": "getBalanceForAddition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 273, + "src": "3822:21:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$4216_$returns$_t_uint256_$", + "typeString": "function (contract IERC20) view returns (uint256)" + } + }, + "id": 321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3822:26:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 323, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 308, + "src": "3871:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + ], + "id": 322, + "name": "getBalanceForRemoval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 304, + "src": "3850:20:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$4216_$returns$_t_uint256_$", + "typeString": "function (contract IERC20) view returns (uint256)" + } + }, + "id": 324, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3850:25:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 325, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2692, + "src": "3877:3:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3877:5:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 327, + "name": "slippageFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2703, + "src": "3884:11:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 328, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3884:13:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 315, + "name": "_getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1688, + "src": "3793:10:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$4216_$_t_contract$_IERC20_$4216_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (contract IERC20,contract IERC20,uint256,uint256,uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3793:105:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 314, + "id": 330, + "nodeType": "Return", + "src": "3786:112:9" + } + ] + }, + "documentation": null, + "functionSelector": "1e1401f8", + "id": 332, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 311, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 306, + "mutability": "mutable", + "name": "src", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 332, + "src": "3705:10:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 305, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "3705:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 308, + "mutability": "mutable", + "name": "dst", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 332, + "src": "3717:10:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 307, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "3717:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 310, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 332, + "src": "3729:14:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 309, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3729:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3704:40:9" + }, + "returnParameters": { + "id": 314, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 313, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 332, + "src": "3767:7:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 312, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3767:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3766:9:9" + }, + "scope": 1767, + "src": "3686:219:9", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 356, + "nodeType": "Block", + "src": "4068:70:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 350, + "name": "maxAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 336, + "src": "4096:10:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + { + "argumentTypes": null, + "id": 351, + "name": "minAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 340, + "src": "4108:10:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 352, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4120:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 353, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4120:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + }, + { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 349, + "name": "depositFor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 771, + "src": "4085:10:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_array$_t_uint256_$2_memory_ptr_$_t_array$_t_uint256_$2_memory_ptr_$_t_address_$returns$_t_uint256_$_t_array$_t_uint256_$2_memory_ptr_$", + "typeString": "function (uint256[2] memory,uint256[2] memory,address) returns (uint256,uint256[2] memory)" + } + }, + "id": 354, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4085:46:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_array$_t_uint256_$2_memory_ptr_$", + "typeString": "tuple(uint256,uint256[2] memory)" + } + }, + "functionReturnParameters": 348, + "id": 355, + "nodeType": "Return", + "src": "4078:53:9" + } + ] + }, + "documentation": null, + "functionSelector": "3049105d", + "id": 357, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "deposit", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 341, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 336, + "mutability": "mutable", + "name": "maxAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 357, + "src": "3928:28:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2]" + }, + "typeName": { + "baseType": { + "id": 333, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3928:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 335, + "length": { + "argumentTypes": null, + "hexValue": "32", + "id": 334, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3936:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "ArrayTypeName", + "src": "3928:10:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_storage_ptr", + "typeString": "uint256[2]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 340, + "mutability": "mutable", + "name": "minAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 357, + "src": "3958:28:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2]" + }, + "typeName": { + "baseType": { + "id": 337, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3958:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 339, + "length": { + "argumentTypes": null, + "hexValue": "32", + "id": 338, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3966:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "ArrayTypeName", + "src": "3958:10:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_storage_ptr", + "typeString": "uint256[2]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3927:60:9" + }, + "returnParameters": { + "id": 348, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 343, + "mutability": "mutable", + "name": "fairSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 357, + "src": "4013:18:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 342, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4013:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 347, + "mutability": "mutable", + "name": "receivedAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 357, + "src": "4033:33:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2]" + }, + "typeName": { + "baseType": { + "id": 344, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4033:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 346, + "length": { + "argumentTypes": null, + "hexValue": "32", + "id": 345, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4041:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "ArrayTypeName", + "src": "4033:10:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_storage_ptr", + "typeString": "uint256[2]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4012:55:9" + }, + "scope": 1767, + "src": "3911:227:9", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 770, + "nodeType": "Block", + "src": "4331:2663:9", + "statements": [ + { + "assignments": [ + 382 + ], + "declarations": [ + { + "constant": false, + "id": 382, + "mutability": "mutable", + "name": "_tokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 770, + "src": "4341:24:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20_$4216_$2_memory_ptr", + "typeString": "contract IERC20[2]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 380, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "4341:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 381, + "length": { + "argumentTypes": null, + "hexValue": "32", + "id": 379, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4348:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "ArrayTypeName", + "src": "4341:9:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20_$4216_$2_storage_ptr", + "typeString": "contract IERC20[2]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 386, + "initialValue": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 383, + "name": "token0", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 105, + "src": "4369:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + { + "argumentTypes": null, + "id": 384, + "name": "token1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 107, + "src": "4377:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + } + ], + "id": 385, + "isConstant": false, + "isInlineArray": true, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4368:16:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20_$4216_$2_memory_ptr", + "typeString": "contract IERC20[2] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4341:43:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 388, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4402:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4402:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 390, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 382, + "src": "4416:7:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20_$4216_$2_memory_ptr", + "typeString": "contract IERC20[2] memory" + } + }, + "id": 392, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 391, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4424:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4416:10:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 393, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isETH", + "nodeType": "MemberAccess", + "referencedDeclaration": 3527, + "src": "4416:16:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_contract$_IERC20_$4216_$returns$_t_bool_$bound_to$_t_contract$_IERC20_$4216_$", + "typeString": "function (contract IERC20) pure returns (bool)" + } + }, + "id": 394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4416:18:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 398, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 382, + "src": "4454:7:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20_$4216_$2_memory_ptr", + "typeString": "contract IERC20[2] memory" + } + }, + "id": 400, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 399, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4462:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4454:10:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 401, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isETH", + "nodeType": "MemberAccess", + "referencedDeclaration": 3527, + "src": "4454:16:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_contract$_IERC20_$4216_$returns$_t_bool_$bound_to$_t_contract$_IERC20_$4216_$", + "typeString": "function (contract IERC20) pure returns (bool)" + } + }, + "id": 402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4454:18:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 406, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4491:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "id": 407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "4454:38:9", + "trueExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 403, + "name": "maxAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 361, + "src": "4475:10:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 405, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 404, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4486:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4475:13:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 408, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4453:40:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "4416:77:9", + "trueExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 395, + "name": "maxAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 361, + "src": "4437:10:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 397, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 396, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4448:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4437:13:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 410, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4415:79:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4402:92:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4d6f6f6e69737761703a2077726f6e672076616c7565207573616765", + "id": 412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4496:30:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a46874337e04f5973e81e0ae555d34c1cb1861f3f6823e991de227eba323bc91", + "typeString": "literal_string \"Mooniswap: wrong value usage\"" + }, + "value": "Mooniswap: wrong value usage" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a46874337e04f5973e81e0ae555d34c1cb1861f3f6823e991de227eba323bc91", + "typeString": "literal_string \"Mooniswap: wrong value usage\"" + } + ], + "id": 387, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4394:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 413, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4394:133:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 414, + "nodeType": "ExpressionStatement", + "src": "4394:133:9" + }, + { + "assignments": [ + 416 + ], + "declarations": [ + { + "constant": false, + "id": 416, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 770, + "src": "4538:19:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 415, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4538:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 419, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 417, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2129, + "src": "4560:11:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 418, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4560:13:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "4538:35:9" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 420, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 416, + "src": "4588:11:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 421, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4603:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4588:16:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 743, + "nodeType": "Block", + "src": "5191:1596:9", + "statements": [ + { + "assignments": [ + 510 + ], + "declarations": [ + { + "constant": false, + "id": 510, + "mutability": "mutable", + "name": "realBalances", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 743, + "src": "5205:30:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2]" + }, + "typeName": { + "baseType": { + "id": 508, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5205:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 509, + "length": { + "argumentTypes": null, + "hexValue": "32", + "id": 507, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5213:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "ArrayTypeName", + "src": "5205:10:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_storage_ptr", + "typeString": "uint256[2]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 511, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5205:30:9" + }, + { + "body": { + "id": 548, + "nodeType": "Block", + "src": "5296:129:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 546, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 523, + "name": "realBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 510, + "src": "5314:12:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 525, + "indexExpression": { + "argumentTypes": null, + "id": 524, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 513, + "src": "5327:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5314:15:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 536, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 382, + "src": "5375:7:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20_$4216_$2_memory_ptr", + "typeString": "contract IERC20[2] memory" + } + }, + "id": 538, + "indexExpression": { + "argumentTypes": null, + "id": 537, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 513, + "src": "5383:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5375:10:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 539, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isETH", + "nodeType": "MemberAccess", + "referencedDeclaration": 3527, + "src": "5375:16:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_contract$_IERC20_$4216_$returns$_t_bool_$bound_to$_t_contract$_IERC20_$4216_$", + "typeString": "function (contract IERC20) pure returns (bool)" + } + }, + "id": 540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5375:18:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 543, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5408:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "id": 544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "5375:34:9", + "trueExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 541, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "5396:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 542, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5396:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 532, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "5364:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + ], + "id": 531, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5356:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 530, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5356:7:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 533, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5356:13:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 526, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 382, + "src": "5332:7:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20_$4216_$2_memory_ptr", + "typeString": "contract IERC20[2] memory" + } + }, + "id": 528, + "indexExpression": { + "argumentTypes": null, + "id": 527, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 513, + "src": "5340:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5332:10:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 529, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "uniBalanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 3551, + "src": "5332:23:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$4216_$_t_address_$returns$_t_uint256_$bound_to$_t_contract$_IERC20_$4216_$", + "typeString": "function (contract IERC20,address) view returns (uint256)" + } + }, + "id": 534, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5332:38:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 535, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1886, + "src": "5332:42:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 545, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5332:78:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5314:96:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 547, + "nodeType": "ExpressionStatement", + "src": "5314:96:9" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 516, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 513, + "src": "5266:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 517, + "name": "realBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 510, + "src": "5270:12:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 518, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5270:19:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5266:23:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 549, + "initializationExpression": { + "assignments": [ + 513 + ], + "declarations": [ + { + "constant": false, + "id": 513, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 549, + "src": "5254:6:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 512, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5254:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 515, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 514, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5263:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "5254:10:9" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 521, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "5291:3:9", + "subExpression": { + "argumentTypes": null, + "id": 520, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 513, + "src": "5291:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 522, + "nodeType": "ExpressionStatement", + "src": "5291:3:9" + }, + "nodeType": "ForStatement", + "src": "5249:176:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 550, + "name": "fairSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 372, + "src": "5478:10:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 553, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5496:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 552, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5496:7:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + } + ], + "id": 551, + "name": "type", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -27, + "src": "5491:4:9", + "typeDescriptions": { + "typeIdentifier": "t_function_metatype_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 554, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5491:13:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_magic_meta_type_t_uint256", + "typeString": "type(uint256)" + } + }, + "id": 555, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "max", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5491:17:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5478:30:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 557, + "nodeType": "ExpressionStatement", + "src": "5478:30:9" + }, + { + "body": { + "id": 587, + "nodeType": "Block", + "src": "5567:119:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 585, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 569, + "name": "fairSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 372, + "src": "5585:10:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 572, + "name": "fairSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 372, + "src": "5607:10:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 580, + "name": "realBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 510, + "src": "5654:12:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 582, + "indexExpression": { + "argumentTypes": null, + "id": 581, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 559, + "src": "5667:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5654:15:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 575, + "name": "maxAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 361, + "src": "5635:10:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 577, + "indexExpression": { + "argumentTypes": null, + "id": 576, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 559, + "src": "5646:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5635:13:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 573, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 416, + "src": "5619:11:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 574, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1949, + "src": "5619:15:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 578, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5619:30:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 579, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1966, + "src": "5619:34:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 583, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5619:51:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 570, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1840, + "src": "5598:4:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$1840_$", + "typeString": "type(library Math)" + } + }, + "id": 571, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 1806, + "src": "5598:8:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 584, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5598:73:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5585:86:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 586, + "nodeType": "ExpressionStatement", + "src": "5585:86:9" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 562, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 559, + "src": "5539:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 563, + "name": "maxAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 361, + "src": "5543:10:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 564, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5543:17:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5539:21:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 588, + "initializationExpression": { + "assignments": [ + 559 + ], + "declarations": [ + { + "constant": false, + "id": 559, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 588, + "src": "5527:6:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 558, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5527:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 561, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 560, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5536:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "5527:10:9" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 567, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "5562:3:9", + "subExpression": { + "argumentTypes": null, + "id": 566, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 559, + "src": "5562:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 568, + "nodeType": "ExpressionStatement", + "src": "5562:3:9" + }, + "nodeType": "ForStatement", + "src": "5522:164:9" + }, + { + "assignments": [ + 590 + ], + "declarations": [ + { + "constant": false, + "id": 590, + "mutability": "mutable", + "name": "fairSupplyCached", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 743, + "src": "5700:24:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 589, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5700:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 592, + "initialValue": { + "argumentTypes": null, + "id": 591, + "name": "fairSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 372, + "src": "5727:10:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5700:37:9" + }, + { + "body": { + "id": 689, + "nodeType": "Block", + "src": "5797:571:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 605, + "name": "maxAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 361, + "src": "5823:10:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 607, + "indexExpression": { + "argumentTypes": null, + "id": 606, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 594, + "src": "5834:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5823:13:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 608, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5839:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "5823:17:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4d6f6f6e69737761703a20616d6f756e74206973207a65726f", + "id": 610, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5842:27:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_123962c216733f8b2d542f0fe5d32172d285ddf8ee3b2481cdd480acd4a0da43", + "typeString": "literal_string \"Mooniswap: amount is zero\"" + }, + "value": "Mooniswap: amount is zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_123962c216733f8b2d542f0fe5d32172d285ddf8ee3b2481cdd480acd4a0da43", + "typeString": "literal_string \"Mooniswap: amount is zero\"" + } + ], + "id": 604, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5815:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5815:55:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 612, + "nodeType": "ExpressionStatement", + "src": "5815:55:9" + }, + { + "assignments": [ + 614 + ], + "declarations": [ + { + "constant": false, + "id": 614, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 689, + "src": "5888:14:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 613, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5888:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 629, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 627, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 416, + "src": "5968:11:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 624, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 622, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 416, + "src": "5947:11:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 623, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5961:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "5947:15:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 619, + "name": "fairSupplyCached", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 590, + "src": "5925:16:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 615, + "name": "realBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 510, + "src": "5905:12:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 617, + "indexExpression": { + "argumentTypes": null, + "id": 616, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 594, + "src": "5918:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5905:15:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 618, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1949, + "src": "5905:19:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 620, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5905:37:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 621, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1869, + "src": "5905:41:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 625, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5905:58:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 626, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1966, + "src": "5905:62:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 628, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5905:75:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5888:92:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 631, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 614, + "src": "6006:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 632, + "name": "minAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 365, + "src": "6016:10:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 634, + "indexExpression": { + "argumentTypes": null, + "id": 633, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 594, + "src": "6027:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6016:13:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6006:23:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4d6f6f6e69737761703a206d696e416d6f756e74206e6f742072656163686564", + "id": 636, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6031:34:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9e9a1b6fa17445051149091025eac645e9f9ac26aca45a04b305e8faafa79a0c", + "typeString": "literal_string \"Mooniswap: minAmount not reached\"" + }, + "value": "Mooniswap: minAmount not reached" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9e9a1b6fa17445051149091025eac645e9f9ac26aca45a04b305e8faafa79a0c", + "typeString": "literal_string \"Mooniswap: minAmount not reached\"" + } + ], + "id": 630, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "5998:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 637, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5998:68:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 638, + "nodeType": "ExpressionStatement", + "src": "5998:68:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 643, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6112:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 644, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6112:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 647, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6132:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + ], + "id": 646, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6124:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 645, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6124:7:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6124:13:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 649, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 614, + "src": "6139:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 639, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 382, + "src": "6085:7:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20_$4216_$2_memory_ptr", + "typeString": "contract IERC20[2] memory" + } + }, + "id": 641, + "indexExpression": { + "argumentTypes": null, + "id": 640, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 594, + "src": "6093:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6085:10:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 642, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "uniTransferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 3658, + "src": "6085:26:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4216_$_t_address_payable_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$4216_$", + "typeString": "function (contract IERC20,address payable,address,uint256)" + } + }, + "id": 650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6085:61:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 651, + "nodeType": "ExpressionStatement", + "src": "6085:61:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 652, + "name": "receivedAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "6164:15:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 654, + "indexExpression": { + "argumentTypes": null, + "id": 653, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 594, + "src": "6180:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6164:18:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 665, + "name": "realBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 510, + "src": "6228:12:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 667, + "indexExpression": { + "argumentTypes": null, + "id": 666, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 594, + "src": "6241:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6228:15:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 661, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "6217:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + ], + "id": 660, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6209:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 659, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6209:7:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6209:13:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 655, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 382, + "src": "6185:7:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20_$4216_$2_memory_ptr", + "typeString": "contract IERC20[2] memory" + } + }, + "id": 657, + "indexExpression": { + "argumentTypes": null, + "id": 656, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 594, + "src": "6193:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6185:10:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 658, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "uniBalanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 3551, + "src": "6185:23:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$4216_$_t_address_$returns$_t_uint256_$bound_to$_t_contract$_IERC20_$4216_$", + "typeString": "function (contract IERC20,address) view returns (uint256)" + } + }, + "id": 663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6185:38:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 664, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1886, + "src": "6185:42:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6185:59:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6164:80:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 670, + "nodeType": "ExpressionStatement", + "src": "6164:80:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 687, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 671, + "name": "fairSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 372, + "src": "6262:10:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 674, + "name": "fairSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 372, + "src": "6284:10:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 682, + "name": "realBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 510, + "src": "6336:12:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 684, + "indexExpression": { + "argumentTypes": null, + "id": 683, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 594, + "src": "6349:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6336:15:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 677, + "name": "receivedAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "6312:15:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 679, + "indexExpression": { + "argumentTypes": null, + "id": 678, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 594, + "src": "6328:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6312:18:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 675, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 416, + "src": "6296:11:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 676, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1949, + "src": "6296:15:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 680, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6296:35:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1966, + "src": "6296:39:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 685, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6296:56:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 672, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1840, + "src": "6275:4:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$1840_$", + "typeString": "type(library Math)" + } + }, + "id": 673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 1806, + "src": "6275:8:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 686, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6275:78:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6262:91:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 688, + "nodeType": "ExpressionStatement", + "src": "6262:91:9" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 597, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 594, + "src": "5769:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 598, + "name": "maxAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 361, + "src": "5773:10:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 599, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5773:17:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5769:21:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 690, + "initializationExpression": { + "assignments": [ + 594 + ], + "declarations": [ + { + "constant": false, + "id": 594, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 690, + "src": "5757:6:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 593, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "5757:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 596, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 595, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5766:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "5757:10:9" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 602, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "5792:3:9", + "subExpression": { + "argumentTypes": null, + "id": 601, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 594, + "src": "5792:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 603, + "nodeType": "ExpressionStatement", + "src": "5792:3:9" + }, + "nodeType": "ForStatement", + "src": "5752:616:9" + }, + { + "assignments": [ + 692 + ], + "declarations": [ + { + "constant": false, + "id": 692, + "mutability": "mutable", + "name": "_decayPeriod", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 743, + "src": "6382:20:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 691, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6382:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 695, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 693, + "name": "decayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2714, + "src": "6405:11:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 694, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6405:13:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6382:36:9" + }, + { + "body": { + "id": 741, + "nodeType": "Block", + "src": "6493:284:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 713, + "name": "_decayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 692, + "src": "6555:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 714, + "name": "realBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 510, + "src": "6569:12:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 716, + "indexExpression": { + "argumentTypes": null, + "id": 715, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 697, + "src": "6582:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6569:15:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 719, + "name": "fairSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 372, + "src": "6602:10:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 717, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 416, + "src": "6586:11:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 718, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1869, + "src": "6586:15:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6586:27:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 721, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 416, + "src": "6615:11:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 707, + "name": "virtualBalancesForRemoval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "6511:25:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20_$4216_$_t_struct$_Data_$3986_storage_$", + "typeString": "mapping(contract IERC20 => struct VirtualBalance.Data storage ref)" + } + }, + "id": 711, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 708, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 382, + "src": "6537:7:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20_$4216_$2_memory_ptr", + "typeString": "contract IERC20[2] memory" + } + }, + "id": 710, + "indexExpression": { + "argumentTypes": null, + "id": 709, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 697, + "src": "6545:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6537:10:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6511:37:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_storage", + "typeString": "struct VirtualBalance.Data storage ref" + } + }, + "id": 712, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "scale", + "nodeType": "MemberAccess", + "referencedDeclaration": 4064, + "src": "6511:43:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$3986_storage_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$bound_to$_t_struct$_Data_$3986_storage_ptr_$", + "typeString": "function (struct VirtualBalance.Data storage pointer,uint256,uint256,uint256,uint256)" + } + }, + "id": 722, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6511:116:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 723, + "nodeType": "ExpressionStatement", + "src": "6511:116:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 730, + "name": "_decayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 692, + "src": "6690:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 731, + "name": "realBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 510, + "src": "6704:12:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 733, + "indexExpression": { + "argumentTypes": null, + "id": 732, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 697, + "src": "6717:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6704:15:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 736, + "name": "fairSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 372, + "src": "6737:10:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 734, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 416, + "src": "6721:11:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1869, + "src": "6721:15:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 737, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6721:27:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 738, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 416, + "src": "6750:11:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 724, + "name": "virtualBalancesForAddition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 115, + "src": "6645:26:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20_$4216_$_t_struct$_Data_$3986_storage_$", + "typeString": "mapping(contract IERC20 => struct VirtualBalance.Data storage ref)" + } + }, + "id": 728, + "indexExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 725, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 382, + "src": "6672:7:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20_$4216_$2_memory_ptr", + "typeString": "contract IERC20[2] memory" + } + }, + "id": 727, + "indexExpression": { + "argumentTypes": null, + "id": 726, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 697, + "src": "6680:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6672:10:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6645:38:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_storage", + "typeString": "struct VirtualBalance.Data storage ref" + } + }, + "id": 729, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "scale", + "nodeType": "MemberAccess", + "referencedDeclaration": 4064, + "src": "6645:44:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$3986_storage_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$bound_to$_t_struct$_Data_$3986_storage_ptr_$", + "typeString": "function (struct VirtualBalance.Data storage pointer,uint256,uint256,uint256,uint256)" + } + }, + "id": 739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6645:117:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 740, + "nodeType": "ExpressionStatement", + "src": "6645:117:9" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 700, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 697, + "src": "6465:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 701, + "name": "maxAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 361, + "src": "6469:10:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6469:17:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6465:21:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 742, + "initializationExpression": { + "assignments": [ + 697 + ], + "declarations": [ + { + "constant": false, + "id": 697, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 742, + "src": "6453:6:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 696, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "6453:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 699, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 698, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6462:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "6453:10:9" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "6488:3:9", + "subExpression": { + "argumentTypes": null, + "id": 704, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 697, + "src": "6488:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 706, + "nodeType": "ExpressionStatement", + "src": "6488:3:9" + }, + "nodeType": "ForStatement", + "src": "6448:329:9" + } + ] + }, + "id": 744, + "nodeType": "IfStatement", + "src": "4584:2203:9", + "trueBody": { + "id": 504, + "nodeType": "Block", + "src": "4606:571:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 428, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 423, + "name": "fairSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 372, + "src": "4620:10:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "3939", + "id": 426, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4650:2:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_99_by_1", + "typeString": "int_const 99" + }, + "value": "99" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_99_by_1", + "typeString": "int_const 99" + } + ], + "expression": { + "argumentTypes": null, + "id": 424, + "name": "_BASE_SUPPLY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 103, + "src": "4633:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1949, + "src": "4633:16:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4633:20:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4620:33:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 429, + "nodeType": "ExpressionStatement", + "src": "4620:33:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 433, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "4681:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + ], + "id": 432, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4673:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 431, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4673:7:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 434, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4673:13:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 435, + "name": "_BASE_SUPPLY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 103, + "src": "4688:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 430, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2419, + "src": "4667:5:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4667:34:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 437, + "nodeType": "ExpressionStatement", + "src": "4667:34:9" + }, + { + "body": { + "id": 502, + "nodeType": "Block", + "src": "4780:387:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 449, + "name": "fairSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 372, + "src": "4798:10:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 452, + "name": "fairSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 372, + "src": "4820:10:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 453, + "name": "maxAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 361, + "src": "4832:10:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 455, + "indexExpression": { + "argumentTypes": null, + "id": 454, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 439, + "src": "4843:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4832:13:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 450, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1840, + "src": "4811:4:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$1840_$", + "typeString": "type(library Math)" + } + }, + "id": 451, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "max", + "nodeType": "MemberAccess", + "referencedDeclaration": 1788, + "src": "4811:8:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 456, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4811:35:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4798:48:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 458, + "nodeType": "ExpressionStatement", + "src": "4798:48:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 464, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 460, + "name": "maxAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 361, + "src": "4873:10:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 462, + "indexExpression": { + "argumentTypes": null, + "id": 461, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 439, + "src": "4884:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4873:13:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 463, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4889:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "4873:17:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4d6f6f6e69737761703a20616d6f756e74206973207a65726f", + "id": 465, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4892:27:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_123962c216733f8b2d542f0fe5d32172d285ddf8ee3b2481cdd480acd4a0da43", + "typeString": "literal_string \"Mooniswap: amount is zero\"" + }, + "value": "Mooniswap: amount is zero" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_123962c216733f8b2d542f0fe5d32172d285ddf8ee3b2481cdd480acd4a0da43", + "typeString": "literal_string \"Mooniswap: amount is zero\"" + } + ], + "id": 459, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4865:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 466, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4865:55:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 467, + "nodeType": "ExpressionStatement", + "src": "4865:55:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 469, + "name": "maxAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 361, + "src": "4946:10:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 471, + "indexExpression": { + "argumentTypes": null, + "id": 470, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 439, + "src": "4957:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4946:13:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 472, + "name": "minAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 365, + "src": "4963:10:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 474, + "indexExpression": { + "argumentTypes": null, + "id": 473, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 439, + "src": "4974:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4963:13:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4946:30:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4d6f6f6e69737761703a206d696e416d6f756e74206e6f742072656163686564", + "id": 476, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4978:34:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_9e9a1b6fa17445051149091025eac645e9f9ac26aca45a04b305e8faafa79a0c", + "typeString": "literal_string \"Mooniswap: minAmount not reached\"" + }, + "value": "Mooniswap: minAmount not reached" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_9e9a1b6fa17445051149091025eac645e9f9ac26aca45a04b305e8faafa79a0c", + "typeString": "literal_string \"Mooniswap: minAmount not reached\"" + } + ], + "id": 468, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4938:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4938:75:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 478, + "nodeType": "ExpressionStatement", + "src": "4938:75:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 483, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "5059:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 484, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5059:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 487, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "5079:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + ], + "id": 486, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5071:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 485, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5071:7:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 488, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5071:13:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 489, + "name": "maxAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 361, + "src": "5086:10:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 491, + "indexExpression": { + "argumentTypes": null, + "id": 490, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 439, + "src": "5097:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5086:13:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 479, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 382, + "src": "5032:7:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20_$4216_$2_memory_ptr", + "typeString": "contract IERC20[2] memory" + } + }, + "id": 481, + "indexExpression": { + "argumentTypes": null, + "id": 480, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 439, + "src": "5040:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5032:10:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 482, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "uniTransferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 3658, + "src": "5032:26:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4216_$_t_address_payable_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$4216_$", + "typeString": "function (contract IERC20,address payable,address,uint256)" + } + }, + "id": 492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5032:68:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 493, + "nodeType": "ExpressionStatement", + "src": "5032:68:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 500, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 494, + "name": "receivedAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "5118:15:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 496, + "indexExpression": { + "argumentTypes": null, + "id": 495, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 439, + "src": "5134:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "5118:18:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 497, + "name": "maxAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 361, + "src": "5139:10:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 499, + "indexExpression": { + "argumentTypes": null, + "id": 498, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 439, + "src": "5150:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5139:13:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "5118:34:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 501, + "nodeType": "ExpressionStatement", + "src": "5118:34:9" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 442, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 439, + "src": "4752:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 443, + "name": "maxAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 361, + "src": "4756:10:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4756:17:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4752:21:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 503, + "initializationExpression": { + "assignments": [ + 439 + ], + "declarations": [ + { + "constant": false, + "id": 439, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 503, + "src": "4740:6:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 438, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4740:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 441, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 440, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4749:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "4740:10:9" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 447, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "4775:3:9", + "subExpression": { + "argumentTypes": null, + "id": 446, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 439, + "src": "4775:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 448, + "nodeType": "ExpressionStatement", + "src": "4775:3:9" + }, + "nodeType": "ForStatement", + "src": "4735:432:9" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 748, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 746, + "name": "fairSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 372, + "src": "6805:10:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 747, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6818:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "6805:14:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4d6f6f6e69737761703a20726573756c74206973206e6f7420656e6f756768", + "id": 749, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6821:33:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a6f187b81185e9dc7c35c1c8ed11211ebdda252da15ce4801fc8a6fff7f1d1b7", + "typeString": "literal_string \"Mooniswap: result is not enough\"" + }, + "value": "Mooniswap: result is not enough" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a6f187b81185e9dc7c35c1c8ed11211ebdda252da15ce4801fc8a6fff7f1d1b7", + "typeString": "literal_string \"Mooniswap: result is not enough\"" + } + ], + "id": 745, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "6797:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6797:58:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 751, + "nodeType": "ExpressionStatement", + "src": "6797:58:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 753, + "name": "target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 367, + "src": "6871:6:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 754, + "name": "fairSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 372, + "src": "6879:10:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 752, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2419, + "src": "6865:5:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6865:25:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 756, + "nodeType": "ExpressionStatement", + "src": "6865:25:9" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 758, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "6916:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6916:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 760, + "name": "target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 367, + "src": "6928:6:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 761, + "name": "fairSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 372, + "src": "6936:10:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 762, + "name": "receivedAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "6948:15:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 764, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 763, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6964:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6948:18:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 765, + "name": "receivedAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 376, + "src": "6968:15:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 767, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 766, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6984:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6968:18:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 757, + "name": "Deposited", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 54, + "src": "6906:9:9", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256,uint256,uint256)" + } + }, + "id": 768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6906:81:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 769, + "nodeType": "EmitStatement", + "src": "6901:86:9" + } + ] + }, + "documentation": null, + "functionSelector": "9ea5ce0a", + "id": 771, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 370, + "modifierName": { + "argumentTypes": null, + "id": 369, + "name": "nonReentrant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4568, + "src": "4255:12:9", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "4255:12:9" + } + ], + "name": "depositFor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 368, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 361, + "mutability": "mutable", + "name": "maxAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 771, + "src": "4164:28:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2]" + }, + "typeName": { + "baseType": { + "id": 358, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4164:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 360, + "length": { + "argumentTypes": null, + "hexValue": "32", + "id": 359, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4172:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "ArrayTypeName", + "src": "4164:10:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_storage_ptr", + "typeString": "uint256[2]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 365, + "mutability": "mutable", + "name": "minAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 771, + "src": "4194:28:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2]" + }, + "typeName": { + "baseType": { + "id": 362, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4194:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 364, + "length": { + "argumentTypes": null, + "hexValue": "32", + "id": 363, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4202:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "ArrayTypeName", + "src": "4194:10:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_storage_ptr", + "typeString": "uint256[2]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 367, + "mutability": "mutable", + "name": "target", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 771, + "src": "4224:14:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 366, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4224:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4163:76:9" + }, + "returnParameters": { + "id": 377, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 372, + "mutability": "mutable", + "name": "fairSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 771, + "src": "4276:18:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 371, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4276:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 376, + "mutability": "mutable", + "name": "receivedAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 771, + "src": "4296:33:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2]" + }, + "typeName": { + "baseType": { + "id": 373, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4296:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 375, + "length": { + "argumentTypes": null, + "hexValue": "32", + "id": 374, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4304:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "ArrayTypeName", + "src": "4296:10:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_storage_ptr", + "typeString": "uint256[2]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4275:55:9" + }, + "scope": 1767, + "src": "4144:2850:9", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 790, + "nodeType": "Block", + "src": "7116:67:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 784, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 773, + "src": "7145:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 785, + "name": "minReturns", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "7153:10:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 786, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7165:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 787, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7165:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 783, + "name": "withdrawFor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 938, + "src": "7133:11:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_array$_t_uint256_$dyn_memory_ptr_$_t_address_payable_$returns$_t_array$_t_uint256_$2_memory_ptr_$", + "typeString": "function (uint256,uint256[] memory,address payable) returns (uint256[2] memory)" + } + }, + "id": 788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7133:43:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "functionReturnParameters": 782, + "id": 789, + "nodeType": "Return", + "src": "7126:50:9" + } + ] + }, + "documentation": null, + "functionSelector": "5915d806", + "id": 791, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "withdraw", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 777, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 773, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 791, + "src": "7018:14:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 772, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7018:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 776, + "mutability": "mutable", + "name": "minReturns", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 791, + "src": "7034:27:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 774, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7034:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 775, + "length": null, + "nodeType": "ArrayTypeName", + "src": "7034:9:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7017:45:9" + }, + "returnParameters": { + "id": 782, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 781, + "mutability": "mutable", + "name": "withdrawnAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 791, + "src": "7080:34:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2]" + }, + "typeName": { + "baseType": { + "id": 778, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7080:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 780, + "length": { + "argumentTypes": null, + "hexValue": "32", + "id": 779, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7088:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "ArrayTypeName", + "src": "7080:10:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_storage_ptr", + "typeString": "uint256[2]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7079:36:9" + }, + "scope": 1767, + "src": "7000:183:9", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 937, + "nodeType": "Block", + "src": "7343:965:9", + "statements": [ + { + "assignments": [ + 811 + ], + "declarations": [ + { + "constant": false, + "id": 811, + "mutability": "mutable", + "name": "_tokens", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 937, + "src": "7353:24:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20_$4216_$2_memory_ptr", + "typeString": "contract IERC20[2]" + }, + "typeName": { + "baseType": { + "contractScope": null, + "id": 809, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "7353:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 810, + "length": { + "argumentTypes": null, + "hexValue": "32", + "id": 808, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7360:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "ArrayTypeName", + "src": "7353:9:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20_$4216_$2_storage_ptr", + "typeString": "contract IERC20[2]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 815, + "initialValue": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 812, + "name": "token0", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 105, + "src": "7381:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + { + "argumentTypes": null, + "id": 813, + "name": "token1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 107, + "src": "7389:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + } + ], + "id": 814, + "isConstant": false, + "isInlineArray": true, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "7380:16:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20_$4216_$2_memory_ptr", + "typeString": "contract IERC20[2] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7353:43:9" + }, + { + "assignments": [ + 817 + ], + "declarations": [ + { + "constant": false, + "id": 817, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 937, + "src": "7407:19:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 816, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7407:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 820, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 818, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2129, + "src": "7429:11:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 819, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7429:13:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7407:35:9" + }, + { + "assignments": [ + 822 + ], + "declarations": [ + { + "constant": false, + "id": 822, + "mutability": "mutable", + "name": "_decayPeriod", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 937, + "src": "7452:20:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 821, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7452:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 825, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 823, + "name": "decayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2714, + "src": "7475:11:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7475:13:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7452:36:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 827, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "7520:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7520:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 829, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 793, + "src": "7532:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 826, + "name": "_burn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2475, + "src": "7514:5:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7514:25:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 831, + "nodeType": "ExpressionStatement", + "src": "7514:25:9" + }, + { + "body": { + "id": 922, + "nodeType": "Block", + "src": "7592:615:9", + "statements": [ + { + "assignments": [ + 844 + ], + "declarations": [ + { + "constant": false, + "id": 844, + "mutability": "mutable", + "name": "token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 922, + "src": "7606:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 843, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "7606:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 848, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 845, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 811, + "src": "7621:7:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20_$4216_$2_memory_ptr", + "typeString": "contract IERC20[2] memory" + } + }, + "id": 847, + "indexExpression": { + "argumentTypes": null, + "id": 846, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 833, + "src": "7629:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7621:10:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7606:25:9" + }, + { + "assignments": [ + 850 + ], + "declarations": [ + { + "constant": false, + "id": 850, + "mutability": "mutable", + "name": "preBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 922, + "src": "7646:18:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 849, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7646:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 858, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 855, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "7694:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + ], + "id": 854, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7686:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 853, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7686:7:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7686:13:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 851, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 844, + "src": "7667:5:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "uniBalanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 3551, + "src": "7667:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$4216_$_t_address_$returns$_t_uint256_$bound_to$_t_contract$_IERC20_$4216_$", + "typeString": "function (contract IERC20,address) view returns (uint256)" + } + }, + "id": 857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7667:33:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7646:54:9" + }, + { + "assignments": [ + 860 + ], + "declarations": [ + { + "constant": false, + "id": 860, + "mutability": "mutable", + "name": "value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 922, + "src": "7714:13:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 859, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7714:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 868, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 866, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 817, + "src": "7757:11:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 863, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 793, + "src": "7745:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 861, + "name": "preBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 850, + "src": "7730:10:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1949, + "src": "7730:14:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7730:22:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1966, + "src": "7730:26:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 867, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7730:39:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7714:55:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 872, + "name": "target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 798, + "src": "7801:6:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 873, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 860, + "src": "7809:5:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 869, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 844, + "src": "7783:5:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 871, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "uniTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 3585, + "src": "7783:17:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4216_$_t_address_payable_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$4216_$", + "typeString": "function (contract IERC20,address payable,uint256)" + } + }, + "id": 874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7783:32:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 875, + "nodeType": "ExpressionStatement", + "src": "7783:32:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 880, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 876, + "name": "withdrawnAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 805, + "src": "7829:16:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 878, + "indexExpression": { + "argumentTypes": null, + "id": 877, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 833, + "src": "7846:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "7829:19:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 879, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 860, + "src": "7851:5:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7829:27:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 881, + "nodeType": "ExpressionStatement", + "src": "7829:27:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 883, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 833, + "src": "7878:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 884, + "name": "minReturns", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "7883:10:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 885, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7883:17:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7878:22:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 887, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 860, + "src": "7904:5:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 888, + "name": "minReturns", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 796, + "src": "7913:10:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 890, + "indexExpression": { + "argumentTypes": null, + "id": 889, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 833, + "src": "7924:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7913:13:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7904:22:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7878:48:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4d6f6f6e69737761703a20726573756c74206973206e6f7420656e6f756768", + "id": 893, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7928:33:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a6f187b81185e9dc7c35c1c8ed11211ebdda252da15ce4801fc8a6fff7f1d1b7", + "typeString": "literal_string \"Mooniswap: result is not enough\"" + }, + "value": "Mooniswap: result is not enough" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a6f187b81185e9dc7c35c1c8ed11211ebdda252da15ce4801fc8a6fff7f1d1b7", + "typeString": "literal_string \"Mooniswap: result is not enough\"" + } + ], + "id": 882, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "7870:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7870:92:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 895, + "nodeType": "ExpressionStatement", + "src": "7870:92:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 900, + "name": "_decayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 822, + "src": "8017:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 901, + "name": "preBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 850, + "src": "8031:10:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 904, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 793, + "src": "8059:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 902, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 817, + "src": "8043:11:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1886, + "src": "8043:15:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8043:23:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 906, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 817, + "src": "8068:11:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 896, + "name": "virtualBalancesForAddition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 115, + "src": "7977:26:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20_$4216_$_t_struct$_Data_$3986_storage_$", + "typeString": "mapping(contract IERC20 => struct VirtualBalance.Data storage ref)" + } + }, + "id": 898, + "indexExpression": { + "argumentTypes": null, + "id": 897, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 844, + "src": "8004:5:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7977:33:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_storage", + "typeString": "struct VirtualBalance.Data storage ref" + } + }, + "id": 899, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "scale", + "nodeType": "MemberAccess", + "referencedDeclaration": 4064, + "src": "7977:39:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$3986_storage_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$bound_to$_t_struct$_Data_$3986_storage_ptr_$", + "typeString": "function (struct VirtualBalance.Data storage pointer,uint256,uint256,uint256,uint256)" + } + }, + "id": 907, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7977:103:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 908, + "nodeType": "ExpressionStatement", + "src": "7977:103:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 913, + "name": "_decayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 822, + "src": "8133:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 914, + "name": "preBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 850, + "src": "8147:10:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 917, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 793, + "src": "8175:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 915, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 817, + "src": "8159:11:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1886, + "src": "8159:15:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8159:23:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 919, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 817, + "src": "8184:11:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 909, + "name": "virtualBalancesForRemoval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "8094:25:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20_$4216_$_t_struct$_Data_$3986_storage_$", + "typeString": "mapping(contract IERC20 => struct VirtualBalance.Data storage ref)" + } + }, + "id": 911, + "indexExpression": { + "argumentTypes": null, + "id": 910, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 844, + "src": "8120:5:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8094:32:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_storage", + "typeString": "struct VirtualBalance.Data storage ref" + } + }, + "id": 912, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "scale", + "nodeType": "MemberAccess", + "referencedDeclaration": 4064, + "src": "8094:38:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$3986_storage_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$bound_to$_t_struct$_Data_$3986_storage_ptr_$", + "typeString": "function (struct VirtualBalance.Data storage pointer,uint256,uint256,uint256,uint256)" + } + }, + "id": 920, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8094:102:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 921, + "nodeType": "ExpressionStatement", + "src": "8094:102:9" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 836, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 833, + "src": "7567:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 837, + "name": "_tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 811, + "src": "7571:7:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_contract$_IERC20_$4216_$2_memory_ptr", + "typeString": "contract IERC20[2] memory" + } + }, + "id": 838, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7571:14:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7567:18:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 923, + "initializationExpression": { + "assignments": [ + 833 + ], + "declarations": [ + { + "constant": false, + "id": 833, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 923, + "src": "7555:6:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 832, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "7555:4:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 835, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 834, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7564:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "7555:10:9" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "7587:3:9", + "subExpression": { + "argumentTypes": null, + "id": 840, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 833, + "src": "7587:1:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 842, + "nodeType": "ExpressionStatement", + "src": "7587:3:9" + }, + "nodeType": "ForStatement", + "src": "7550:657:9" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 925, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8232:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 926, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8232:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 927, + "name": "target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 798, + "src": "8244:6:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 928, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 793, + "src": "8252:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 929, + "name": "withdrawnAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 805, + "src": "8260:16:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 931, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 930, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8277:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8260:19:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 932, + "name": "withdrawnAmounts", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 805, + "src": "8281:16:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2] memory" + } + }, + "id": 934, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 933, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8298:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8281:19:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 924, + "name": "Withdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "8222:9:9", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256,uint256,uint256)" + } + }, + "id": 935, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8222:79:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 936, + "nodeType": "EmitStatement", + "src": "8217:84:9" + } + ] + }, + "documentation": null, + "functionSelector": "3c6216a6", + "id": 938, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 801, + "modifierName": { + "argumentTypes": null, + "id": 800, + "name": "nonReentrant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4568, + "src": "7286:12:9", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7286:12:9" + } + ], + "name": "withdrawFor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 799, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 793, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 938, + "src": "7210:14:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 792, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7210:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 796, + "mutability": "mutable", + "name": "minReturns", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 938, + "src": "7226:27:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 794, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7226:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 795, + "length": null, + "nodeType": "ArrayTypeName", + "src": "7226:9:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 798, + "mutability": "mutable", + "name": "target", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 938, + "src": "7255:22:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 797, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7255:15:9", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7209:69:9" + }, + "returnParameters": { + "id": 806, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 805, + "mutability": "mutable", + "name": "withdrawnAmounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 938, + "src": "7307:34:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_memory_ptr", + "typeString": "uint256[2]" + }, + "typeName": { + "baseType": { + "id": 802, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7307:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 804, + "length": { + "argumentTypes": null, + "hexValue": "32", + "id": 803, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7315:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "ArrayTypeName", + "src": "7307:10:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$2_storage_ptr", + "typeString": "uint256[2]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7306:36:9" + }, + "scope": 1767, + "src": "7189:1119:9", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 963, + "nodeType": "Block", + "src": "8446:82:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 954, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 940, + "src": "8471:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + { + "argumentTypes": null, + "id": 955, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 942, + "src": "8476:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + { + "argumentTypes": null, + "id": 956, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 944, + "src": "8481:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 957, + "name": "minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 946, + "src": "8489:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 958, + "name": "referral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 948, + "src": "8500:8:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 959, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8510:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 960, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8510:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 953, + "name": "swapFor", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1107, + "src": "8463:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4216_$_t_contract$_IERC20_$4216_$_t_uint256_$_t_uint256_$_t_address_$_t_address_payable_$returns$_t_uint256_$", + "typeString": "function (contract IERC20,contract IERC20,uint256,uint256,address,address payable) returns (uint256)" + } + }, + "id": 961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8463:58:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 952, + "id": 962, + "nodeType": "Return", + "src": "8456:65:9" + } + ] + }, + "documentation": null, + "functionSelector": "d5bcb9b5", + "id": 964, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "swap", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 949, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 940, + "mutability": "mutable", + "name": "src", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 964, + "src": "8328:10:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 939, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "8328:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 942, + "mutability": "mutable", + "name": "dst", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 964, + "src": "8340:10:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 941, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "8340:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 944, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 964, + "src": "8352:14:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 943, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8352:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 946, + "mutability": "mutable", + "name": "minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 964, + "src": "8368:17:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 945, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8368:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 948, + "mutability": "mutable", + "name": "referral", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 964, + "src": "8387:16:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 947, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8387:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8327:77:9" + }, + "returnParameters": { + "id": 952, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 951, + "mutability": "mutable", + "name": "result", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 964, + "src": "8430:14:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 950, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8430:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8429:16:9" + }, + "scope": 1767, + "src": "8314:214:9", + "stateMutability": "payable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 1106, + "nodeType": "Block", + "src": "8722:936:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 995, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 986, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8740:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 987, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8740:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 988, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 966, + "src": "8754:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isETH", + "nodeType": "MemberAccess", + "referencedDeclaration": 3527, + "src": "8754:9:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_contract$_IERC20_$4216_$returns$_t_bool_$bound_to$_t_contract$_IERC20_$4216_$", + "typeString": "function (contract IERC20) pure returns (bool)" + } + }, + "id": 990, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8754:11:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 992, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8777:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "id": 993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "8754:24:9", + "trueExpression": { + "argumentTypes": null, + "id": 991, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 970, + "src": "8768:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 994, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "8753:26:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8740:39:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4d6f6f6e69737761703a2077726f6e672076616c7565207573616765", + "id": 996, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8781:30:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_a46874337e04f5973e81e0ae555d34c1cb1861f3f6823e991de227eba323bc91", + "typeString": "literal_string \"Mooniswap: wrong value usage\"" + }, + "value": "Mooniswap: wrong value usage" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_a46874337e04f5973e81e0ae555d34c1cb1861f3f6823e991de227eba323bc91", + "typeString": "literal_string \"Mooniswap: wrong value usage\"" + } + ], + "id": 985, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "8732:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 997, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8732:80:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 998, + "nodeType": "ExpressionStatement", + "src": "8732:80:9" + }, + { + "assignments": [ + 1000 + ], + "declarations": [ + { + "constant": false, + "id": 1000, + "mutability": "mutable", + "name": "balances", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1106, + "src": "8823:24:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances" + }, + "typeName": { + "contractScope": null, + "id": 999, + "name": "Balances", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 28, + "src": "8823:8:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_storage_ptr", + "typeString": "struct Mooniswap.Balances" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1026, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 1010, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 966, + "src": "8914:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 1011, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isETH", + "nodeType": "MemberAccess", + "referencedDeclaration": 3527, + "src": "8914:9:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_contract$_IERC20_$4216_$returns$_t_bool_$bound_to$_t_contract$_IERC20_$4216_$", + "typeString": "function (contract IERC20) pure returns (bool)" + } + }, + "id": 1012, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8914:11:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1015, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8940:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "id": 1016, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "8914:27:9", + "trueExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1013, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "8928:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1014, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "8928:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1006, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "8903:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + ], + "id": 1005, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8895:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1004, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8895:7:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1007, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8895:13:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1002, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 966, + "src": "8878:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 1003, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "uniBalanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 3551, + "src": "8878:16:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$4216_$_t_address_$returns$_t_uint256_$bound_to$_t_contract$_IERC20_$4216_$", + "typeString": "function (contract IERC20,address) view returns (uint256)" + } + }, + "id": 1008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8878:31:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1886, + "src": "8878:35:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1017, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8878:64:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1022, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "8986:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + ], + "id": 1021, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "8978:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1020, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8978:7:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8978:13:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1018, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 968, + "src": "8961:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 1019, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "uniBalanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 3551, + "src": "8961:16:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$4216_$_t_address_$returns$_t_uint256_$bound_to$_t_contract$_IERC20_$4216_$", + "typeString": "function (contract IERC20,address) view returns (uint256)" + } + }, + "id": 1024, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8961:31:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1001, + "name": "Balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "8850:8:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Balances_$28_storage_ptr_$", + "typeString": "type(struct Mooniswap.Balances storage pointer)" + } + }, + "id": 1025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "src", + "dst" + ], + "nodeType": "FunctionCall", + "src": "8850:153:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8823:180:9" + }, + { + "assignments": [ + 1028 + ], + "declarations": [ + { + "constant": false, + "id": 1028, + "mutability": "mutable", + "name": "confirmed", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1106, + "src": "9013:17:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1027, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9013:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1029, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "9013:17:9" + }, + { + "assignments": [ + 1031 + ], + "declarations": [ + { + "constant": false, + "id": 1031, + "mutability": "mutable", + "name": "virtualBalances", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1106, + "src": "9040:31:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances" + }, + "typeName": { + "contractScope": null, + "id": 1030, + "name": "Balances", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 28, + "src": "9040:8:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_storage_ptr", + "typeString": "struct Mooniswap.Balances" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1032, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "9040:31:9" + }, + { + "assignments": [ + 1034 + ], + "declarations": [ + { + "constant": false, + "id": 1034, + "mutability": "mutable", + "name": "fees", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1106, + "src": "9081:16:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fees_$38_memory_ptr", + "typeString": "struct Mooniswap.Fees" + }, + "typeName": { + "contractScope": null, + "id": 1033, + "name": "Fees", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 38, + "src": "9081:4:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fees_$38_storage_ptr", + "typeString": "struct Mooniswap.Fees" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1041, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1036, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2692, + "src": "9124:3:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 1037, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9124:5:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1038, + "name": "slippageFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2703, + "src": "9156:11:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 1039, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9156:13:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1035, + "name": "Fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 38, + "src": "9100:4:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Fees_$38_storage_ptr_$", + "typeString": "type(struct Mooniswap.Fees storage pointer)" + } + }, + "id": 1040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "fee", + "slippageFee" + ], + "nodeType": "FunctionCall", + "src": "9100:80:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fees_$38_memory_ptr", + "typeString": "struct Mooniswap.Fees memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9081:99:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 1055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 1042, + "name": "confirmed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "9191:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1043, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 983, + "src": "9202:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1044, + "name": "virtualBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1031, + "src": "9210:15:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + } + ], + "id": 1045, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "9190:36:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_struct$_Balances_$28_memory_ptr_$", + "typeString": "tuple(uint256,uint256,struct Mooniswap.Balances memory)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1047, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 966, + "src": "9242:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + { + "argumentTypes": null, + "id": 1048, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 968, + "src": "9247:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + { + "argumentTypes": null, + "id": 1049, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 970, + "src": "9252:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1050, + "name": "minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 972, + "src": "9260:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1051, + "name": "receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 976, + "src": "9271:8:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1052, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1000, + "src": "9281:8:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + { + "argumentTypes": null, + "id": 1053, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1034, + "src": "9291:4:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fees_$38_memory_ptr", + "typeString": "struct Mooniswap.Fees memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + }, + { + "typeIdentifier": "t_struct$_Fees_$38_memory_ptr", + "typeString": "struct Mooniswap.Fees memory" + } + ], + "id": 1046, + "name": "_doTransfers", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1300, + "src": "9229:12:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4216_$_t_contract$_IERC20_$4216_$_t_uint256_$_t_uint256_$_t_address_payable_$_t_struct$_Balances_$28_memory_ptr_$_t_struct$_Fees_$38_memory_ptr_$returns$_t_uint256_$_t_uint256_$_t_struct$_Balances_$28_memory_ptr_$", + "typeString": "function (contract IERC20,contract IERC20,uint256,uint256,address payable,struct Mooniswap.Balances memory,struct Mooniswap.Fees memory) returns (uint256,uint256,struct Mooniswap.Balances memory)" + } + }, + "id": 1054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9229:67:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_struct$_Balances_$28_memory_ptr_$", + "typeString": "tuple(uint256,uint256,struct Mooniswap.Balances memory)" + } + }, + "src": "9190:106:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1056, + "nodeType": "ExpressionStatement", + "src": "9190:106:9" + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1058, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "9319:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1059, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9319:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1060, + "name": "receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 976, + "src": "9331:8:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1063, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 966, + "src": "9349:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + ], + "id": 1062, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9341:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1061, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9341:7:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9341:12:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1067, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 968, + "src": "9363:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + ], + "id": 1066, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9355:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1065, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9355:7:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1068, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9355:12:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1069, + "name": "confirmed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "9369:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1070, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 983, + "src": "9380:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1071, + "name": "virtualBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1031, + "src": "9388:15:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + "id": 1072, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "src", + "nodeType": "MemberAccess", + "referencedDeclaration": 25, + "src": "9388:19:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1073, + "name": "virtualBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1031, + "src": "9409:15:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + "id": 1074, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "dst", + "nodeType": "MemberAccess", + "referencedDeclaration": 27, + "src": "9409:19:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1075, + "name": "referral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 974, + "src": "9430:8:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1057, + "name": "Swapped", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 86, + "src": "9311:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_address_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_address_$returns$__$", + "typeString": "function (address,address,address,address,uint256,uint256,uint256,uint256,address)" + } + }, + "id": 1076, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9311:128:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1077, + "nodeType": "EmitStatement", + "src": "9306:133:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1079, + "name": "confirmed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "9462:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1080, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 983, + "src": "9473:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1081, + "name": "referral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 974, + "src": "9481:8:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1082, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1000, + "src": "9491:8:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + { + "argumentTypes": null, + "id": 1083, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1034, + "src": "9501:4:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fees_$38_memory_ptr", + "typeString": "struct Mooniswap.Fees memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + }, + { + "typeIdentifier": "t_struct$_Fees_$38_memory_ptr", + "typeString": "struct Mooniswap.Fees memory" + } + ], + "id": 1078, + "name": "_mintRewards", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1581, + "src": "9449:12:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_address_$_t_struct$_Balances_$28_memory_ptr_$_t_struct$_Fees_$38_memory_ptr_$returns$__$", + "typeString": "function (uint256,uint256,address,struct Mooniswap.Balances memory,struct Mooniswap.Fees memory)" + } + }, + "id": 1084, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9449:57:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1085, + "nodeType": "ExpressionStatement", + "src": "9449:57:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 1094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1086, + "name": "volumes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 111, + "src": "9559:7:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20_$4216_$_t_struct$_SwapVolumes_$33_storage_$", + "typeString": "mapping(contract IERC20 => struct Mooniswap.SwapVolumes storage ref)" + } + }, + "id": 1088, + "indexExpression": { + "argumentTypes": null, + "id": 1087, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 966, + "src": "9567:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9559:12:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_SwapVolumes_$33_storage", + "typeString": "struct Mooniswap.SwapVolumes storage ref" + } + }, + "id": 1089, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "confirmed", + "nodeType": "MemberAccess", + "referencedDeclaration": 30, + "src": "9559:22:9", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1092, + "name": "confirmed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1028, + "src": "9593:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1091, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9585:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 1090, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "9585:7:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9585:18:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "9559:44:9", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 1095, + "nodeType": "ExpressionStatement", + "src": "9559:44:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 1104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1096, + "name": "volumes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 111, + "src": "9613:7:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20_$4216_$_t_struct$_SwapVolumes_$33_storage_$", + "typeString": "mapping(contract IERC20 => struct Mooniswap.SwapVolumes storage ref)" + } + }, + "id": 1098, + "indexExpression": { + "argumentTypes": null, + "id": 1097, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 966, + "src": "9621:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9613:12:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_SwapVolumes_$33_storage", + "typeString": "struct Mooniswap.SwapVolumes storage ref" + } + }, + "id": 1099, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "result", + "nodeType": "MemberAccess", + "referencedDeclaration": 32, + "src": "9613:19:9", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "nodeType": "Assignment", + "operator": "+=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1102, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 983, + "src": "9644:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1101, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "9636:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint128_$", + "typeString": "type(uint128)" + }, + "typeName": { + "id": 1100, + "name": "uint128", + "nodeType": "ElementaryTypeName", + "src": "9636:7:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9636:15:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "src": "9613:38:9", + "typeDescriptions": { + "typeIdentifier": "t_uint128", + "typeString": "uint128" + } + }, + "id": 1105, + "nodeType": "ExpressionStatement", + "src": "9613:38:9" + } + ] + }, + "documentation": null, + "functionSelector": "e331d039", + "id": 1107, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 979, + "modifierName": { + "argumentTypes": null, + "id": 978, + "name": "nonReentrant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4568, + "src": "8669:12:9", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8669:12:9" + }, + { + "arguments": null, + "id": 981, + "modifierName": { + "argumentTypes": null, + "id": 980, + "name": "whenNotShutdown", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 130, + "src": "8682:15:9", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8682:15:9" + } + ], + "name": "swapFor", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 977, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 966, + "mutability": "mutable", + "name": "src", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1107, + "src": "8551:10:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 965, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "8551:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 968, + "mutability": "mutable", + "name": "dst", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1107, + "src": "8563:10:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 967, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "8563:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 970, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1107, + "src": "8575:14:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 969, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8575:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 972, + "mutability": "mutable", + "name": "minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1107, + "src": "8591:17:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 971, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8591:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 974, + "mutability": "mutable", + "name": "referral", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1107, + "src": "8610:16:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 973, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8610:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 976, + "mutability": "mutable", + "name": "receiver", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1107, + "src": "8628:24:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 975, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8628:15:9", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8550:103:9" + }, + "returnParameters": { + "id": 984, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 983, + "mutability": "mutable", + "name": "result", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1107, + "src": "8706:14:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 982, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8706:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8705:16:9" + }, + "scope": 1767, + "src": "8534:1124:9", + "stateMutability": "payable", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 1299, + "nodeType": "Block", + "src": "9911:1368:9", + "statements": [ + { + "assignments": [ + 1131 + ], + "declarations": [ + { + "constant": false, + "id": 1131, + "mutability": "mutable", + "name": "_decayPeriod", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1299, + "src": "9921:20:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1130, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9921:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1134, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1132, + "name": "decayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2714, + "src": "9944:11:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 1133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9944:13:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9921:36:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 1146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1135, + "name": "virtualBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1128, + "src": "9967:15:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + "id": 1137, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "src", + "nodeType": "MemberAccess", + "referencedDeclaration": 25, + "src": "9967:19:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1142, + "name": "_decayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1131, + "src": "10029:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1143, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1119, + "src": "10043:8:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + "id": 1144, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "src", + "nodeType": "MemberAccess", + "referencedDeclaration": 25, + "src": "10043:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1138, + "name": "virtualBalancesForAddition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 115, + "src": "9989:26:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20_$4216_$_t_struct$_Data_$3986_storage_$", + "typeString": "mapping(contract IERC20 => struct VirtualBalance.Data storage ref)" + } + }, + "id": 1140, + "indexExpression": { + "argumentTypes": null, + "id": 1139, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1109, + "src": "10016:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9989:31:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_storage", + "typeString": "struct VirtualBalance.Data storage ref" + } + }, + "id": 1141, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "current", + "nodeType": "MemberAccess", + "referencedDeclaration": 4114, + "src": "9989:39:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$3986_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_Data_$3986_memory_ptr_$", + "typeString": "function (struct VirtualBalance.Data memory,uint256,uint256) view returns (uint256)" + } + }, + "id": 1145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9989:67:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9967:89:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1147, + "nodeType": "ExpressionStatement", + "src": "9967:89:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 1158, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1148, + "name": "virtualBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1128, + "src": "10066:15:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + "id": 1150, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "src", + "nodeType": "MemberAccess", + "referencedDeclaration": 25, + "src": "10066:19:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1153, + "name": "virtualBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1128, + "src": "10097:15:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + "id": 1154, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "src", + "nodeType": "MemberAccess", + "referencedDeclaration": 25, + "src": "10097:19:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1155, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1119, + "src": "10118:8:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + "id": 1156, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "src", + "nodeType": "MemberAccess", + "referencedDeclaration": 25, + "src": "10118:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1151, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1840, + "src": "10088:4:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$1840_$", + "typeString": "type(library Math)" + } + }, + "id": 1152, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "max", + "nodeType": "MemberAccess", + "referencedDeclaration": 1788, + "src": "10088:8:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1157, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10088:43:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10066:65:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1159, + "nodeType": "ExpressionStatement", + "src": "10066:65:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 1171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1160, + "name": "virtualBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1128, + "src": "10141:15:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + "id": 1162, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "dst", + "nodeType": "MemberAccess", + "referencedDeclaration": 27, + "src": "10141:19:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1167, + "name": "_decayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1131, + "src": "10202:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1168, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1119, + "src": "10216:8:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + "id": 1169, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "dst", + "nodeType": "MemberAccess", + "referencedDeclaration": 27, + "src": "10216:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1163, + "name": "virtualBalancesForRemoval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "10163:25:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20_$4216_$_t_struct$_Data_$3986_storage_$", + "typeString": "mapping(contract IERC20 => struct VirtualBalance.Data storage ref)" + } + }, + "id": 1165, + "indexExpression": { + "argumentTypes": null, + "id": 1164, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "10189:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10163:30:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_storage", + "typeString": "struct VirtualBalance.Data storage ref" + } + }, + "id": 1166, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "current", + "nodeType": "MemberAccess", + "referencedDeclaration": 4114, + "src": "10163:38:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$3986_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_Data_$3986_memory_ptr_$", + "typeString": "function (struct VirtualBalance.Data memory,uint256,uint256) view returns (uint256)" + } + }, + "id": 1170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10163:66:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10141:88:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1172, + "nodeType": "ExpressionStatement", + "src": "10141:88:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 1183, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1173, + "name": "virtualBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1128, + "src": "10239:15:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + "id": 1175, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "dst", + "nodeType": "MemberAccess", + "referencedDeclaration": 27, + "src": "10239:19:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1178, + "name": "virtualBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1128, + "src": "10270:15:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + "id": 1179, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "dst", + "nodeType": "MemberAccess", + "referencedDeclaration": 27, + "src": "10270:19:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1180, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1119, + "src": "10291:8:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + "id": 1181, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "dst", + "nodeType": "MemberAccess", + "referencedDeclaration": 27, + "src": "10291:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1176, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1840, + "src": "10261:4:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$1840_$", + "typeString": "type(library Math)" + } + }, + "id": 1177, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 1806, + "src": "10261:8:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1182, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10261:43:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10239:65:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1184, + "nodeType": "ExpressionStatement", + "src": "10239:65:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1188, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "10334:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1189, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10334:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1192, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "10354:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + ], + "id": 1191, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10346:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1190, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10346:7:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10346:13:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1194, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1113, + "src": "10361:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1185, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1109, + "src": "10314:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 1187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "uniTransferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 3658, + "src": "10314:19:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4216_$_t_address_payable_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$4216_$", + "typeString": "function (contract IERC20,address payable,address,uint256)" + } + }, + "id": 1195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10314:54:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1196, + "nodeType": "ExpressionStatement", + "src": "10314:54:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 1209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1197, + "name": "confirmed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1124, + "src": "10378:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1206, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1119, + "src": "10426:8:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + "id": 1207, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "src", + "nodeType": "MemberAccess", + "referencedDeclaration": 25, + "src": "10426:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1202, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "10415:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + ], + "id": 1201, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "10407:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1200, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10407:7:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10407:13:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1198, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1109, + "src": "10390:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 1199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "uniBalanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 3551, + "src": "10390:16:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$4216_$_t_address_$returns$_t_uint256_$bound_to$_t_contract$_IERC20_$4216_$", + "typeString": "function (contract IERC20,address) view returns (uint256)" + } + }, + "id": 1204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10390:31:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1886, + "src": "10390:35:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1208, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10390:49:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10378:61:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1210, + "nodeType": "ExpressionStatement", + "src": "10378:61:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 1225, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1211, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1126, + "src": "10449:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1213, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1109, + "src": "10469:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + { + "argumentTypes": null, + "id": 1214, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "10474:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + { + "argumentTypes": null, + "id": 1215, + "name": "confirmed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1124, + "src": "10479:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1216, + "name": "virtualBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1128, + "src": "10490:15:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + "id": 1217, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "src", + "nodeType": "MemberAccess", + "referencedDeclaration": 25, + "src": "10490:19:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1218, + "name": "virtualBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1128, + "src": "10511:15:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + "id": 1219, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "dst", + "nodeType": "MemberAccess", + "referencedDeclaration": 27, + "src": "10511:19:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1220, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "10532:4:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fees_$38_memory_ptr", + "typeString": "struct Mooniswap.Fees memory" + } + }, + "id": 1221, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "fee", + "nodeType": "MemberAccess", + "referencedDeclaration": 35, + "src": "10532:8:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1222, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1121, + "src": "10542:4:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fees_$38_memory_ptr", + "typeString": "struct Mooniswap.Fees memory" + } + }, + "id": 1223, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "slippageFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 37, + "src": "10542:16:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1212, + "name": "_getReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1688, + "src": "10458:10:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$4216_$_t_contract$_IERC20_$4216_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (contract IERC20,contract IERC20,uint256,uint256,uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1224, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10458:101:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10449:110:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1226, + "nodeType": "ExpressionStatement", + "src": "10449:110:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1234, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1230, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1228, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1126, + "src": "10577:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1229, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10586:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "10577:10:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1233, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1231, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1126, + "src": "10591:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1232, + "name": "minReturn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1115, + "src": "10601:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10591:19:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "10577:33:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4d6f6f6e69737761703a2072657475726e206973206e6f7420656e6f756768", + "id": 1235, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "10612:33:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_0be102d38ec038ab1a97805b8ddde7cce9248b0bc20b18ef4a6ff185abc6bc22", + "typeString": "literal_string \"Mooniswap: return is not enough\"" + }, + "value": "Mooniswap: return is not enough" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_0be102d38ec038ab1a97805b8ddde7cce9248b0bc20b18ef4a6ff185abc6bc22", + "typeString": "literal_string \"Mooniswap: return is not enough\"" + } + ], + "id": 1227, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "10569:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1236, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10569:77:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1237, + "nodeType": "ExpressionStatement", + "src": "10569:77:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1241, + "name": "receiver", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1117, + "src": "10672:8:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1242, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1126, + "src": "10682:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1238, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "10656:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 1240, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "uniTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 3585, + "src": "10656:15:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4216_$_t_address_payable_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$4216_$", + "typeString": "function (contract IERC20,address payable,uint256)" + } + }, + "id": 1243, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10656:33:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1244, + "nodeType": "ExpressionStatement", + "src": "10656:33:9" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1249, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1245, + "name": "virtualBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1128, + "src": "10786:15:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + "id": 1246, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "src", + "nodeType": "MemberAccess", + "referencedDeclaration": 25, + "src": "10786:19:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1247, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1119, + "src": "10809:8:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + "id": 1248, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "src", + "nodeType": "MemberAccess", + "referencedDeclaration": 25, + "src": "10809:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10786:35:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1262, + "nodeType": "IfStatement", + "src": "10782:137:9", + "trueBody": { + "id": 1261, + "nodeType": "Block", + "src": "10823:96:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1257, + "name": "confirmed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1124, + "src": "10897:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1254, + "name": "virtualBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1128, + "src": "10873:15:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + "id": 1255, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "src", + "nodeType": "MemberAccess", + "referencedDeclaration": 25, + "src": "10873:19:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1256, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1869, + "src": "10873:23:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1258, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10873:34:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1250, + "name": "virtualBalancesForAddition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 115, + "src": "10837:26:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20_$4216_$_t_struct$_Data_$3986_storage_$", + "typeString": "mapping(contract IERC20 => struct VirtualBalance.Data storage ref)" + } + }, + "id": 1252, + "indexExpression": { + "argumentTypes": null, + "id": 1251, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1109, + "src": "10864:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10837:31:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_storage", + "typeString": "struct VirtualBalance.Data storage ref" + } + }, + "id": 1253, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "set", + "nodeType": "MemberAccess", + "referencedDeclaration": 4010, + "src": "10837:35:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$3986_storage_ptr_$_t_uint256_$returns$__$bound_to$_t_struct$_Data_$3986_storage_ptr_$", + "typeString": "function (struct VirtualBalance.Data storage pointer,uint256)" + } + }, + "id": 1259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10837:71:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1260, + "nodeType": "ExpressionStatement", + "src": "10837:71:9" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1267, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1263, + "name": "virtualBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1128, + "src": "10932:15:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + "id": 1264, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "dst", + "nodeType": "MemberAccess", + "referencedDeclaration": 27, + "src": "10932:19:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1265, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1119, + "src": "10955:8:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + "id": 1266, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "dst", + "nodeType": "MemberAccess", + "referencedDeclaration": 27, + "src": "10955:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10932:35:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1280, + "nodeType": "IfStatement", + "src": "10928:133:9", + "trueBody": { + "id": 1279, + "nodeType": "Block", + "src": "10969:92:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1275, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1126, + "src": "11042:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1272, + "name": "virtualBalances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1128, + "src": "11018:15:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + "id": 1273, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "dst", + "nodeType": "MemberAccess", + "referencedDeclaration": 27, + "src": "11018:19:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1886, + "src": "11018:23:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1276, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11018:31:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1268, + "name": "virtualBalancesForRemoval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "10983:25:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20_$4216_$_t_struct$_Data_$3986_storage_$", + "typeString": "mapping(contract IERC20 => struct VirtualBalance.Data storage ref)" + } + }, + "id": 1270, + "indexExpression": { + "argumentTypes": null, + "id": 1269, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "11009:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10983:30:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_storage", + "typeString": "struct VirtualBalance.Data storage ref" + } + }, + "id": 1271, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "set", + "nodeType": "MemberAccess", + "referencedDeclaration": 4010, + "src": "10983:34:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$3986_storage_ptr_$_t_uint256_$returns$__$bound_to$_t_struct$_Data_$3986_storage_ptr_$", + "typeString": "function (struct VirtualBalance.Data storage pointer,uint256)" + } + }, + "id": 1277, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10983:67:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1278, + "nodeType": "ExpressionStatement", + "src": "10983:67:9" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1285, + "name": "_decayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1131, + "src": "11169:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1286, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1119, + "src": "11183:8:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + "id": 1287, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "src", + "nodeType": "MemberAccess", + "referencedDeclaration": 25, + "src": "11183:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1281, + "name": "virtualBalancesForRemoval", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 119, + "src": "11131:25:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20_$4216_$_t_struct$_Data_$3986_storage_$", + "typeString": "mapping(contract IERC20 => struct VirtualBalance.Data storage ref)" + } + }, + "id": 1283, + "indexExpression": { + "argumentTypes": null, + "id": 1282, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1109, + "src": "11157:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11131:30:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_storage", + "typeString": "struct VirtualBalance.Data storage ref" + } + }, + "id": 1284, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "update", + "nodeType": "MemberAccess", + "referencedDeclaration": 4029, + "src": "11131:37:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$3986_storage_ptr_$_t_uint256_$_t_uint256_$returns$__$bound_to$_t_struct$_Data_$3986_storage_ptr_$", + "typeString": "function (struct VirtualBalance.Data storage pointer,uint256,uint256)" + } + }, + "id": 1288, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11131:65:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1289, + "nodeType": "ExpressionStatement", + "src": "11131:65:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1294, + "name": "_decayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1131, + "src": "11245:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1295, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1119, + "src": "11259:8:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + "id": 1296, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "dst", + "nodeType": "MemberAccess", + "referencedDeclaration": 27, + "src": "11259:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1290, + "name": "virtualBalancesForAddition", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 115, + "src": "11206:26:9", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_contract$_IERC20_$4216_$_t_struct$_Data_$3986_storage_$", + "typeString": "mapping(contract IERC20 => struct VirtualBalance.Data storage ref)" + } + }, + "id": 1292, + "indexExpression": { + "argumentTypes": null, + "id": 1291, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1111, + "src": "11233:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11206:31:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_storage", + "typeString": "struct VirtualBalance.Data storage ref" + } + }, + "id": 1293, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "update", + "nodeType": "MemberAccess", + "referencedDeclaration": 4029, + "src": "11206:38:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$3986_storage_ptr_$_t_uint256_$_t_uint256_$returns$__$bound_to$_t_struct$_Data_$3986_storage_ptr_$", + "typeString": "function (struct VirtualBalance.Data storage pointer,uint256,uint256)" + } + }, + "id": 1297, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11206:66:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1298, + "nodeType": "ExpressionStatement", + "src": "11206:66:9" + } + ] + }, + "documentation": null, + "id": 1300, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_doTransfers", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1122, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1109, + "mutability": "mutable", + "name": "src", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1300, + "src": "9686:10:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 1108, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "9686:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1111, + "mutability": "mutable", + "name": "dst", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1300, + "src": "9698:10:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 1110, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "9698:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1113, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1300, + "src": "9710:14:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1112, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9710:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1115, + "mutability": "mutable", + "name": "minReturn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1300, + "src": "9726:17:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1114, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9726:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1117, + "mutability": "mutable", + "name": "receiver", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1300, + "src": "9745:24:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 1116, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9745:15:9", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1119, + "mutability": "mutable", + "name": "balances", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1300, + "src": "9771:24:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances" + }, + "typeName": { + "contractScope": null, + "id": 1118, + "name": "Balances", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 28, + "src": "9771:8:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_storage_ptr", + "typeString": "struct Mooniswap.Balances" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1121, + "mutability": "mutable", + "name": "fees", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1300, + "src": "9797:16:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fees_$38_memory_ptr", + "typeString": "struct Mooniswap.Fees" + }, + "typeName": { + "contractScope": null, + "id": 1120, + "name": "Fees", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 38, + "src": "9797:4:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fees_$38_storage_ptr", + "typeString": "struct Mooniswap.Fees" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9685:129:9" + }, + "returnParameters": { + "id": 1129, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1124, + "mutability": "mutable", + "name": "confirmed", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1300, + "src": "9839:17:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1123, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9839:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1126, + "mutability": "mutable", + "name": "result", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1300, + "src": "9858:14:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1125, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9858:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1128, + "mutability": "mutable", + "name": "virtualBalances", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1300, + "src": "9874:31:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances" + }, + "typeName": { + "contractScope": null, + "id": 1127, + "name": "Balances", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 28, + "src": "9874:8:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_storage_ptr", + "typeString": "struct Mooniswap.Balances" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9838:68:9" + }, + "scope": 1767, + "src": "9664:1615:9", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1580, + "nodeType": "Block", + "src": "11412:2100:9", + "statements": [ + { + "assignments": [ + 1314, + 1316, + 1318, + 1320 + ], + "declarations": [ + { + "constant": false, + "id": 1314, + "mutability": "mutable", + "name": "referralShare", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1580, + "src": "11423:21:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1313, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11423:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1316, + "mutability": "mutable", + "name": "governanceShare", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1580, + "src": "11446:23:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1315, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11446:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1318, + "mutability": "mutable", + "name": "govWallet", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1580, + "src": "11471:17:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1317, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11471:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1320, + "mutability": "mutable", + "name": "feeCollector", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1580, + "src": "11490:20:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1319, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11490:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1324, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 1321, + "name": "mooniswapFactoryGovernance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2602, + "src": "11514:26:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + } + }, + "id": 1322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "shareParameters", + "nodeType": "MemberAccess", + "referencedDeclaration": 4582, + "src": "11514:42:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$_t_uint256_$_t_address_$_t_address_$", + "typeString": "function () view external returns (uint256,uint256,address,address)" + } + }, + "id": 1323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11514:44:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_address_$_t_address_$", + "typeString": "tuple(uint256,uint256,address,address)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11422:136:9" + }, + { + "assignments": [ + 1326 + ], + "declarations": [ + { + "constant": false, + "id": 1326, + "mutability": "mutable", + "name": "refReward", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1580, + "src": "11569:17:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1325, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11569:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1327, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "11569:17:9" + }, + { + "assignments": [ + 1329 + ], + "declarations": [ + { + "constant": false, + "id": 1329, + "mutability": "mutable", + "name": "govReward", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1580, + "src": "11596:17:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1328, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11596:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1330, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "11596:17:9" + }, + { + "assignments": [ + 1332 + ], + "declarations": [ + { + "constant": false, + "id": 1332, + "mutability": "mutable", + "name": "invariantRatio", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1580, + "src": "11624:22:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1331, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11624:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1337, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31653336", + "id": 1335, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11657:4:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000000000000000000000000000000000_by_1", + "typeString": "int_const 1000...(29 digits omitted)...0000" + }, + "value": "1e36" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1000000000000000000000000000000000000_by_1", + "typeString": "int_const 1000...(29 digits omitted)...0000" + } + ], + "id": 1334, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "11649:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 1333, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11649:7:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1336, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11649:13:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11624:38:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 1351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1338, + "name": "invariantRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1332, + "src": "11672:14:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1348, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1308, + "src": "11741:8:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + "id": 1349, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "src", + "nodeType": "MemberAccess", + "referencedDeclaration": 25, + "src": "11741:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1344, + "name": "confirmed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1302, + "src": "11725:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1341, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1308, + "src": "11708:8:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + "id": 1342, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "src", + "nodeType": "MemberAccess", + "referencedDeclaration": 25, + "src": "11708:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1869, + "src": "11708:16:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1345, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11708:27:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1339, + "name": "invariantRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1332, + "src": "11689:14:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1340, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1949, + "src": "11689:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11689:47:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1966, + "src": "11689:51:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11689:65:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11672:82:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1352, + "nodeType": "ExpressionStatement", + "src": "11672:82:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 1366, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1353, + "name": "invariantRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1332, + "src": "11764:14:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1363, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1308, + "src": "11830:8:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + "id": 1364, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "dst", + "nodeType": "MemberAccess", + "referencedDeclaration": 27, + "src": "11830:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1359, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1304, + "src": "11817:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1356, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1308, + "src": "11800:8:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + "id": 1357, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "dst", + "nodeType": "MemberAccess", + "referencedDeclaration": 27, + "src": "11800:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1886, + "src": "11800:16:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1360, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11800:24:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1354, + "name": "invariantRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1332, + "src": "11781:14:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1949, + "src": "11781:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1361, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11781:44:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1966, + "src": "11781:48:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11781:62:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11764:79:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1367, + "nodeType": "ExpressionStatement", + "src": "11764:79:9" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1368, + "name": "invariantRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1332, + "src": "11857:14:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31653336", + "id": 1369, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11874:4:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000000000000000000000000000000000_by_1", + "typeString": "int_const 1000...(29 digits omitted)...0000" + }, + "value": "1e36" + }, + "src": "11857:21:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1566, + "nodeType": "IfStatement", + "src": "11853:1555:9", + "trueBody": { + "id": 1565, + "nodeType": "Block", + "src": "11880:1528:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1375, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1371, + "name": "invariantRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1332, + "src": "11953:14:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 1372, + "name": "invariantRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1332, + "src": "11970:14:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sqrt", + "nodeType": "MemberAccess", + "referencedDeclaration": 3496, + "src": "11970:19:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint256)" + } + }, + "id": 1374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11970:21:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11953:38:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1376, + "nodeType": "ExpressionStatement", + "src": "11953:38:9" + }, + { + "assignments": [ + 1378 + ], + "declarations": [ + { + "constant": false, + "id": 1378, + "mutability": "mutable", + "name": "invIncrease", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1565, + "src": "12005:19:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1377, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12005:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1390, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1388, + "name": "invariantRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1332, + "src": "12075:14:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31653138", + "id": 1384, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12064:4:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000000000000000_by_1", + "typeString": "int_const 1000000000000000000" + }, + "value": "1e18" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1000000000000000000_by_1", + "typeString": "int_const 1000000000000000000" + } + ], + "expression": { + "argumentTypes": null, + "id": 1382, + "name": "invariantRatio", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1332, + "src": "12045:14:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1886, + "src": "12045:18:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1385, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12045:24:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1379, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2129, + "src": "12027:11:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 1380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12027:13:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1949, + "src": "12027:17:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12027:43:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1387, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1966, + "src": "12027:47:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1389, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12027:63:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12005:85:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 1409, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1391, + "name": "refReward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1326, + "src": "12105:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1397, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1392, + "name": "referral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "12118:8:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1395, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12138:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1394, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12130:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1393, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12130:7:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1396, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12130:10:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "12118:22:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 1398, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12117:24:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1407, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12218:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "id": 1408, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "12117:102:9", + "trueExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1404, + "name": "MooniswapConstants", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5012, + "src": "12179:18:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MooniswapConstants_$5012_$", + "typeString": "type(library MooniswapConstants)" + } + }, + "id": 1405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "_FEE_DENOMINATOR", + "nodeType": "MemberAccess", + "referencedDeclaration": 4978, + "src": "12179:35:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1401, + "name": "referralShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1314, + "src": "12160:13:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1399, + "name": "invIncrease", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1378, + "src": "12144:11:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1400, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1949, + "src": "12144:15:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12144:30:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1403, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1966, + "src": "12144:34:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12144:71:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12105:114:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1410, + "nodeType": "ExpressionStatement", + "src": "12105:114:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 1429, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1411, + "name": "govReward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1329, + "src": "12233:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1417, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1412, + "name": "govWallet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1318, + "src": "12246:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1415, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12267:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1414, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12259:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1413, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12259:7:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1416, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12259:10:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "12246:23:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 1418, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12245:25:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1427, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12349:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "id": 1428, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "12245:105:9", + "trueExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1424, + "name": "MooniswapConstants", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5012, + "src": "12310:18:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MooniswapConstants_$5012_$", + "typeString": "type(library MooniswapConstants)" + } + }, + "id": 1425, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "_FEE_DENOMINATOR", + "nodeType": "MemberAccess", + "referencedDeclaration": 4978, + "src": "12310:35:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1421, + "name": "governanceShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1316, + "src": "12289:15:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1419, + "name": "invIncrease", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1378, + "src": "12273:11:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1420, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1949, + "src": "12273:15:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1422, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12273:32:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1423, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1966, + "src": "12273:36:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1426, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12273:73:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12233:117:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1430, + "nodeType": "ExpressionStatement", + "src": "12233:117:9" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1436, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1431, + "name": "feeCollector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1320, + "src": "12369:12:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 1434, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12393:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 1433, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "12385:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1432, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12385:7:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1435, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12385:10:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "12369:26:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1464, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1458, + "name": "refReward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1326, + "src": "12641:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1459, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12653:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "12641:13:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1461, + "name": "govReward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1329, + "src": "12658:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1462, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12670:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "12658:13:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "12641:30:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1563, + "nodeType": "IfStatement", + "src": "12637:761:9", + "trueBody": { + "id": 1562, + "nodeType": "Block", + "src": "12673:725:9", + "statements": [ + { + "assignments": [ + 1466 + ], + "declarations": [ + { + "constant": false, + "id": 1466, + "mutability": "mutable", + "name": "len", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1562, + "src": "12691:11:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1465, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12691:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1482, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 1481, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1469, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1467, + "name": "refReward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1326, + "src": "12706:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1468, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12718:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "12706:13:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1471, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12726:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "id": 1472, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "12706:21:9", + "trueExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1470, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12722:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 1473, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12705:23:9", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1474, + "name": "govReward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1329, + "src": "12732:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1475, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12744:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "12732:13:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1478, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12752:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "id": 1479, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "12732:21:9", + "trueExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1477, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12748:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "id": 1480, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "12731:23:9", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "src": "12705:49:9", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12691:63:9" + }, + { + "assignments": [ + 1487 + ], + "declarations": [ + { + "constant": false, + "id": 1487, + "mutability": "mutable", + "name": "wallets", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1562, + "src": "12772:24:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 1485, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12772:7:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1486, + "length": null, + "nodeType": "ArrayTypeName", + "src": "12772:9:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1493, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1491, + "name": "len", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1466, + "src": "12813:3:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1490, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "12799:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (address[] memory)" + }, + "typeName": { + "baseType": { + "id": 1488, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12803:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1489, + "length": null, + "nodeType": "ArrayTypeName", + "src": "12803:9:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + } + }, + "id": 1492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12799:18:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12772:45:9" + }, + { + "assignments": [ + 1498 + ], + "declarations": [ + { + "constant": false, + "id": 1498, + "mutability": "mutable", + "name": "rewards", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1562, + "src": "12835:24:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 1496, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12835:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1497, + "length": null, + "nodeType": "ArrayTypeName", + "src": "12835:9:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1504, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1502, + "name": "len", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1466, + "src": "12876:3:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1501, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "12862:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_uint256_$dyn_memory_ptr_$", + "typeString": "function (uint256) pure returns (uint256[] memory)" + }, + "typeName": { + "baseType": { + "id": 1499, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12866:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1500, + "length": null, + "nodeType": "ArrayTypeName", + "src": "12866:9:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + } + }, + "id": 1503, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12862:18:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12835:45:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 1509, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1505, + "name": "wallets", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1487, + "src": "12899:7:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 1507, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1506, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12907:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12899:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1508, + "name": "referral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "12912:8:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "12899:21:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1510, + "nodeType": "ExpressionStatement", + "src": "12899:21:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 1515, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1511, + "name": "rewards", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1498, + "src": "12938:7:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 1513, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1512, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12946:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "12938:10:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1514, + "name": "refReward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1326, + "src": "12951:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12938:22:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1516, + "nodeType": "ExpressionStatement", + "src": "12938:22:9" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1517, + "name": "govReward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1329, + "src": "12982:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1518, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12994:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "12982:13:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1537, + "nodeType": "IfStatement", + "src": "12978:138:9", + "trueBody": { + "id": 1536, + "nodeType": "Block", + "src": "12997:119:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1526, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1520, + "name": "wallets", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1487, + "src": "13019:7:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + "id": 1524, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1523, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1521, + "name": "len", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1466, + "src": "13027:3:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1522, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13033:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "13027:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13019:16:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1525, + "name": "govWallet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1318, + "src": "13038:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "13019:28:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1527, + "nodeType": "ExpressionStatement", + "src": "13019:28:9" + }, + { + "expression": { + "argumentTypes": null, + "id": 1534, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1528, + "name": "rewards", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1498, + "src": "13069:7:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + }, + "id": 1532, + "indexExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1531, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1529, + "name": "len", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1466, + "src": "13077:3:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1530, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13083:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "13077:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "13069:16:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1533, + "name": "govReward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1329, + "src": "13088:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13069:28:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1535, + "nodeType": "ExpressionStatement", + "src": "13069:28:9" + } + ] + } + }, + { + "clauses": [ + { + "block": { + "id": 1553, + "nodeType": "Block", + "src": "13198:86:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1546, + "name": "feeCollector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1320, + "src": "13226:12:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1549, + "name": "govReward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1329, + "src": "13254:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1547, + "name": "refReward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1326, + "src": "13240:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1869, + "src": "13240:13:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1550, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13240:24:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1545, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2419, + "src": "13220:5:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 1551, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13220:45:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1552, + "nodeType": "ExpressionStatement", + "src": "13220:45:9" + } + ] + }, + "errorName": "", + "id": 1554, + "nodeType": "TryCatchClause", + "parameters": null, + "src": "13198:86:9" + }, + { + "block": { + "id": 1559, + "nodeType": "Block", + "src": "13307:77:9", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "757064617465526577617264732829206661696c6564", + "id": 1556, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13340:24:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_799cea69b6a2040244ce44b08bfc7e66d4a4900557b321a1a1aadfda14d1afbd", + "typeString": "literal_string \"updateRewards() failed\"" + }, + "value": "updateRewards() failed" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_799cea69b6a2040244ce44b08bfc7e66d4a4900557b321a1a1aadfda14d1afbd", + "typeString": "literal_string \"updateRewards() failed\"" + } + ], + "id": 1555, + "name": "Error", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 42, + "src": "13334:5:9", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory)" + } + }, + "id": 1557, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13334:31:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1558, + "nodeType": "EmitStatement", + "src": "13329:36:9" + } + ] + }, + "errorName": "", + "id": 1560, + "nodeType": "TryCatchClause", + "parameters": null, + "src": "13301:83:9" + } + ], + "externalCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1542, + "name": "wallets", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1487, + "src": "13180:7:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + } + }, + { + "argumentTypes": null, + "id": 1543, + "name": "rewards", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1498, + "src": "13189:7:9", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", + "typeString": "address[] memory" + }, + { + "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", + "typeString": "uint256[] memory" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1539, + "name": "feeCollector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1320, + "src": "13152:12:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1538, + "name": "IFeeCollector", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3437, + "src": "13138:13:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_IFeeCollector_$3437_$", + "typeString": "type(contract IFeeCollector)" + } + }, + "id": 1540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13138:27:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_contract$_IFeeCollector_$3437", + "typeString": "contract IFeeCollector" + } + }, + "id": 1541, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "updateRewards", + "nodeType": "MemberAccess", + "referencedDeclaration": 3436, + "src": "13138:41:9", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_array$_t_address_$dyn_memory_ptr_$_t_array$_t_uint256_$dyn_memory_ptr_$returns$__$", + "typeString": "function (address[] memory,uint256[] memory) external" + } + }, + "id": 1544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13138:59:9", + "tryCall": true, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1561, + "nodeType": "TryStatement", + "src": "13134:250:9" + } + ] + } + }, + "id": 1564, + "nodeType": "IfStatement", + "src": "12365:1033:9", + "trueBody": { + "id": 1457, + "nodeType": "Block", + "src": "12397:222:9", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1439, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1437, + "name": "refReward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1326, + "src": "12419:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1438, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12431:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "12419:13:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1446, + "nodeType": "IfStatement", + "src": "12415:86:9", + "trueBody": { + "id": 1445, + "nodeType": "Block", + "src": "12434:67:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1441, + "name": "referral", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1306, + "src": "12462:8:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1442, + "name": "refReward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1326, + "src": "12472:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1440, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2419, + "src": "12456:5:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 1443, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12456:26:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1444, + "nodeType": "ExpressionStatement", + "src": "12456:26:9" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1447, + "name": "govReward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1329, + "src": "12522:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1448, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12534:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "12522:13:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1456, + "nodeType": "IfStatement", + "src": "12518:87:9", + "trueBody": { + "id": 1455, + "nodeType": "Block", + "src": "12537:68:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1451, + "name": "govWallet", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1318, + "src": "12565:9:9", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1452, + "name": "govReward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1329, + "src": "12576:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1450, + "name": "_mint", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2419, + "src": "12559:5:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 1453, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12559:27:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1454, + "nodeType": "ExpressionStatement", + "src": "12559:27:9" + } + ] + } + } + ] + } + } + ] + } + }, + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1568, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1308, + "src": "13428:8:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + "id": 1569, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "src", + "nodeType": "MemberAccess", + "referencedDeclaration": 25, + "src": "13428:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1570, + "name": "balances", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1308, + "src": "13442:8:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances memory" + } + }, + "id": 1571, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "dst", + "nodeType": "MemberAccess", + "referencedDeclaration": 27, + "src": "13442:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1572, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1310, + "src": "13456:4:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fees_$38_memory_ptr", + "typeString": "struct Mooniswap.Fees memory" + } + }, + "id": 1573, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "fee", + "nodeType": "MemberAccess", + "referencedDeclaration": 35, + "src": "13456:8:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1574, + "name": "fees", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1310, + "src": "13466:4:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fees_$38_memory_ptr", + "typeString": "struct Mooniswap.Fees memory" + } + }, + "id": 1575, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "slippageFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 37, + "src": "13466:16:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1576, + "name": "refReward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1326, + "src": "13484:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1577, + "name": "govReward", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1329, + "src": "13495:9:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1567, + "name": "Sync", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 100, + "src": "13423:4:9", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,uint256,uint256,uint256,uint256)" + } + }, + "id": 1578, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13423:82:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1579, + "nodeType": "EmitStatement", + "src": "13418:87:9" + } + ] + }, + "documentation": null, + "id": 1581, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_mintRewards", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1311, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1302, + "mutability": "mutable", + "name": "confirmed", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1581, + "src": "11307:17:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1301, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11307:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1304, + "mutability": "mutable", + "name": "result", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1581, + "src": "11326:14:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1303, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11326:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1306, + "mutability": "mutable", + "name": "referral", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1581, + "src": "11342:16:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1305, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11342:7:9", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1308, + "mutability": "mutable", + "name": "balances", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1581, + "src": "11360:24:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_memory_ptr", + "typeString": "struct Mooniswap.Balances" + }, + "typeName": { + "contractScope": null, + "id": 1307, + "name": "Balances", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 28, + "src": "11360:8:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Balances_$28_storage_ptr", + "typeString": "struct Mooniswap.Balances" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1310, + "mutability": "mutable", + "name": "fees", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1581, + "src": "11386:16:9", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fees_$38_memory_ptr", + "typeString": "struct Mooniswap.Fees" + }, + "typeName": { + "contractScope": null, + "id": 1309, + "name": "Fees", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 38, + "src": "11386:4:9", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Fees_$38_storage_ptr", + "typeString": "struct Mooniswap.Fees" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11306:97:9" + }, + "returnParameters": { + "id": 1312, + "nodeType": "ParameterList", + "parameters": [], + "src": "11412:0:9" + }, + "scope": 1767, + "src": "11285:2227:9", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 1687, + "nodeType": "Block", + "src": "14171:720:9", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "id": 1602, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1600, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1583, + "src": "14185:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 1601, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1585, + "src": "14191:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "src": "14185:9:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1612, + "nodeType": "IfStatement", + "src": "14181:63:9", + "trueBody": { + "id": 1611, + "nodeType": "Block", + "src": "14196:48:9", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 1603, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1583, + "src": "14211:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + { + "argumentTypes": null, + "id": 1604, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1585, + "src": "14216:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + } + ], + "id": 1605, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "14210:10:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_contract$_IERC20_$4216_$_t_contract$_IERC20_$4216_$", + "typeString": "tuple(contract IERC20,contract IERC20)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 1606, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1585, + "src": "14224:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + { + "argumentTypes": null, + "id": 1607, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1583, + "src": "14229:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + } + ], + "id": 1608, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "14223:10:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_contract$_IERC20_$4216_$_t_contract$_IERC20_$4216_$", + "typeString": "tuple(contract IERC20,contract IERC20)" + } + }, + "src": "14210:23:9", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1610, + "nodeType": "ExpressionStatement", + "src": "14210:23:9" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1619, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1613, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1587, + "src": "14257:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1614, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14266:1:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "14257:10:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "id": 1618, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1616, + "name": "src", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1583, + "src": "14271:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1617, + "name": "token0", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 105, + "src": "14278:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "src": "14271:13:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "14257:27:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "id": 1622, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1620, + "name": "dst", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1585, + "src": "14288:3:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1621, + "name": "token1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 107, + "src": "14295:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "src": "14288:13:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "14257:44:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1686, + "nodeType": "IfStatement", + "src": "14253:632:9", + "trueBody": { + "id": 1685, + "nodeType": "Block", + "src": "14303:582:9", + "statements": [ + { + "assignments": [ + 1625 + ], + "declarations": [ + { + "constant": false, + "id": 1625, + "mutability": "mutable", + "name": "taxedAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1685, + "src": "14317:19:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1624, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14317:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1637, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1633, + "name": "MooniswapConstants", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5012, + "src": "14370:18:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MooniswapConstants_$5012_$", + "typeString": "type(library MooniswapConstants)" + } + }, + "id": 1634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "_FEE_DENOMINATOR", + "nodeType": "MemberAccess", + "referencedDeclaration": 4978, + "src": "14370:35:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1630, + "name": "fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1593, + "src": "14361:3:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1628, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1587, + "src": "14350:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1949, + "src": "14350:10:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14350:15:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1632, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1966, + "src": "14350:19:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14350:56:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1626, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1587, + "src": "14339:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1627, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1886, + "src": "14339:10:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14339:68:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14317:90:9" + }, + { + "assignments": [ + 1639 + ], + "declarations": [ + { + "constant": false, + "id": 1639, + "mutability": "mutable", + "name": "srcBalancePlusTaxedAmount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1685, + "src": "14421:33:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1638, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14421:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1644, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1642, + "name": "taxedAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1625, + "src": "14472:11:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1640, + "name": "srcBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1589, + "src": "14457:10:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1641, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1869, + "src": "14457:14:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1643, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14457:27:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14421:63:9" + }, + { + "assignments": [ + 1646 + ], + "declarations": [ + { + "constant": false, + "id": 1646, + "mutability": "mutable", + "name": "ret", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1685, + "src": "14498:11:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1645, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14498:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1654, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1652, + "name": "srcBalancePlusTaxedAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1639, + "src": "14544:25:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1649, + "name": "dstBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1591, + "src": "14528:10:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1647, + "name": "taxedAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1625, + "src": "14512:11:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1949, + "src": "14512:15:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14512:27:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1966, + "src": "14512:31:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1653, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14512:58:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14498:72:9" + }, + { + "assignments": [ + 1656 + ], + "declarations": [ + { + "constant": false, + "id": 1656, + "mutability": "mutable", + "name": "feeNumerator", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1685, + "src": "14584:20:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1655, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14584:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1668, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1665, + "name": "taxedAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1625, + "src": "14694:11:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1663, + "name": "slippageFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1595, + "src": "14678:11:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1664, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1949, + "src": "14678:15:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1666, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14678:28:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1660, + "name": "srcBalancePlusTaxedAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1639, + "src": "14647:25:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1657, + "name": "MooniswapConstants", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5012, + "src": "14607:18:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MooniswapConstants_$5012_$", + "typeString": "type(library MooniswapConstants)" + } + }, + "id": 1658, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "_FEE_DENOMINATOR", + "nodeType": "MemberAccess", + "referencedDeclaration": 4978, + "src": "14607:35:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1659, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1949, + "src": "14607:39:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1661, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14607:66:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1662, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1886, + "src": "14607:70:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14607:100:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14584:123:9" + }, + { + "assignments": [ + 1670 + ], + "declarations": [ + { + "constant": false, + "id": 1670, + "mutability": "mutable", + "name": "feeDenominator", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1685, + "src": "14721:22:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1669, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14721:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1676, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1674, + "name": "srcBalancePlusTaxedAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1639, + "src": "14786:25:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1671, + "name": "MooniswapConstants", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5012, + "src": "14746:18:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MooniswapConstants_$5012_$", + "typeString": "type(library MooniswapConstants)" + } + }, + "id": 1672, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "_FEE_DENOMINATOR", + "nodeType": "MemberAccess", + "referencedDeclaration": 4978, + "src": "14746:35:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1949, + "src": "14746:39:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1675, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14746:66:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14721:91:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1682, + "name": "feeDenominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1670, + "src": "14859:14:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1679, + "name": "feeNumerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1656, + "src": "14841:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1677, + "name": "ret", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1646, + "src": "14833:3:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1678, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1949, + "src": "14833:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1680, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14833:21:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1681, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1966, + "src": "14833:25:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 1683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14833:41:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1599, + "id": 1684, + "nodeType": "Return", + "src": "14826:48:9" + } + ] + } + } + ] + }, + "documentation": null, + "id": 1688, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_getReturn", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1596, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1583, + "mutability": "mutable", + "name": "src", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1688, + "src": "14026:10:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 1582, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "14026:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1585, + "mutability": "mutable", + "name": "dst", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1688, + "src": "14038:10:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 1584, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "14038:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1587, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1688, + "src": "14050:14:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1586, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14050:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1589, + "mutability": "mutable", + "name": "srcBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1688, + "src": "14066:18:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1588, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14066:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1591, + "mutability": "mutable", + "name": "dstBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1688, + "src": "14086:18:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1590, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14086:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1593, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1688, + "src": "14106:11:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1592, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14106:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1595, + "mutability": "mutable", + "name": "slippageFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1688, + "src": "14119:19:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1594, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14119:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14025:114:9" + }, + "returnParameters": { + "id": 1599, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1598, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1688, + "src": "14162:7:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1597, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14162:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14161:9:9" + }, + "scope": 1767, + "src": "14006:885:9", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 1765, + "nodeType": "Block", + "src": "14980:455:9", + "statements": [ + { + "assignments": [ + 1700 + ], + "declarations": [ + { + "constant": false, + "id": 1700, + "mutability": "mutable", + "name": "balance0", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1765, + "src": "14990:16:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1699, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14990:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1708, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1705, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "15037:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + ], + "id": 1704, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15029:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1703, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15029:7:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15029:13:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1701, + "name": "token0", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 105, + "src": "15009:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 1702, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "uniBalanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 3551, + "src": "15009:19:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$4216_$_t_address_$returns$_t_uint256_$bound_to$_t_contract$_IERC20_$4216_$", + "typeString": "function (contract IERC20,address) view returns (uint256)" + } + }, + "id": 1707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15009:34:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14990:53:9" + }, + { + "assignments": [ + 1710 + ], + "declarations": [ + { + "constant": false, + "id": 1710, + "mutability": "mutable", + "name": "balance1", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1765, + "src": "15053:16:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1709, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "15053:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1718, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1715, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "15100:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + ], + "id": 1714, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15092:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1713, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15092:7:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15092:13:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1711, + "name": "token1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 107, + "src": "15072:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 1712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "uniBalanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 3551, + "src": "15072:19:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$4216_$_t_address_$returns$_t_uint256_$bound_to$_t_contract$_IERC20_$4216_$", + "typeString": "function (contract IERC20,address) view returns (uint256)" + } + }, + "id": 1717, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15072:34:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "15053:53:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1722, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "15135:3:9", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1723, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "15135:10:9", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 1724, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1692, + "src": "15147:6:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1719, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1690, + "src": "15117:5:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 1721, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "uniTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 3585, + "src": "15117:17:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4216_$_t_address_payable_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$4216_$", + "typeString": "function (contract IERC20,address payable,uint256)" + } + }, + "id": 1725, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15117:37:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1726, + "nodeType": "ExpressionStatement", + "src": "15117:37:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1732, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "15201:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + ], + "id": 1731, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15193:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1730, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15193:7:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1733, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15193:13:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1728, + "name": "token0", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 105, + "src": "15173:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 1729, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "uniBalanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 3551, + "src": "15173:19:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$4216_$_t_address_$returns$_t_uint256_$bound_to$_t_contract$_IERC20_$4216_$", + "typeString": "function (contract IERC20,address) view returns (uint256)" + } + }, + "id": 1734, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15173:34:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1735, + "name": "balance0", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1700, + "src": "15211:8:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15173:46:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4d6f6f6e69737761703a206163636573732064656e696564", + "id": 1737, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15221:26:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_00054040a5b72b87efc24e70d6f8e85550d05f94ab326f8006a86d85085ec5ee", + "typeString": "literal_string \"Mooniswap: access denied\"" + }, + "value": "Mooniswap: access denied" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_00054040a5b72b87efc24e70d6f8e85550d05f94ab326f8006a86d85085ec5ee", + "typeString": "literal_string \"Mooniswap: access denied\"" + } + ], + "id": 1727, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15165:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1738, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15165:83:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1739, + "nodeType": "ExpressionStatement", + "src": "15165:83:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1745, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "15294:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + ], + "id": 1744, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15286:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1743, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15286:7:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15286:13:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 1741, + "name": "token1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 107, + "src": "15266:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 1742, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "uniBalanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 3551, + "src": "15266:19:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_contract$_IERC20_$4216_$_t_address_$returns$_t_uint256_$bound_to$_t_contract$_IERC20_$4216_$", + "typeString": "function (contract IERC20,address) view returns (uint256)" + } + }, + "id": 1747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15266:34:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1748, + "name": "balance1", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1710, + "src": "15304:8:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15266:46:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4d6f6f6e69737761703a206163636573732064656e696564", + "id": 1750, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15314:26:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_00054040a5b72b87efc24e70d6f8e85550d05f94ab326f8006a86d85085ec5ee", + "typeString": "literal_string \"Mooniswap: access denied\"" + }, + "value": "Mooniswap: access denied" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_00054040a5b72b87efc24e70d6f8e85550d05f94ab326f8006a86d85085ec5ee", + "typeString": "literal_string \"Mooniswap: access denied\"" + } + ], + "id": 1740, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15258:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15258:83:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1752, + "nodeType": "ExpressionStatement", + "src": "15258:83:9" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1761, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1757, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "15377:4:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Mooniswap_$1767", + "typeString": "contract Mooniswap" + } + ], + "id": 1756, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "15369:7:9", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 1755, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "15369:7:9", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 1758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15369:13:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1754, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2143, + "src": "15359:9:9", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 1759, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15359:24:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1760, + "name": "_BASE_SUPPLY", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 103, + "src": "15387:12:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "15359:40:9", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "4d6f6f6e69737761703a206163636573732064656e696564", + "id": 1762, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "15401:26:9", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_00054040a5b72b87efc24e70d6f8e85550d05f94ab326f8006a86d85085ec5ee", + "typeString": "literal_string \"Mooniswap: access denied\"" + }, + "value": "Mooniswap: access denied" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_00054040a5b72b87efc24e70d6f8e85550d05f94ab326f8006a86d85085ec5ee", + "typeString": "literal_string \"Mooniswap: access denied\"" + } + ], + "id": 1753, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "15351:7:9", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 1763, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "15351:77:9", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1764, + "nodeType": "ExpressionStatement", + "src": "15351:77:9" + } + ] + }, + "documentation": null, + "functionSelector": "78e3214f", + "id": 1766, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 1695, + "modifierName": { + "argumentTypes": null, + "id": 1694, + "name": "nonReentrant", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4568, + "src": "14957:12:9", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "14957:12:9" + }, + { + "arguments": null, + "id": 1697, + "modifierName": { + "argumentTypes": null, + "id": 1696, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4478, + "src": "14970:9:9", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "14970:9:9" + } + ], + "name": "rescueFunds", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 1693, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1690, + "mutability": "mutable", + "name": "token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1766, + "src": "14918:12:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 1689, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "14918:6:9", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1692, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 1766, + "src": "14932:14:9", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1691, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14932:7:9", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14917:30:9" + }, + "returnParameters": { + "id": 1698, + "nodeType": "ParameterList", + "parameters": [], + "src": "14980:0:9" + }, + "scope": 1767, + "src": "14897:538:9", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 1768, + "src": "411:15026:9" + } + ], + "src": "33:15405:9" + }, + "id": 9 + }, + "Users/k06a/Projects/mooniswap-v2/contracts/governance/MooniswapGovernance.sol": { + "ast": { + "absolutePath": "Users/k06a/Projects/mooniswap-v2/contracts/governance/MooniswapGovernance.sol", + "exportedSymbols": { + "MooniswapGovernance": [ + 3418 + ] + }, + "id": 3419, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 2545, + "literals": [ + "solidity", + "^", + "0.6", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "33:23:10" + }, + { + "absolutePath": "@openzeppelin/contracts/access/Ownable.sol", + "file": "@openzeppelin/contracts/access/Ownable.sol", + "id": 2546, + "nodeType": "ImportDirective", + "scope": 3419, + "sourceUnit": 4530, + "src": "58:52:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/ERC20.sol", + "file": "@openzeppelin/contracts/token/ERC20/ERC20.sol", + "id": 2547, + "nodeType": "ImportDirective", + "scope": 3419, + "sourceUnit": 2544, + "src": "111:55:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", + "file": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", + "id": 2548, + "nodeType": "ImportDirective", + "scope": 3419, + "sourceUnit": 4570, + "src": "167:59:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IMooniswapFactoryGovernance.sol", + "file": "../interfaces/IMooniswapFactoryGovernance.sol", + "id": 2549, + "nodeType": "ImportDirective", + "scope": 3419, + "sourceUnit": 4640, + "src": "227:55:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "Users/k06a/Projects/mooniswap-v2/contracts/libraries/LiquidVoting.sol", + "file": "../libraries/LiquidVoting.sol", + "id": 2550, + "nodeType": "ImportDirective", + "scope": 3419, + "sourceUnit": 4974, + "src": "283:39:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "Users/k06a/Projects/mooniswap-v2/contracts/libraries/MooniswapConstants.sol", + "file": "../libraries/MooniswapConstants.sol", + "id": 2551, + "nodeType": "ImportDirective", + "scope": 3419, + "sourceUnit": 5013, + "src": "323:45:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "Users/k06a/Projects/mooniswap-v2/contracts/libraries/SafeCast.sol", + "file": "../libraries/SafeCast.sol", + "id": 2552, + "nodeType": "ImportDirective", + "scope": 3419, + "sourceUnit": 5104, + "src": "369:35:10", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": true, + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2553, + "name": "ERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2543, + "src": "448:5:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$2543", + "typeString": "contract ERC20" + } + }, + "id": 2554, + "nodeType": "InheritanceSpecifier", + "src": "448:5:10" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2555, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4529, + "src": "455:7:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$4529", + "typeString": "contract Ownable" + } + }, + "id": 2556, + "nodeType": "InheritanceSpecifier", + "src": "455:7:10" + }, + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 2557, + "name": "ReentrancyGuard", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4569, + "src": "464:15:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ReentrancyGuard_$4569", + "typeString": "contract ReentrancyGuard" + } + }, + "id": 2558, + "nodeType": "InheritanceSpecifier", + "src": "464:15:10" + } + ], + "contractDependencies": [ + 2543, + 4138, + 4216, + 4529, + 4569 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": false, + "id": 3418, + "linearizedBaseContracts": [ + 3418, + 4569, + 4529, + 2543, + 4216, + 4138 + ], + "name": "MooniswapGovernance", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 2561, + "libraryName": { + "contractScope": null, + "id": 2559, + "name": "Vote", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5496, + "src": "492:4:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Vote_$5496", + "typeString": "library Vote" + } + }, + "nodeType": "UsingForDirective", + "src": "486:25:10", + "typeName": { + "contractScope": null, + "id": 2560, + "name": "Vote.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5389, + "src": "501:9:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_storage_ptr", + "typeString": "struct Vote.Data" + } + } + }, + { + "id": 2564, + "libraryName": { + "contractScope": null, + "id": 2562, + "name": "LiquidVoting", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4973, + "src": "522:12:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_LiquidVoting_$4973", + "typeString": "library LiquidVoting" + } + }, + "nodeType": "UsingForDirective", + "src": "516:41:10", + "typeName": { + "contractScope": null, + "id": 2563, + "name": "LiquidVoting.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4668, + "src": "539:17:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage_ptr", + "typeString": "struct LiquidVoting.Data" + } + } + }, + { + "id": 2567, + "libraryName": { + "contractScope": null, + "id": 2565, + "name": "VirtualVote", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5384, + "src": "568:11:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_VirtualVote_$5384", + "typeString": "library VirtualVote" + } + }, + "nodeType": "UsingForDirective", + "src": "562:39:10", + "typeName": { + "contractScope": null, + "id": 2566, + "name": "VirtualVote.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5333, + "src": "584:16:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_storage_ptr", + "typeString": "struct VirtualVote.Data" + } + } + }, + { + "id": 2570, + "libraryName": { + "contractScope": null, + "id": 2568, + "name": "SafeCast", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5103, + "src": "612:8:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeCast_$5103", + "typeString": "library SafeCast" + } + }, + "nodeType": "UsingForDirective", + "src": "606:27:10", + "typeName": { + "id": 2569, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "625:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "anonymous": false, + "documentation": null, + "id": 2580, + "name": "FeeVoteUpdate", + "nodeType": "EventDefinition", + "parameters": { + "id": 2579, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2572, + "indexed": true, + "mutability": "mutable", + "name": "user", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2580, + "src": "659:20:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2571, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "659:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2574, + "indexed": false, + "mutability": "mutable", + "name": "fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2580, + "src": "681:11:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2573, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "681:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2576, + "indexed": false, + "mutability": "mutable", + "name": "isDefault", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2580, + "src": "694:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2575, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "694:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2578, + "indexed": false, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2580, + "src": "710:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2577, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "710:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "658:67:10" + }, + "src": "639:87:10" + }, + { + "anonymous": false, + "documentation": null, + "id": 2590, + "name": "SlippageFeeVoteUpdate", + "nodeType": "EventDefinition", + "parameters": { + "id": 2589, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2582, + "indexed": true, + "mutability": "mutable", + "name": "user", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2590, + "src": "759:20:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2581, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "759:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2584, + "indexed": false, + "mutability": "mutable", + "name": "slippageFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2590, + "src": "781:19:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2583, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "781:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2586, + "indexed": false, + "mutability": "mutable", + "name": "isDefault", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2590, + "src": "802:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2585, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "802:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2588, + "indexed": false, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2590, + "src": "818:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2587, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "818:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "758:75:10" + }, + "src": "731:103:10" + }, + { + "anonymous": false, + "documentation": null, + "id": 2600, + "name": "DecayPeriodVoteUpdate", + "nodeType": "EventDefinition", + "parameters": { + "id": 2599, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2592, + "indexed": true, + "mutability": "mutable", + "name": "user", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2600, + "src": "867:20:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2591, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "867:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2594, + "indexed": false, + "mutability": "mutable", + "name": "decayPeriod", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2600, + "src": "889:19:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2593, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "889:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2596, + "indexed": false, + "mutability": "mutable", + "name": "isDefault", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2600, + "src": "910:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 2595, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "910:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2598, + "indexed": false, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2600, + "src": "926:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2597, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "926:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "866:75:10" + }, + "src": "839:103:10" + }, + { + "constant": false, + "functionSelector": "d9a0c217", + "id": 2602, + "mutability": "mutable", + "name": "mooniswapFactoryGovernance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3418, + "src": "948:61:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + }, + "typeName": { + "contractScope": null, + "id": 2601, + "name": "IMooniswapFactoryGovernance", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4639, + "src": "948:27:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 2604, + "mutability": "mutable", + "name": "_fee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3418, + "src": "1015:30:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data" + }, + "typeName": { + "contractScope": null, + "id": 2603, + "name": "LiquidVoting.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4668, + "src": "1015:17:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage_ptr", + "typeString": "struct LiquidVoting.Data" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 2606, + "mutability": "mutable", + "name": "_slippageFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3418, + "src": "1051:38:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data" + }, + "typeName": { + "contractScope": null, + "id": 2605, + "name": "LiquidVoting.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4668, + "src": "1051:17:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage_ptr", + "typeString": "struct LiquidVoting.Data" + } + }, + "value": null, + "visibility": "private" + }, + { + "constant": false, + "id": 2608, + "mutability": "mutable", + "name": "_decayPeriod", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3418, + "src": "1095:38:10", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data" + }, + "typeName": { + "contractScope": null, + "id": 2607, + "name": "LiquidVoting.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4668, + "src": "1095:17:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage_ptr", + "typeString": "struct LiquidVoting.Data" + } + }, + "value": null, + "visibility": "private" + }, + { + "body": { + "id": 2653, + "nodeType": "Block", + "src": "1218:348:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2615, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2613, + "name": "mooniswapFactoryGovernance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2602, + "src": "1228:26:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2614, + "name": "_mooniswapFactoryGovernance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2610, + "src": "1257:27:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + } + }, + "src": "1228:56:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + } + }, + "id": 2616, + "nodeType": "ExpressionStatement", + "src": "1228:56:10" + }, + { + "expression": { + "argumentTypes": null, + "id": 2627, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2617, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2604, + "src": "1294:4:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + }, + "id": 2620, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "data", + "nodeType": "MemberAccess", + "referencedDeclaration": 4659, + "src": "1294:9:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_storage", + "typeString": "struct VirtualVote.Data storage ref" + } + }, + "id": 2621, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "result", + "nodeType": "MemberAccess", + "referencedDeclaration": 5330, + "src": "1294:16:10", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 2622, + "name": "_mooniswapFactoryGovernance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2610, + "src": "1313:27:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + } + }, + "id": 2623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "defaultFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 4596, + "src": "1313:38:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 2624, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1313:40:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2625, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "toUint104", + "nodeType": "MemberAccess", + "referencedDeclaration": 5058, + "src": "1313:50:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint104_$bound_to$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint104)" + } + }, + "id": 2626, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1313:52:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + "src": "1294:71:10", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + "id": 2628, + "nodeType": "ExpressionStatement", + "src": "1294:71:10" + }, + { + "expression": { + "argumentTypes": null, + "id": 2639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2629, + "name": "_slippageFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "1375:12:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + }, + "id": 2632, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "data", + "nodeType": "MemberAccess", + "referencedDeclaration": 4659, + "src": "1375:17:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_storage", + "typeString": "struct VirtualVote.Data storage ref" + } + }, + "id": 2633, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "result", + "nodeType": "MemberAccess", + "referencedDeclaration": 5330, + "src": "1375:24:10", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 2634, + "name": "_mooniswapFactoryGovernance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2610, + "src": "1402:27:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + } + }, + "id": 2635, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "defaultSlippageFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 4601, + "src": "1402:46:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 2636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1402:48:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2637, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "toUint104", + "nodeType": "MemberAccess", + "referencedDeclaration": 5058, + "src": "1402:58:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint104_$bound_to$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint104)" + } + }, + "id": 2638, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1402:60:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + "src": "1375:87:10", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + "id": 2640, + "nodeType": "ExpressionStatement", + "src": "1375:87:10" + }, + { + "expression": { + "argumentTypes": null, + "id": 2651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2641, + "name": "_decayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2608, + "src": "1472:12:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + }, + "id": 2644, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "data", + "nodeType": "MemberAccess", + "referencedDeclaration": 4659, + "src": "1472:17:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_storage", + "typeString": "struct VirtualVote.Data storage ref" + } + }, + "id": 2645, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "result", + "nodeType": "MemberAccess", + "referencedDeclaration": 5330, + "src": "1472:24:10", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 2646, + "name": "_mooniswapFactoryGovernance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2610, + "src": "1499:27:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + } + }, + "id": 2647, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "defaultDecayPeriod", + "nodeType": "MemberAccess", + "referencedDeclaration": 4606, + "src": "1499:46:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 2648, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1499:48:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 2649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "toUint104", + "nodeType": "MemberAccess", + "referencedDeclaration": 5058, + "src": "1499:58:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint104_$bound_to$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint104)" + } + }, + "id": 2650, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1499:60:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + "src": "1472:87:10", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + "id": 2652, + "nodeType": "ExpressionStatement", + "src": "1472:87:10" + } + ] + }, + "documentation": null, + "id": 2654, + "implemented": true, + "kind": "constructor", + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2611, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2610, + "mutability": "mutable", + "name": "_mooniswapFactoryGovernance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2654, + "src": "1152:55:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + }, + "typeName": { + "contractScope": null, + "id": 2609, + "name": "IMooniswapFactoryGovernance", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4639, + "src": "1152:27:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1151:57:10" + }, + "returnParameters": { + "id": 2612, + "nodeType": "ParameterList", + "parameters": [], + "src": "1218:0:10" + }, + "scope": 3418, + "src": "1140:426:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 2680, + "nodeType": "Block", + "src": "1689:184:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 2663, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 2661, + "name": "mooniswapFactoryGovernance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2602, + "src": "1699:26:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 2662, + "name": "newMooniswapFactoryGovernance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2656, + "src": "1728:29:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + } + }, + "src": "1699:58:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + } + }, + "id": 2664, + "nodeType": "ExpressionStatement", + "src": "1699:58:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 2665, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "1767:4:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MooniswapGovernance_$3418", + "typeString": "contract MooniswapGovernance" + } + }, + "id": 2667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "discardFeeVote", + "nodeType": "MemberAccess", + "referencedDeclaration": 2985, + "src": "1767:19:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 2668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1767:21:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2669, + "nodeType": "ExpressionStatement", + "src": "1767:21:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 2670, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "1798:4:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MooniswapGovernance_$3418", + "typeString": "contract MooniswapGovernance" + } + }, + "id": 2672, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "discardSlippageFeeVote", + "nodeType": "MemberAccess", + "referencedDeclaration": 3014, + "src": "1798:27:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 2673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1798:29:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2674, + "nodeType": "ExpressionStatement", + "src": "1798:29:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 2675, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "1837:4:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_MooniswapGovernance_$3418", + "typeString": "contract MooniswapGovernance" + } + }, + "id": 2677, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "discardDecayPeriodVote", + "nodeType": "MemberAccess", + "referencedDeclaration": 3043, + "src": "1837:27:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", + "typeString": "function () external" + } + }, + "id": 2678, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1837:29:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2679, + "nodeType": "ExpressionStatement", + "src": "1837:29:10" + } + ] + }, + "documentation": null, + "functionSelector": "c40d4d66", + "id": 2681, + "implemented": true, + "kind": "function", + "modifiers": [ + { + "arguments": null, + "id": 2659, + "modifierName": { + "argumentTypes": null, + "id": 2658, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4478, + "src": "1679:9:10", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "1679:9:10" + } + ], + "name": "setMooniswapFactoryGovernance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2657, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2656, + "mutability": "mutable", + "name": "newMooniswapFactoryGovernance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2681, + "src": "1611:57:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + }, + "typeName": { + "contractScope": null, + "id": 2655, + "name": "IMooniswapFactoryGovernance", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4639, + "src": "1611:27:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1610:59:10" + }, + "returnParameters": { + "id": 2660, + "nodeType": "ParameterList", + "parameters": [], + "src": "1689:0:10" + }, + "scope": 3418, + "src": "1572:301:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2691, + "nodeType": "Block", + "src": "1923:43:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2686, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2604, + "src": "1940:4:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + }, + "id": 2687, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "data", + "nodeType": "MemberAccess", + "referencedDeclaration": 4659, + "src": "1940:9:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_storage", + "typeString": "struct VirtualVote.Data storage ref" + } + }, + "id": 2688, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "current", + "nodeType": "MemberAccess", + "referencedDeclaration": 5383, + "src": "1940:17:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$5333_memory_ptr_$returns$_t_uint256_$bound_to$_t_struct$_Data_$5333_memory_ptr_$", + "typeString": "function (struct VirtualVote.Data memory) view returns (uint256)" + } + }, + "id": 2689, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1940:19:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2685, + "id": 2690, + "nodeType": "Return", + "src": "1933:26:10" + } + ] + }, + "documentation": null, + "functionSelector": "ddca3f43", + "id": 2692, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "fee", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2682, + "nodeType": "ParameterList", + "parameters": [], + "src": "1891:2:10" + }, + "returnParameters": { + "id": 2685, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2684, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2692, + "src": "1914:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2683, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1914:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1913:9:10" + }, + "scope": 3418, + "src": "1879:87:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2702, + "nodeType": "Block", + "src": "2024:51:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2697, + "name": "_slippageFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "2041:12:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + }, + "id": 2698, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "data", + "nodeType": "MemberAccess", + "referencedDeclaration": 4659, + "src": "2041:17:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_storage", + "typeString": "struct VirtualVote.Data storage ref" + } + }, + "id": 2699, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "current", + "nodeType": "MemberAccess", + "referencedDeclaration": 5383, + "src": "2041:25:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$5333_memory_ptr_$returns$_t_uint256_$bound_to$_t_struct$_Data_$5333_memory_ptr_$", + "typeString": "function (struct VirtualVote.Data memory) view returns (uint256)" + } + }, + "id": 2700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2041:27:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2696, + "id": 2701, + "nodeType": "Return", + "src": "2034:34:10" + } + ] + }, + "documentation": null, + "functionSelector": "3732b394", + "id": 2703, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "slippageFee", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2693, + "nodeType": "ParameterList", + "parameters": [], + "src": "1992:2:10" + }, + "returnParameters": { + "id": 2696, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2695, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2703, + "src": "2015:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2694, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2015:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2014:9:10" + }, + "scope": 3418, + "src": "1972:103:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2713, + "nodeType": "Block", + "src": "2133:51:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2708, + "name": "_decayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2608, + "src": "2150:12:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + }, + "id": 2709, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "data", + "nodeType": "MemberAccess", + "referencedDeclaration": 4659, + "src": "2150:17:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_storage", + "typeString": "struct VirtualVote.Data storage ref" + } + }, + "id": 2710, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "current", + "nodeType": "MemberAccess", + "referencedDeclaration": 5383, + "src": "2150:25:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$5333_memory_ptr_$returns$_t_uint256_$bound_to$_t_struct$_Data_$5333_memory_ptr_$", + "typeString": "function (struct VirtualVote.Data memory) view returns (uint256)" + } + }, + "id": 2711, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2150:27:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2707, + "id": 2712, + "nodeType": "Return", + "src": "2143:34:10" + } + ] + }, + "documentation": null, + "functionSelector": "48d67e1b", + "id": 2714, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "decayPeriod", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2704, + "nodeType": "ParameterList", + "parameters": [], + "src": "2101:2:10" + }, + "returnParameters": { + "id": 2707, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2706, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2714, + "src": "2124:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2705, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2124:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2123:9:10" + }, + "scope": 3418, + "src": "2081:103:10", + "stateMutability": "view", + "virtual": false, + "visibility": "public" + }, + { + "body": { + "id": 2734, + "nodeType": "Block", + "src": "2260:79:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2723, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2604, + "src": "2278:4:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + }, + "id": 2724, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "data", + "nodeType": "MemberAccess", + "referencedDeclaration": 4659, + "src": "2278:9:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_storage", + "typeString": "struct VirtualVote.Data storage ref" + } + }, + "id": 2725, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "oldResult", + "nodeType": "MemberAccess", + "referencedDeclaration": 5328, + "src": "2278:19:10", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2726, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2604, + "src": "2299:4:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + }, + "id": 2727, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "data", + "nodeType": "MemberAccess", + "referencedDeclaration": 4659, + "src": "2299:9:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_storage", + "typeString": "struct VirtualVote.Data storage ref" + } + }, + "id": 2728, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "result", + "nodeType": "MemberAccess", + "referencedDeclaration": 5330, + "src": "2299:16:10", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2729, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2604, + "src": "2317:4:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + }, + "id": 2730, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "data", + "nodeType": "MemberAccess", + "referencedDeclaration": 4659, + "src": "2317:9:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_storage", + "typeString": "struct VirtualVote.Data storage ref" + } + }, + "id": 2731, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "time", + "nodeType": "MemberAccess", + "referencedDeclaration": 5332, + "src": "2317:14:10", + "typeDescriptions": { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + } + } + ], + "id": 2732, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2277:55:10", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint104_$_t_uint104_$_t_uint48_$", + "typeString": "tuple(uint104,uint104,uint48)" + } + }, + "functionReturnParameters": 2722, + "id": 2733, + "nodeType": "Return", + "src": "2270:62:10" + } + ] + }, + "documentation": null, + "functionSelector": "f1ea6042", + "id": 2735, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "virtualFee", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2715, + "nodeType": "ParameterList", + "parameters": [], + "src": "2209:2:10" + }, + "returnParameters": { + "id": 2722, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2717, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2735, + "src": "2234:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + }, + "typeName": { + "id": 2716, + "name": "uint104", + "nodeType": "ElementaryTypeName", + "src": "2234:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2719, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2735, + "src": "2243:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + }, + "typeName": { + "id": 2718, + "name": "uint104", + "nodeType": "ElementaryTypeName", + "src": "2243:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2721, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2735, + "src": "2252:6:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + }, + "typeName": { + "id": 2720, + "name": "uint48", + "nodeType": "ElementaryTypeName", + "src": "2252:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2233:26:10" + }, + "scope": 3418, + "src": "2190:149:10", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2755, + "nodeType": "Block", + "src": "2423:103:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2744, + "name": "_slippageFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "2441:12:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + }, + "id": 2745, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "data", + "nodeType": "MemberAccess", + "referencedDeclaration": 4659, + "src": "2441:17:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_storage", + "typeString": "struct VirtualVote.Data storage ref" + } + }, + "id": 2746, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "oldResult", + "nodeType": "MemberAccess", + "referencedDeclaration": 5328, + "src": "2441:27:10", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2747, + "name": "_slippageFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "2470:12:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + }, + "id": 2748, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "data", + "nodeType": "MemberAccess", + "referencedDeclaration": 4659, + "src": "2470:17:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_storage", + "typeString": "struct VirtualVote.Data storage ref" + } + }, + "id": 2749, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "result", + "nodeType": "MemberAccess", + "referencedDeclaration": 5330, + "src": "2470:24:10", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2750, + "name": "_slippageFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "2496:12:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + }, + "id": 2751, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "data", + "nodeType": "MemberAccess", + "referencedDeclaration": 4659, + "src": "2496:17:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_storage", + "typeString": "struct VirtualVote.Data storage ref" + } + }, + "id": 2752, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "time", + "nodeType": "MemberAccess", + "referencedDeclaration": 5332, + "src": "2496:22:10", + "typeDescriptions": { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + } + } + ], + "id": 2753, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2440:79:10", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint104_$_t_uint104_$_t_uint48_$", + "typeString": "tuple(uint104,uint104,uint48)" + } + }, + "functionReturnParameters": 2743, + "id": 2754, + "nodeType": "Return", + "src": "2433:86:10" + } + ] + }, + "documentation": null, + "functionSelector": "23e8cae1", + "id": 2756, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "virtualSlippageFee", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2736, + "nodeType": "ParameterList", + "parameters": [], + "src": "2372:2:10" + }, + "returnParameters": { + "id": 2743, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2738, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2756, + "src": "2397:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + }, + "typeName": { + "id": 2737, + "name": "uint104", + "nodeType": "ElementaryTypeName", + "src": "2397:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2740, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2756, + "src": "2406:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + }, + "typeName": { + "id": 2739, + "name": "uint104", + "nodeType": "ElementaryTypeName", + "src": "2406:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2742, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2756, + "src": "2415:6:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + }, + "typeName": { + "id": 2741, + "name": "uint48", + "nodeType": "ElementaryTypeName", + "src": "2415:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2396:26:10" + }, + "scope": 3418, + "src": "2345:181:10", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2776, + "nodeType": "Block", + "src": "2610:103:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2765, + "name": "_decayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2608, + "src": "2628:12:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + }, + "id": 2766, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "data", + "nodeType": "MemberAccess", + "referencedDeclaration": 4659, + "src": "2628:17:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_storage", + "typeString": "struct VirtualVote.Data storage ref" + } + }, + "id": 2767, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "oldResult", + "nodeType": "MemberAccess", + "referencedDeclaration": 5328, + "src": "2628:27:10", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2768, + "name": "_decayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2608, + "src": "2657:12:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + }, + "id": 2769, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "data", + "nodeType": "MemberAccess", + "referencedDeclaration": 4659, + "src": "2657:17:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_storage", + "typeString": "struct VirtualVote.Data storage ref" + } + }, + "id": 2770, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "result", + "nodeType": "MemberAccess", + "referencedDeclaration": 5330, + "src": "2657:24:10", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2771, + "name": "_decayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2608, + "src": "2683:12:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + }, + "id": 2772, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "data", + "nodeType": "MemberAccess", + "referencedDeclaration": 4659, + "src": "2683:17:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_storage", + "typeString": "struct VirtualVote.Data storage ref" + } + }, + "id": 2773, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "time", + "nodeType": "MemberAccess", + "referencedDeclaration": 5332, + "src": "2683:22:10", + "typeDescriptions": { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + } + } + ], + "id": 2774, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2627:79:10", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint104_$_t_uint104_$_t_uint48_$", + "typeString": "tuple(uint104,uint104,uint48)" + } + }, + "functionReturnParameters": 2764, + "id": 2775, + "nodeType": "Return", + "src": "2620:86:10" + } + ] + }, + "documentation": null, + "functionSelector": "0146081f", + "id": 2777, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "virtualDecayPeriod", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2757, + "nodeType": "ParameterList", + "parameters": [], + "src": "2559:2:10" + }, + "returnParameters": { + "id": 2764, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2759, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2777, + "src": "2584:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + }, + "typeName": { + "id": 2758, + "name": "uint104", + "nodeType": "ElementaryTypeName", + "src": "2584:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2761, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2777, + "src": "2593:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + }, + "typeName": { + "id": 2760, + "name": "uint104", + "nodeType": "ElementaryTypeName", + "src": "2593:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 2763, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2777, + "src": "2602:6:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + }, + "typeName": { + "id": 2762, + "name": "uint48", + "nodeType": "ElementaryTypeName", + "src": "2602:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2583:26:10" + }, + "scope": 3418, + "src": "2532:181:10", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2793, + "nodeType": "Block", + "src": "2782:83:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2789, + "name": "mooniswapFactoryGovernance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2602, + "src": "2820:26:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + } + }, + "id": 2790, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "defaultFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 4596, + "src": "2820:37:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2784, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2604, + "src": "2799:4:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + }, + "id": 2785, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4667, + "src": "2799:10:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Data_$5389_storage_$", + "typeString": "mapping(address => struct Vote.Data storage ref)" + } + }, + "id": 2787, + "indexExpression": { + "argumentTypes": null, + "id": 2786, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2779, + "src": "2810:4:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2799:16:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_storage", + "typeString": "struct Vote.Data storage ref" + } + }, + "id": 2788, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "get", + "nodeType": "MemberAccess", + "referencedDeclaration": 5495, + "src": "2799:20:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$5389_memory_ptr_$_t_function_external_view$__$returns$_t_uint256_$_$returns$_t_uint256_$bound_to$_t_struct$_Data_$5389_memory_ptr_$", + "typeString": "function (struct Vote.Data memory,function () view external returns (uint256)) view returns (uint256)" + } + }, + "id": 2791, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2799:59:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2783, + "id": 2792, + "nodeType": "Return", + "src": "2792:66:10" + } + ] + }, + "documentation": null, + "functionSelector": "9aad141b", + "id": 2794, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "feeVotes", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2780, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2779, + "mutability": "mutable", + "name": "user", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2794, + "src": "2737:12:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2778, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2737:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2736:14:10" + }, + "returnParameters": { + "id": 2783, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2782, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2794, + "src": "2773:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2781, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2773:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2772:9:10" + }, + "scope": 3418, + "src": "2719:146:10", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2810, + "nodeType": "Block", + "src": "2942:99:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2806, + "name": "mooniswapFactoryGovernance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2602, + "src": "2988:26:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + } + }, + "id": 2807, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "defaultSlippageFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 4601, + "src": "2988:45:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2801, + "name": "_slippageFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "2959:12:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + }, + "id": 2802, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4667, + "src": "2959:18:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Data_$5389_storage_$", + "typeString": "mapping(address => struct Vote.Data storage ref)" + } + }, + "id": 2804, + "indexExpression": { + "argumentTypes": null, + "id": 2803, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2796, + "src": "2978:4:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2959:24:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_storage", + "typeString": "struct Vote.Data storage ref" + } + }, + "id": 2805, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "get", + "nodeType": "MemberAccess", + "referencedDeclaration": 5495, + "src": "2959:28:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$5389_memory_ptr_$_t_function_external_view$__$returns$_t_uint256_$_$returns$_t_uint256_$bound_to$_t_struct$_Data_$5389_memory_ptr_$", + "typeString": "function (struct Vote.Data memory,function () view external returns (uint256)) view returns (uint256)" + } + }, + "id": 2808, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2959:75:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2800, + "id": 2809, + "nodeType": "Return", + "src": "2952:82:10" + } + ] + }, + "documentation": null, + "functionSelector": "95cad3c7", + "id": 2811, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "slippageFeeVotes", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2797, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2796, + "mutability": "mutable", + "name": "user", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2811, + "src": "2897:12:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2795, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2897:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2896:14:10" + }, + "returnParameters": { + "id": 2800, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2799, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2811, + "src": "2933:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2798, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2933:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2932:9:10" + }, + "scope": 3418, + "src": "2871:170:10", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2827, + "nodeType": "Block", + "src": "3118:99:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2823, + "name": "mooniswapFactoryGovernance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2602, + "src": "3164:26:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + } + }, + "id": 2824, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "defaultDecayPeriod", + "nodeType": "MemberAccess", + "referencedDeclaration": 4606, + "src": "3164:45:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2818, + "name": "_decayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2608, + "src": "3135:12:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + }, + "id": 2819, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4667, + "src": "3135:18:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Data_$5389_storage_$", + "typeString": "mapping(address => struct Vote.Data storage ref)" + } + }, + "id": 2821, + "indexExpression": { + "argumentTypes": null, + "id": 2820, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2813, + "src": "3154:4:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3135:24:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_storage", + "typeString": "struct Vote.Data storage ref" + } + }, + "id": 2822, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "get", + "nodeType": "MemberAccess", + "referencedDeclaration": 5495, + "src": "3135:28:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$5389_memory_ptr_$_t_function_external_view$__$returns$_t_uint256_$_$returns$_t_uint256_$bound_to$_t_struct$_Data_$5389_memory_ptr_$", + "typeString": "function (struct Vote.Data memory,function () view external returns (uint256)) view returns (uint256)" + } + }, + "id": 2825, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3135:75:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 2817, + "id": 2826, + "nodeType": "Return", + "src": "3128:82:10" + } + ] + }, + "documentation": null, + "functionSelector": "7e82a6f3", + "id": 2828, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "decayPeriodVotes", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2814, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2813, + "mutability": "mutable", + "name": "user", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2828, + "src": "3073:12:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2812, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3073:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3072:14:10" + }, + "returnParameters": { + "id": 2817, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2816, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2828, + "src": "3109:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2815, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3109:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3108:9:10" + }, + "scope": 3418, + "src": "3047:170:10", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2867, + "nodeType": "Block", + "src": "3263:263:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2837, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2834, + "name": "vote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2830, + "src": "3281:4:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2835, + "name": "MooniswapConstants", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5012, + "src": "3289:18:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MooniswapConstants_$5012_$", + "typeString": "type(library MooniswapConstants)" + } + }, + "id": 2836, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "_MAX_FEE", + "nodeType": "MemberAccess", + "referencedDeclaration": 4987, + "src": "3289:27:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3281:35:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "46656520766f746520697320746f6f2068696768", + "id": 2838, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3318:22:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_12cd9f64c0438938fef6dd272586df2ff5f8c87a5767603bf776c7e02f1a504a", + "typeString": "literal_string \"Fee vote is too high\"" + }, + "value": "Fee vote is too high" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_12cd9f64c0438938fef6dd272586df2ff5f8c87a5767603bf776c7e02f1a504a", + "typeString": "literal_string \"Fee vote is too high\"" + } + ], + "id": 2833, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3273:7:10", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3273:68:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2840, + "nodeType": "ExpressionStatement", + "src": "3273:68:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2844, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3368:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2845, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3368:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2846, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2604, + "src": "3380:4:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + }, + "id": 2847, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4667, + "src": "3380:10:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Data_$5389_storage_$", + "typeString": "mapping(address => struct Vote.Data storage ref)" + } + }, + "id": 2850, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2848, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3391:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3391:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3380:22:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_storage", + "typeString": "struct Vote.Data storage ref" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2853, + "name": "vote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2830, + "src": "3414:4:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 2851, + "name": "Vote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5496, + "src": "3404:4:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Vote_$5496_$", + "typeString": "type(library Vote)" + } + }, + "id": 2852, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "init", + "nodeType": "MemberAccess", + "referencedDeclaration": 5431, + "src": "3404:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_struct$_Data_$5389_memory_ptr_$", + "typeString": "function (uint256) pure returns (struct Vote.Data memory)" + } + }, + "id": 2854, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3404:15:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2856, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3431:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2857, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3431:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 2855, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2143, + "src": "3421:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 2858, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3421:21:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2859, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2129, + "src": "3444:11:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 2860, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3444:13:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 2861, + "name": "mooniswapFactoryGovernance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2602, + "src": "3459:26:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + } + }, + "id": 2862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "defaultFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 4596, + "src": "3459:37:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 2863, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3459:39:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2864, + "name": "_emitFeeVoteUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3062, + "src": "3500:18:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_struct$_Data_$5389_storage", + "typeString": "struct Vote.Data storage ref" + }, + { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + } + ], + "expression": { + "argumentTypes": null, + "id": 2841, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2604, + "src": "3352:4:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + }, + "id": 2843, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "updateVote", + "nodeType": "MemberAccess", + "referencedDeclaration": 4710, + "src": "3352:15:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$4668_storage_ptr_$_t_address_$_t_struct$_Data_$5389_memory_ptr_$_t_struct$_Data_$5389_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$_$returns$__$bound_to$_t_struct$_Data_$4668_storage_ptr_$", + "typeString": "function (struct LiquidVoting.Data storage pointer,address,struct Vote.Data memory,struct Vote.Data memory,uint256,uint256,uint256,function (address,uint256,bool,uint256))" + } + }, + "id": 2865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3352:167:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2866, + "nodeType": "ExpressionStatement", + "src": "3352:167:10" + } + ] + }, + "documentation": null, + "functionSelector": "11212d66", + "id": 2868, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "feeVote", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2831, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2830, + "mutability": "mutable", + "name": "vote", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2868, + "src": "3240:12:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2829, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3240:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3239:14:10" + }, + "returnParameters": { + "id": 2832, + "nodeType": "ParameterList", + "parameters": [], + "src": "3263:0:10" + }, + "scope": 3418, + "src": "3223:303:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2907, + "nodeType": "Block", + "src": "3580:313:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2874, + "name": "vote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "3598:4:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2875, + "name": "MooniswapConstants", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5012, + "src": "3606:18:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MooniswapConstants_$5012_$", + "typeString": "type(library MooniswapConstants)" + } + }, + "id": 2876, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "_MAX_SLIPPAGE_FEE", + "nodeType": "MemberAccess", + "referencedDeclaration": 4990, + "src": "3606:36:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3598:44:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "536c6970706167652066656520766f746520697320746f6f2068696768", + "id": 2878, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3644:31:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b324365c713894748d9783d7f183b837dc2fb762b8927f4dd1c594b3ca42e84b", + "typeString": "literal_string \"Slippage fee vote is too high\"" + }, + "value": "Slippage fee vote is too high" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b324365c713894748d9783d7f183b837dc2fb762b8927f4dd1c594b3ca42e84b", + "typeString": "literal_string \"Slippage fee vote is too high\"" + } + ], + "id": 2873, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3590:7:10", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2879, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3590:86:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2880, + "nodeType": "ExpressionStatement", + "src": "3590:86:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2884, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3711:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2885, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3711:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2886, + "name": "_slippageFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "3723:12:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + }, + "id": 2887, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4667, + "src": "3723:18:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Data_$5389_storage_$", + "typeString": "mapping(address => struct Vote.Data storage ref)" + } + }, + "id": 2890, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2888, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3742:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3742:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3723:30:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_storage", + "typeString": "struct Vote.Data storage ref" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2893, + "name": "vote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2870, + "src": "3765:4:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 2891, + "name": "Vote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5496, + "src": "3755:4:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Vote_$5496_$", + "typeString": "type(library Vote)" + } + }, + "id": 2892, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "init", + "nodeType": "MemberAccess", + "referencedDeclaration": 5431, + "src": "3755:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_struct$_Data_$5389_memory_ptr_$", + "typeString": "function (uint256) pure returns (struct Vote.Data memory)" + } + }, + "id": 2894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3755:15:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2896, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "3782:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3782:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 2895, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2143, + "src": "3772:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 2898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3772:21:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2899, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2129, + "src": "3795:11:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 2900, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3795:13:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 2901, + "name": "mooniswapFactoryGovernance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2602, + "src": "3810:26:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + } + }, + "id": 2902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "defaultSlippageFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 4601, + "src": "3810:45:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 2903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3810:47:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2904, + "name": "_emitSlippageFeeVoteUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3081, + "src": "3859:26:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_struct$_Data_$5389_storage", + "typeString": "struct Vote.Data storage ref" + }, + { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + } + ], + "expression": { + "argumentTypes": null, + "id": 2881, + "name": "_slippageFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "3687:12:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + }, + "id": 2883, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "updateVote", + "nodeType": "MemberAccess", + "referencedDeclaration": 4710, + "src": "3687:23:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$4668_storage_ptr_$_t_address_$_t_struct$_Data_$5389_memory_ptr_$_t_struct$_Data_$5389_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$_$returns$__$bound_to$_t_struct$_Data_$4668_storage_ptr_$", + "typeString": "function (struct LiquidVoting.Data storage pointer,address,struct Vote.Data memory,struct Vote.Data memory,uint256,uint256,uint256,function (address,uint256,bool,uint256))" + } + }, + "id": 2905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3687:199:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2906, + "nodeType": "ExpressionStatement", + "src": "3687:199:10" + } + ] + }, + "documentation": null, + "functionSelector": "07a80070", + "id": 2908, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "slippageFeeVote", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2871, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2870, + "mutability": "mutable", + "name": "vote", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2908, + "src": "3557:12:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2869, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3557:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3556:14:10" + }, + "returnParameters": { + "id": 2872, + "nodeType": "ParameterList", + "parameters": [], + "src": "3580:0:10" + }, + "scope": 3418, + "src": "3532:361:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2955, + "nodeType": "Block", + "src": "3947:408:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2917, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2914, + "name": "vote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2910, + "src": "3965:4:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2915, + "name": "MooniswapConstants", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5012, + "src": "3973:18:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MooniswapConstants_$5012_$", + "typeString": "type(library MooniswapConstants)" + } + }, + "id": 2916, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "_MAX_DECAY_PERIOD", + "nodeType": "MemberAccess", + "referencedDeclaration": 4996, + "src": "3973:36:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3965:44:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "446563617920706572696f6420766f746520697320746f6f2068696768", + "id": 2918, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4011:31:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7919f243552e8b31580b41bc6be5c3cfb787acae23bc696e19e5cc95240539fe", + "typeString": "literal_string \"Decay period vote is too high\"" + }, + "value": "Decay period vote is too high" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_7919f243552e8b31580b41bc6be5c3cfb787acae23bc696e19e5cc95240539fe", + "typeString": "literal_string \"Decay period vote is too high\"" + } + ], + "id": 2913, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "3957:7:10", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2919, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3957:86:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2920, + "nodeType": "ExpressionStatement", + "src": "3957:86:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 2925, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 2922, + "name": "vote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2910, + "src": "4061:4:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2923, + "name": "MooniswapConstants", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5012, + "src": "4069:18:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_MooniswapConstants_$5012_$", + "typeString": "type(library MooniswapConstants)" + } + }, + "id": 2924, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "_MIN_DECAY_PERIOD", + "nodeType": "MemberAccess", + "referencedDeclaration": 4984, + "src": "4069:36:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "4061:44:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "446563617920706572696f6420766f746520697320746f6f206c6f77", + "id": 2926, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "4107:30:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e01d18ee686aa9010e88b58df16e3715b47938077ae7d60f8cd834b82d87e4b9", + "typeString": "literal_string \"Decay period vote is too low\"" + }, + "value": "Decay period vote is too low" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e01d18ee686aa9010e88b58df16e3715b47938077ae7d60f8cd834b82d87e4b9", + "typeString": "literal_string \"Decay period vote is too low\"" + } + ], + "id": 2921, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "4053:7:10", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 2927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4053:85:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2928, + "nodeType": "ExpressionStatement", + "src": "4053:85:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2932, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4173:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4173:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2934, + "name": "_decayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2608, + "src": "4185:12:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + }, + "id": 2935, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4667, + "src": "4185:18:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Data_$5389_storage_$", + "typeString": "mapping(address => struct Vote.Data storage ref)" + } + }, + "id": 2938, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2936, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4204:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4204:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4185:30:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_storage", + "typeString": "struct Vote.Data storage ref" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 2941, + "name": "vote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2910, + "src": "4227:4:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 2939, + "name": "Vote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5496, + "src": "4217:4:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Vote_$5496_$", + "typeString": "type(library Vote)" + } + }, + "id": 2940, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "init", + "nodeType": "MemberAccess", + "referencedDeclaration": 5431, + "src": "4217:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_struct$_Data_$5389_memory_ptr_$", + "typeString": "function (uint256) pure returns (struct Vote.Data memory)" + } + }, + "id": 2942, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4217:15:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2944, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4244:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4244:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 2943, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2143, + "src": "4234:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 2946, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4234:21:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2947, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2129, + "src": "4257:11:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 2948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4257:13:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 2949, + "name": "mooniswapFactoryGovernance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2602, + "src": "4272:26:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + } + }, + "id": 2950, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "defaultDecayPeriod", + "nodeType": "MemberAccess", + "referencedDeclaration": 4606, + "src": "4272:45:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 2951, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4272:47:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2952, + "name": "_emitDecayPeriodVoteUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3100, + "src": "4321:26:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_struct$_Data_$5389_storage", + "typeString": "struct Vote.Data storage ref" + }, + { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + } + ], + "expression": { + "argumentTypes": null, + "id": 2929, + "name": "_decayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2608, + "src": "4149:12:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + }, + "id": 2931, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "updateVote", + "nodeType": "MemberAccess", + "referencedDeclaration": 4710, + "src": "4149:23:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$4668_storage_ptr_$_t_address_$_t_struct$_Data_$5389_memory_ptr_$_t_struct$_Data_$5389_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$_$returns$__$bound_to$_t_struct$_Data_$4668_storage_ptr_$", + "typeString": "function (struct LiquidVoting.Data storage pointer,address,struct Vote.Data memory,struct Vote.Data memory,uint256,uint256,uint256,function (address,uint256,bool,uint256))" + } + }, + "id": 2953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4149:199:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2954, + "nodeType": "ExpressionStatement", + "src": "4149:199:10" + } + ] + }, + "documentation": null, + "functionSelector": "eaadf848", + "id": 2956, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "decayPeriodVote", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2911, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 2910, + "mutability": "mutable", + "name": "vote", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 2956, + "src": "3924:12:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 2909, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3924:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3923:14:10" + }, + "returnParameters": { + "id": 2912, + "nodeType": "ParameterList", + "parameters": [], + "src": "3947:0:10" + }, + "scope": 3418, + "src": "3899:456:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 2984, + "nodeType": "Block", + "src": "4396:180:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2962, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4422:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2963, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4422:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2964, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2604, + "src": "4434:4:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + }, + "id": 2965, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4667, + "src": "4434:10:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Data_$5389_storage_$", + "typeString": "mapping(address => struct Vote.Data storage ref)" + } + }, + "id": 2968, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2966, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4445:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2967, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4445:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4434:22:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_storage", + "typeString": "struct Vote.Data storage ref" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 2969, + "name": "Vote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5496, + "src": "4458:4:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Vote_$5496_$", + "typeString": "type(library Vote)" + } + }, + "id": 2970, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "init", + "nodeType": "MemberAccess", + "referencedDeclaration": 5416, + "src": "4458:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_Data_$5389_memory_ptr_$", + "typeString": "function () pure returns (struct Vote.Data memory)" + } + }, + "id": 2971, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4458:11:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2973, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4481:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2974, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4481:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 2972, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2143, + "src": "4471:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 2975, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4471:21:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 2976, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2129, + "src": "4494:11:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 2977, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4494:13:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 2978, + "name": "mooniswapFactoryGovernance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2602, + "src": "4509:26:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + } + }, + "id": 2979, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "defaultFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 4596, + "src": "4509:37:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 2980, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4509:39:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 2981, + "name": "_emitFeeVoteUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3062, + "src": "4550:18:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_struct$_Data_$5389_storage", + "typeString": "struct Vote.Data storage ref" + }, + { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + } + ], + "expression": { + "argumentTypes": null, + "id": 2959, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2604, + "src": "4406:4:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + }, + "id": 2961, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "updateVote", + "nodeType": "MemberAccess", + "referencedDeclaration": 4710, + "src": "4406:15:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$4668_storage_ptr_$_t_address_$_t_struct$_Data_$5389_memory_ptr_$_t_struct$_Data_$5389_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$_$returns$__$bound_to$_t_struct$_Data_$4668_storage_ptr_$", + "typeString": "function (struct LiquidVoting.Data storage pointer,address,struct Vote.Data memory,struct Vote.Data memory,uint256,uint256,uint256,function (address,uint256,bool,uint256))" + } + }, + "id": 2982, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4406:163:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 2983, + "nodeType": "ExpressionStatement", + "src": "4406:163:10" + } + ] + }, + "documentation": null, + "functionSelector": "93028d83", + "id": 2985, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "discardFeeVote", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2957, + "nodeType": "ParameterList", + "parameters": [], + "src": "4384:2:10" + }, + "returnParameters": { + "id": 2958, + "nodeType": "ParameterList", + "parameters": [], + "src": "4396:0:10" + }, + "scope": 3418, + "src": "4361:215:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 3013, + "nodeType": "Block", + "src": "4625:212:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2991, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4659:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2992, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4659:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2993, + "name": "_slippageFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "4671:12:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + }, + "id": 2994, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4667, + "src": "4671:18:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Data_$5389_storage_$", + "typeString": "mapping(address => struct Vote.Data storage ref)" + } + }, + "id": 2997, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 2995, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4690:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 2996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4690:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4671:30:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_storage", + "typeString": "struct Vote.Data storage ref" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 2998, + "name": "Vote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5496, + "src": "4703:4:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Vote_$5496_$", + "typeString": "type(library Vote)" + } + }, + "id": 2999, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "init", + "nodeType": "MemberAccess", + "referencedDeclaration": 5416, + "src": "4703:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_Data_$5389_memory_ptr_$", + "typeString": "function () pure returns (struct Vote.Data memory)" + } + }, + "id": 3000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4703:11:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3002, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4726:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3003, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4726:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 3001, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2143, + "src": "4716:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 3004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4716:21:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3005, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2129, + "src": "4739:11:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3006, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4739:13:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 3007, + "name": "mooniswapFactoryGovernance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2602, + "src": "4754:26:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + } + }, + "id": 3008, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "defaultSlippageFee", + "nodeType": "MemberAccess", + "referencedDeclaration": 4601, + "src": "4754:45:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 3009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4754:47:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3010, + "name": "_emitSlippageFeeVoteUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3081, + "src": "4803:26:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_struct$_Data_$5389_storage", + "typeString": "struct Vote.Data storage ref" + }, + { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + } + ], + "expression": { + "argumentTypes": null, + "id": 2988, + "name": "_slippageFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "4635:12:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + }, + "id": 2990, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "updateVote", + "nodeType": "MemberAccess", + "referencedDeclaration": 4710, + "src": "4635:23:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$4668_storage_ptr_$_t_address_$_t_struct$_Data_$5389_memory_ptr_$_t_struct$_Data_$5389_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$_$returns$__$bound_to$_t_struct$_Data_$4668_storage_ptr_$", + "typeString": "function (struct LiquidVoting.Data storage pointer,address,struct Vote.Data memory,struct Vote.Data memory,uint256,uint256,uint256,function (address,uint256,bool,uint256))" + } + }, + "id": 3011, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4635:195:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3012, + "nodeType": "ExpressionStatement", + "src": "4635:195:10" + } + ] + }, + "documentation": null, + "functionSelector": "6669302a", + "id": 3014, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "discardSlippageFeeVote", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 2986, + "nodeType": "ParameterList", + "parameters": [], + "src": "4613:2:10" + }, + "returnParameters": { + "id": 2987, + "nodeType": "ParameterList", + "parameters": [], + "src": "4625:0:10" + }, + "scope": 3418, + "src": "4582:255:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 3042, + "nodeType": "Block", + "src": "4886:212:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3020, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4920:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3021, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4920:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3022, + "name": "_decayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2608, + "src": "4932:12:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + }, + "id": 3023, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4667, + "src": "4932:18:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Data_$5389_storage_$", + "typeString": "mapping(address => struct Vote.Data storage ref)" + } + }, + "id": 3026, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3024, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4951:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4951:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4932:30:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_storage", + "typeString": "struct Vote.Data storage ref" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 3027, + "name": "Vote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5496, + "src": "4964:4:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Vote_$5496_$", + "typeString": "type(library Vote)" + } + }, + "id": 3028, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "init", + "nodeType": "MemberAccess", + "referencedDeclaration": 5416, + "src": "4964:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_Data_$5389_memory_ptr_$", + "typeString": "function () pure returns (struct Vote.Data memory)" + } + }, + "id": 3029, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4964:11:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3031, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "4987:3:10", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3032, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4987:10:10", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + ], + "id": 3030, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2143, + "src": "4977:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 3033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4977:21:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3034, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2129, + "src": "5000:11:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3035, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5000:13:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 3036, + "name": "mooniswapFactoryGovernance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2602, + "src": "5015:26:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + } + }, + "id": 3037, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "defaultDecayPeriod", + "nodeType": "MemberAccess", + "referencedDeclaration": 4606, + "src": "5015:45:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 3038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5015:47:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3039, + "name": "_emitDecayPeriodVoteUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3100, + "src": "5064:26:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_struct$_Data_$5389_storage", + "typeString": "struct Vote.Data storage ref" + }, + { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + } + ], + "expression": { + "argumentTypes": null, + "id": 3017, + "name": "_decayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2608, + "src": "4896:12:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + }, + "id": 3019, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "updateVote", + "nodeType": "MemberAccess", + "referencedDeclaration": 4710, + "src": "4896:23:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$4668_storage_ptr_$_t_address_$_t_struct$_Data_$5389_memory_ptr_$_t_struct$_Data_$5389_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$_$returns$__$bound_to$_t_struct$_Data_$4668_storage_ptr_$", + "typeString": "function (struct LiquidVoting.Data storage pointer,address,struct Vote.Data memory,struct Vote.Data memory,uint256,uint256,uint256,function (address,uint256,bool,uint256))" + } + }, + "id": 3040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4896:195:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3041, + "nodeType": "ExpressionStatement", + "src": "4896:195:10" + } + ] + }, + "documentation": null, + "functionSelector": "f76d13b4", + "id": 3043, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "discardDecayPeriodVote", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3015, + "nodeType": "ParameterList", + "parameters": [], + "src": "4874:2:10" + }, + "returnParameters": { + "id": 3016, + "nodeType": "ParameterList", + "parameters": [], + "src": "4886:0:10" + }, + "scope": 3418, + "src": "4843:255:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": { + "id": 3061, + "nodeType": "Block", + "src": "5209:75:10", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3055, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3045, + "src": "5238:7:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3056, + "name": "newFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3047, + "src": "5247:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3057, + "name": "isDefault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3049, + "src": "5255:9:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 3058, + "name": "newBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3051, + "src": "5266:10:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3054, + "name": "FeeVoteUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2580, + "src": "5224:13:10", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + } + }, + "id": 3059, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5224:53:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3060, + "nodeType": "EmitStatement", + "src": "5219:58:10" + } + ] + }, + "documentation": null, + "id": 3062, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_emitFeeVoteUpdate", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3052, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3045, + "mutability": "mutable", + "name": "account", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3062, + "src": "5132:15:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3044, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5132:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3047, + "mutability": "mutable", + "name": "newFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3062, + "src": "5149:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3046, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5149:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3049, + "mutability": "mutable", + "name": "isDefault", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3062, + "src": "5165:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3048, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5165:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3051, + "mutability": "mutable", + "name": "newBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3062, + "src": "5181:18:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3050, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5181:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5131:69:10" + }, + "returnParameters": { + "id": 3053, + "nodeType": "ParameterList", + "parameters": [], + "src": "5209:0:10" + }, + "scope": 3418, + "src": "5104:180:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 3080, + "nodeType": "Block", + "src": "5411:91:10", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3074, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3064, + "src": "5448:7:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3075, + "name": "newSlippageFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3066, + "src": "5457:14:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3076, + "name": "isDefault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3068, + "src": "5473:9:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 3077, + "name": "newBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3070, + "src": "5484:10:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3073, + "name": "SlippageFeeVoteUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2590, + "src": "5426:21:10", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + } + }, + "id": 3078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5426:69:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3079, + "nodeType": "EmitStatement", + "src": "5421:74:10" + } + ] + }, + "documentation": null, + "id": 3081, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_emitSlippageFeeVoteUpdate", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3071, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3064, + "mutability": "mutable", + "name": "account", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3081, + "src": "5326:15:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3063, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5326:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3066, + "mutability": "mutable", + "name": "newSlippageFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3081, + "src": "5343:22:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3065, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5343:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3068, + "mutability": "mutable", + "name": "isDefault", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3081, + "src": "5367:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3067, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5367:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3070, + "mutability": "mutable", + "name": "newBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3081, + "src": "5383:18:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3069, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5383:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5325:77:10" + }, + "returnParameters": { + "id": 3072, + "nodeType": "ParameterList", + "parameters": [], + "src": "5411:0:10" + }, + "scope": 3418, + "src": "5290:212:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 3099, + "nodeType": "Block", + "src": "5629:91:10", + "statements": [ + { + "eventCall": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3093, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3083, + "src": "5666:7:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3094, + "name": "newDecayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3085, + "src": "5675:14:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3095, + "name": "isDefault", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3087, + "src": "5691:9:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 3096, + "name": "newBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3089, + "src": "5702:10:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3092, + "name": "DecayPeriodVoteUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2600, + "src": "5644:21:10", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + } + }, + "id": 3097, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5644:69:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3098, + "nodeType": "EmitStatement", + "src": "5639:74:10" + } + ] + }, + "documentation": null, + "id": 3100, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_emitDecayPeriodVoteUpdate", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3090, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3083, + "mutability": "mutable", + "name": "account", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3100, + "src": "5544:15:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3082, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5544:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3085, + "mutability": "mutable", + "name": "newDecayPeriod", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3100, + "src": "5561:22:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3084, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5561:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3087, + "mutability": "mutable", + "name": "isDefault", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3100, + "src": "5585:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3086, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5585:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3089, + "mutability": "mutable", + "name": "newBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3100, + "src": "5601:18:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3088, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5601:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5543:77:10" + }, + "returnParameters": { + "id": 3091, + "nodeType": "ParameterList", + "parameters": [], + "src": "5629:0:10" + }, + "scope": 3418, + "src": "5508:212:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + }, + { + "baseFunctions": [ + 2542 + ], + "body": { + "id": 3261, + "nodeType": "Block", + "src": "5816:1530:10", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3112, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3110, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "5830:4:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 3111, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3104, + "src": "5838:2:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "5830:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3115, + "nodeType": "IfStatement", + "src": "5826:87:10", + "trueBody": { + "id": 3114, + "nodeType": "Block", + "src": "5842:71:10", + "statements": [ + { + "expression": null, + "functionReturnParameters": 3109, + "id": 3113, + "nodeType": "Return", + "src": "5896:7:10" + } + ] + } + }, + { + "assignments": [ + 3117 + ], + "declarations": [ + { + "constant": false, + "id": 3117, + "mutability": "mutable", + "name": "_mooniswapFactoryGovernance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3261, + "src": "5923:55:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + }, + "typeName": { + "contractScope": null, + "id": 3116, + "name": "IMooniswapFactoryGovernance", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4639, + "src": "5923:27:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3119, + "initialValue": { + "argumentTypes": null, + "id": 3118, + "name": "mooniswapFactoryGovernance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2602, + "src": "5981:26:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5923:84:10" + }, + { + "assignments": [ + 3121 + ], + "declarations": [ + { + "constant": false, + "id": 3121, + "mutability": "mutable", + "name": "updateFrom", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3261, + "src": "6017:15:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3120, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6017:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3135, + "initialValue": { + "argumentTypes": null, + "id": 3134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "6035:73:10", + "subExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3132, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3122, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "6037:4:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 3125, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6053:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3124, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6045:7:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3123, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6045:7:10", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 3126, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6045:10:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6037:18:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3130, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "6102:4:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3128, + "name": "_mooniswapFactoryGovernance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3117, + "src": "6059:27:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + } + }, + "id": 3129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isFeeCollector", + "nodeType": "MemberAccess", + "referencedDeclaration": 4633, + "src": "6059:42:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view external returns (bool)" + } + }, + "id": 3131, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6059:48:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6037:70:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 3133, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6036:72:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6017:91:10" + }, + { + "assignments": [ + 3137 + ], + "declarations": [ + { + "constant": false, + "id": 3137, + "mutability": "mutable", + "name": "updateTo", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3261, + "src": "6118:13:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3136, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6118:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3151, + "initialValue": { + "argumentTypes": null, + "id": 3150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "6134:69:10", + "subExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3138, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3104, + "src": "6136:2:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 3141, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6150:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3140, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6142:7:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3139, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6142:7:10", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 3142, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6142:10:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6136:16:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3146, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3104, + "src": "6199:2:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3144, + "name": "_mooniswapFactoryGovernance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3117, + "src": "6156:27:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + } + }, + "id": 3145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "isFeeCollector", + "nodeType": "MemberAccess", + "referencedDeclaration": 4633, + "src": "6156:42:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_bool_$", + "typeString": "function (address) view external returns (bool)" + } + }, + "id": 3147, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6156:46:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6136:66:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 3149, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6135:68:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6118:85:10" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3156, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "6218:11:10", + "subExpression": { + "argumentTypes": null, + "id": 3152, + "name": "updateFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3121, + "src": "6219:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 3155, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "6233:9:10", + "subExpression": { + "argumentTypes": null, + "id": 3154, + "name": "updateTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3137, + "src": "6234:8:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6218:24:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3159, + "nodeType": "IfStatement", + "src": "6214:121:10", + "trueBody": { + "id": 3158, + "nodeType": "Block", + "src": "6244:91:10", + "statements": [ + { + "expression": null, + "functionReturnParameters": 3109, + "id": 3157, + "nodeType": "Return", + "src": "6318:7:10" + } + ] + } + }, + { + "assignments": [ + 3161 + ], + "declarations": [ + { + "constant": false, + "id": 3161, + "mutability": "mutable", + "name": "balanceFrom", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3261, + "src": "6345:19:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3160, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6345:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3174, + "initialValue": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3167, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3162, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "6368:4:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 3165, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6384:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3164, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6376:7:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3163, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6376:7:10", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 3166, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6376:10:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6368:18:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 3168, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6367:20:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3172, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6408:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "id": 3173, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "6367:42:10", + "trueExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3170, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "6400:4:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3169, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2143, + "src": "6390:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 3171, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6390:15:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6345:64:10" + }, + { + "assignments": [ + 3176 + ], + "declarations": [ + { + "constant": false, + "id": 3176, + "mutability": "mutable", + "name": "balanceTo", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3261, + "src": "6419:17:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3175, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6419:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3189, + "initialValue": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3182, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3177, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3104, + "src": "6440:2:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 3180, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6454:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3179, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6446:7:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3178, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6446:7:10", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 3181, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6446:10:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6440:16:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 3183, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "6439:18:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3187, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6476:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "id": 3188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "6439:38:10", + "trueExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3185, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3104, + "src": "6470:2:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3184, + "name": "balanceOf", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2143, + "src": "6460:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 3186, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6460:13:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6419:58:10" + }, + { + "assignments": [ + 3191 + ], + "declarations": [ + { + "constant": false, + "id": 3191, + "mutability": "mutable", + "name": "newTotalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3261, + "src": "6487:22:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3190, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6487:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3216, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3211, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3206, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3104, + "src": "6593:2:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 3209, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6607:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3208, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6599:7:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3207, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6599:7:10", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 3210, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6599:10:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6593:16:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3213, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6621:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "id": 3214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "6593:29:10", + "trueExpression": { + "argumentTypes": null, + "id": 3212, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3106, + "src": "6612:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3200, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3195, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "6543:4:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 3198, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6559:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3197, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6551:7:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3196, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6551:7:10", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 3199, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6551:10:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "6543:18:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3202, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6573:1:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "id": 3203, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "6543:31:10", + "trueExpression": { + "argumentTypes": null, + "id": 3201, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3106, + "src": "6564:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 3192, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2129, + "src": "6512:11:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 3193, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6512:13:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1869, + "src": "6512:30:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6512:63:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3205, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1886, + "src": "6512:80:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3215, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6512:111:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6487:136:10" + }, + { + "assignments": [ + 3218 + ], + "declarations": [ + { + "constant": false, + "id": 3218, + "mutability": "mutable", + "name": "params", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3261, + "src": "6634:26:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper" + }, + "typeName": { + "contractScope": null, + "id": 3217, + "name": "ParamsHelper", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3279, + "src": "6634:12:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_storage_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3229, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3220, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3102, + "src": "6696:4:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3221, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3104, + "src": "6718:2:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3222, + "name": "updateFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3121, + "src": "6746:10:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 3223, + "name": "updateTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3137, + "src": "6780:8:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 3224, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3106, + "src": "6810:6:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3225, + "name": "balanceFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3161, + "src": "6843:11:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3226, + "name": "balanceTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3176, + "src": "6879:9:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3227, + "name": "newTotalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3191, + "src": "6918:14:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3219, + "name": "ParamsHelper", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3279, + "src": "6663:12:10", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_ParamsHelper_$3279_storage_ptr_$", + "typeString": "type(struct MooniswapGovernance.ParamsHelper storage pointer)" + } + }, + "id": 3228, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "from", + "to", + "updateFrom", + "updateTo", + "amount", + "balanceFrom", + "balanceTo", + "newTotalSupply" + ], + "nodeType": "FunctionCall", + "src": "6663:280:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6634:309:10" + }, + { + "assignments": [ + 3231, + 3233, + 3235 + ], + "declarations": [ + { + "constant": false, + "id": 3231, + "mutability": "mutable", + "name": "defaultFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3261, + "src": "6955:18:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3230, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6955:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3233, + "mutability": "mutable", + "name": "defaultSlippageFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3261, + "src": "6975:26:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3232, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6975:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3235, + "mutability": "mutable", + "name": "defaultDecayPeriod", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3261, + "src": "7003:26:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3234, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7003:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3239, + "initialValue": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 3236, + "name": "_mooniswapFactoryGovernance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3117, + "src": "7033:27:10", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IMooniswapFactoryGovernance_$4639", + "typeString": "contract IMooniswapFactoryGovernance" + } + }, + "id": 3237, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "defaults", + "nodeType": "MemberAccess", + "referencedDeclaration": 4591, + "src": "7033:36:10", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "function () view external returns (uint256,uint256,uint256)" + } + }, + "id": 3238, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7033:38:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "6954:117:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3241, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3218, + "src": "7100:6:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper memory" + } + }, + { + "argumentTypes": null, + "id": 3242, + "name": "defaultFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3231, + "src": "7108:10:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3243, + "name": "_emitFeeVoteUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3062, + "src": "7120:18:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + } + }, + { + "argumentTypes": null, + "id": 3244, + "name": "_fee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2604, + "src": "7140:4:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + }, + { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + ], + "id": 3240, + "name": "_updateOnTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3417, + "src": "7082:17:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_ParamsHelper_$3279_memory_ptr_$_t_uint256_$_t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$_$_t_struct$_Data_$4668_storage_ptr_$returns$__$", + "typeString": "function (struct MooniswapGovernance.ParamsHelper memory,uint256,function (address,uint256,bool,uint256),struct LiquidVoting.Data storage pointer)" + } + }, + "id": 3245, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7082:63:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3246, + "nodeType": "ExpressionStatement", + "src": "7082:63:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3248, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3218, + "src": "7173:6:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper memory" + } + }, + { + "argumentTypes": null, + "id": 3249, + "name": "defaultSlippageFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3233, + "src": "7181:18:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3250, + "name": "_emitSlippageFeeVoteUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3081, + "src": "7201:26:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + } + }, + { + "argumentTypes": null, + "id": 3251, + "name": "_slippageFee", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2606, + "src": "7229:12:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + }, + { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + ], + "id": 3247, + "name": "_updateOnTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3417, + "src": "7155:17:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_ParamsHelper_$3279_memory_ptr_$_t_uint256_$_t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$_$_t_struct$_Data_$4668_storage_ptr_$returns$__$", + "typeString": "function (struct MooniswapGovernance.ParamsHelper memory,uint256,function (address,uint256,bool,uint256),struct LiquidVoting.Data storage pointer)" + } + }, + "id": 3252, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7155:87:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3253, + "nodeType": "ExpressionStatement", + "src": "7155:87:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3255, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3218, + "src": "7270:6:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper memory" + } + }, + { + "argumentTypes": null, + "id": 3256, + "name": "defaultDecayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3235, + "src": "7278:18:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3257, + "name": "_emitDecayPeriodVoteUpdate", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3100, + "src": "7298:26:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + } + }, + { + "argumentTypes": null, + "id": 3258, + "name": "_decayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2608, + "src": "7326:12:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + }, + { + "typeIdentifier": "t_struct$_Data_$4668_storage", + "typeString": "struct LiquidVoting.Data storage ref" + } + ], + "id": 3254, + "name": "_updateOnTransfer", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3417, + "src": "7252:17:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_ParamsHelper_$3279_memory_ptr_$_t_uint256_$_t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$_$_t_struct$_Data_$4668_storage_ptr_$returns$__$", + "typeString": "function (struct MooniswapGovernance.ParamsHelper memory,uint256,function (address,uint256,bool,uint256),struct LiquidVoting.Data storage pointer)" + } + }, + "id": 3259, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7252:87:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3260, + "nodeType": "ExpressionStatement", + "src": "7252:87:10" + } + ] + }, + "documentation": null, + "id": 3262, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_beforeTokenTransfer", + "nodeType": "FunctionDefinition", + "overrides": { + "id": 3108, + "nodeType": "OverrideSpecifier", + "overrides": [], + "src": "5807:8:10" + }, + "parameters": { + "id": 3107, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3102, + "mutability": "mutable", + "name": "from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3262, + "src": "5756:12:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3101, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5756:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3104, + "mutability": "mutable", + "name": "to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3262, + "src": "5770:10:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3103, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5770:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3106, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3262, + "src": "5782:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3105, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5782:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5755:42:10" + }, + "returnParameters": { + "id": 3109, + "nodeType": "ParameterList", + "parameters": [], + "src": "5816:0:10" + }, + "scope": 3418, + "src": "5726:1620:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "canonicalName": "MooniswapGovernance.ParamsHelper", + "id": 3279, + "members": [ + { + "constant": false, + "id": 3264, + "mutability": "mutable", + "name": "from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3279, + "src": "7382:12:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3263, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7382:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3266, + "mutability": "mutable", + "name": "to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3279, + "src": "7404:10:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3265, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7404:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3268, + "mutability": "mutable", + "name": "updateFrom", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3279, + "src": "7424:15:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3267, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7424:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3270, + "mutability": "mutable", + "name": "updateTo", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3279, + "src": "7449:13:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3269, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7449:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3272, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3279, + "src": "7472:14:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3271, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7472:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3274, + "mutability": "mutable", + "name": "balanceFrom", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3279, + "src": "7496:19:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3273, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7496:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3276, + "mutability": "mutable", + "name": "balanceTo", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3279, + "src": "7525:17:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3275, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7525:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3278, + "mutability": "mutable", + "name": "newTotalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3279, + "src": "7552:22:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3277, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7552:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "ParamsHelper", + "nodeType": "StructDefinition", + "scope": 3418, + "src": "7352:229:10", + "visibility": "public" + }, + { + "body": { + "id": 3416, + "nodeType": "Block", + "src": "7810:892:10", + "statements": [ + { + "assignments": [ + 3303 + ], + "declarations": [ + { + "constant": false, + "id": 3303, + "mutability": "mutable", + "name": "voteFrom", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3416, + "src": "7820:25:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data" + }, + "typeName": { + "contractScope": null, + "id": 3302, + "name": "Vote.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5389, + "src": "7820:9:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_storage_ptr", + "typeString": "struct Vote.Data" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3309, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3304, + "name": "votingData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3297, + "src": "7848:10:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage_ptr", + "typeString": "struct LiquidVoting.Data storage pointer" + } + }, + "id": 3305, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4667, + "src": "7848:16:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Data_$5389_storage_$", + "typeString": "mapping(address => struct Vote.Data storage ref)" + } + }, + "id": 3308, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3306, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3281, + "src": "7865:6:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper memory" + } + }, + "id": 3307, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "from", + "nodeType": "MemberAccess", + "referencedDeclaration": 3264, + "src": "7865:11:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7848:29:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_storage", + "typeString": "struct Vote.Data storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7820:57:10" + }, + { + "assignments": [ + 3313 + ], + "declarations": [ + { + "constant": false, + "id": 3313, + "mutability": "mutable", + "name": "voteTo", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3416, + "src": "7887:23:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data" + }, + "typeName": { + "contractScope": null, + "id": 3312, + "name": "Vote.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5389, + "src": "7887:9:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_storage_ptr", + "typeString": "struct Vote.Data" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3319, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3314, + "name": "votingData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3297, + "src": "7913:10:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage_ptr", + "typeString": "struct LiquidVoting.Data storage pointer" + } + }, + "id": 3315, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4667, + "src": "7913:16:10", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Data_$5389_storage_$", + "typeString": "mapping(address => struct Vote.Data storage ref)" + } + }, + "id": 3318, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3316, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3281, + "src": "7930:6:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper memory" + } + }, + "id": 3317, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "to", + "nodeType": "MemberAccess", + "referencedDeclaration": 3266, + "src": "7930:9:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7913:27:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_storage", + "typeString": "struct Vote.Data storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "7887:53:10" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 3320, + "name": "voteFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3303, + "src": "7955:8:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + "id": 3321, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isDefault", + "nodeType": "MemberAccess", + "referencedDeclaration": 5444, + "src": "7955:18:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_struct$_Data_$5389_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$5389_memory_ptr_$", + "typeString": "function (struct Vote.Data memory) pure returns (bool)" + } + }, + "id": 3322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7955:20:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 3323, + "name": "voteTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3313, + "src": "7979:6:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + "id": 3324, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isDefault", + "nodeType": "MemberAccess", + "referencedDeclaration": 5444, + "src": "7979:16:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_struct$_Data_$5389_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$5389_memory_ptr_$", + "typeString": "function (struct Vote.Data memory) pure returns (bool)" + } + }, + "id": 3325, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7979:18:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7955:42:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3327, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3281, + "src": "8001:6:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper memory" + } + }, + "id": 3328, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "updateFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 3268, + "src": "8001:17:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7955:63:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3330, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3281, + "src": "8022:6:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper memory" + } + }, + "id": 3331, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "updateTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 3270, + "src": "8022:15:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7955:82:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3367, + "nodeType": "IfStatement", + "src": "7951:331:10", + "trueBody": { + "id": 3366, + "nodeType": "Block", + "src": "8039:243:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3334, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3281, + "src": "8063:6:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper memory" + } + }, + "id": 3335, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "from", + "nodeType": "MemberAccess", + "referencedDeclaration": 3264, + "src": "8063:11:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3338, + "name": "defaultValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3283, + "src": "8089:12:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3336, + "name": "voteFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3303, + "src": "8076:8:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + "id": 3337, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "get", + "nodeType": "MemberAccess", + "referencedDeclaration": 5467, + "src": "8076:12:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_struct$_Data_$5389_memory_ptr_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_Data_$5389_memory_ptr_$", + "typeString": "function (struct Vote.Data memory,uint256) pure returns (uint256)" + } + }, + "id": 3339, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8076:26:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3340, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8104:4:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3344, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3281, + "src": "8133:6:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper memory" + } + }, + "id": 3345, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "amount", + "nodeType": "MemberAccess", + "referencedDeclaration": 3272, + "src": "8133:13:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3341, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3281, + "src": "8110:6:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper memory" + } + }, + "id": 3342, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 3274, + "src": "8110:18:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1886, + "src": "8110:22:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8110:37:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3333, + "name": "emitEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3295, + "src": "8053:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + } + }, + "id": 3347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8053:95:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3348, + "nodeType": "ExpressionStatement", + "src": "8053:95:10" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3350, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3281, + "src": "8172:6:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper memory" + } + }, + "id": 3351, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "to", + "nodeType": "MemberAccess", + "referencedDeclaration": 3266, + "src": "8172:9:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3354, + "name": "defaultValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3283, + "src": "8194:12:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3352, + "name": "voteTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3313, + "src": "8183:6:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + "id": 3353, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "get", + "nodeType": "MemberAccess", + "referencedDeclaration": 5467, + "src": "8183:10:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_struct$_Data_$5389_memory_ptr_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_Data_$5389_memory_ptr_$", + "typeString": "function (struct Vote.Data memory,uint256) pure returns (uint256)" + } + }, + "id": 3355, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8183:24:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "hexValue": "74727565", + "id": 3356, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "8209:4:10", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3360, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3281, + "src": "8236:6:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper memory" + } + }, + "id": 3361, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "amount", + "nodeType": "MemberAccess", + "referencedDeclaration": 3272, + "src": "8236:13:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3357, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3281, + "src": "8215:6:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper memory" + } + }, + "id": 3358, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 3276, + "src": "8215:16:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3359, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1869, + "src": "8215:20:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3362, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8215:35:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3349, + "name": "emitEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3295, + "src": "8162:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + } + }, + "id": 3363, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8162:89:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3364, + "nodeType": "ExpressionStatement", + "src": "8162:89:10" + }, + { + "expression": null, + "functionReturnParameters": 3299, + "id": 3365, + "nodeType": "Return", + "src": "8265:7:10" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3368, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3281, + "src": "8296:6:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper memory" + } + }, + "id": 3369, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "updateFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 3268, + "src": "8296:17:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3391, + "nodeType": "IfStatement", + "src": "8292:202:10", + "trueBody": { + "id": 3390, + "nodeType": "Block", + "src": "8315:179:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3373, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3281, + "src": "8354:6:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper memory" + } + }, + "id": 3374, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "from", + "nodeType": "MemberAccess", + "referencedDeclaration": 3264, + "src": "8354:11:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3375, + "name": "voteFrom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3303, + "src": "8367:8:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3376, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3281, + "src": "8377:6:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper memory" + } + }, + "id": 3377, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 3274, + "src": "8377:18:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3381, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3281, + "src": "8420:6:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper memory" + } + }, + "id": 3382, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "amount", + "nodeType": "MemberAccess", + "referencedDeclaration": 3272, + "src": "8420:13:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3378, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3281, + "src": "8397:6:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper memory" + } + }, + "id": 3379, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 3274, + "src": "8397:18:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1886, + "src": "8397:22:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8397:37:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3384, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3281, + "src": "8436:6:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper memory" + } + }, + "id": 3385, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "newTotalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 3278, + "src": "8436:21:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3386, + "name": "defaultValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3283, + "src": "8459:12:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3387, + "name": "emitEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3295, + "src": "8473:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + } + ], + "expression": { + "argumentTypes": null, + "id": 3370, + "name": "votingData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3297, + "src": "8329:10:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage_ptr", + "typeString": "struct LiquidVoting.Data storage pointer" + } + }, + "id": 3372, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "updateBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 4759, + "src": "8329:24:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$4668_storage_ptr_$_t_address_$_t_struct$_Data_$5389_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$_$returns$__$bound_to$_t_struct$_Data_$4668_storage_ptr_$", + "typeString": "function (struct LiquidVoting.Data storage pointer,address,struct Vote.Data memory,uint256,uint256,uint256,uint256,function (address,uint256,bool,uint256))" + } + }, + "id": 3388, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8329:154:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3389, + "nodeType": "ExpressionStatement", + "src": "8329:154:10" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3392, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3281, + "src": "8508:6:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper memory" + } + }, + "id": 3393, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "updateTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 3270, + "src": "8508:15:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3415, + "nodeType": "IfStatement", + "src": "8504:192:10", + "trueBody": { + "id": 3414, + "nodeType": "Block", + "src": "8525:171:10", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3397, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3281, + "src": "8564:6:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper memory" + } + }, + "id": 3398, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "to", + "nodeType": "MemberAccess", + "referencedDeclaration": 3266, + "src": "8564:9:10", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3399, + "name": "voteTo", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3313, + "src": "8575:6:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3400, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3281, + "src": "8583:6:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper memory" + } + }, + "id": 3401, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 3276, + "src": "8583:16:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3405, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3281, + "src": "8622:6:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper memory" + } + }, + "id": 3406, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "amount", + "nodeType": "MemberAccess", + "referencedDeclaration": 3272, + "src": "8622:13:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3402, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3281, + "src": "8601:6:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper memory" + } + }, + "id": 3403, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceTo", + "nodeType": "MemberAccess", + "referencedDeclaration": 3276, + "src": "8601:16:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3404, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1869, + "src": "8601:20:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3407, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8601:35:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3408, + "name": "params", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3281, + "src": "8638:6:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper memory" + } + }, + "id": 3409, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "newTotalSupply", + "nodeType": "MemberAccess", + "referencedDeclaration": 3278, + "src": "8638:21:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3410, + "name": "defaultValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3283, + "src": "8661:12:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 3411, + "name": "emitEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3295, + "src": "8675:9:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + } + ], + "expression": { + "argumentTypes": null, + "id": 3394, + "name": "votingData", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3297, + "src": "8539:10:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage_ptr", + "typeString": "struct LiquidVoting.Data storage pointer" + } + }, + "id": 3396, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "updateBalance", + "nodeType": "MemberAccess", + "referencedDeclaration": 4759, + "src": "8539:24:10", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$4668_storage_ptr_$_t_address_$_t_struct$_Data_$5389_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$_$returns$__$bound_to$_t_struct$_Data_$4668_storage_ptr_$", + "typeString": "function (struct LiquidVoting.Data storage pointer,address,struct Vote.Data memory,uint256,uint256,uint256,uint256,function (address,uint256,bool,uint256))" + } + }, + "id": 3412, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8539:146:10", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3413, + "nodeType": "ExpressionStatement", + "src": "8539:146:10" + } + ] + } + } + ] + }, + "documentation": null, + "id": 3417, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_updateOnTransfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3298, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3281, + "mutability": "mutable", + "name": "params", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3417, + "src": "7623:26:10", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_memory_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper" + }, + "typeName": { + "contractScope": null, + "id": 3280, + "name": "ParamsHelper", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3279, + "src": "7623:12:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_ParamsHelper_$3279_storage_ptr", + "typeString": "struct MooniswapGovernance.ParamsHelper" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3283, + "mutability": "mutable", + "name": "defaultValue", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3417, + "src": "7659:20:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3282, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7659:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3295, + "mutability": "mutable", + "name": "emitEvent", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3417, + "src": "7689:60:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + }, + "typeName": { + "id": 3294, + "nodeType": "FunctionTypeName", + "parameterTypes": { + "id": 3292, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3285, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3294, + "src": "7698:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3284, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "7698:7:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3287, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3294, + "src": "7707:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3286, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7707:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3289, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3294, + "src": "7716:4:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3288, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "7716:4:10", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3291, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3294, + "src": "7722:7:10", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3290, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7722:7:10", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7697:33:10" + }, + "returnParameterTypes": { + "id": 3293, + "nodeType": "ParameterList", + "parameters": [], + "src": "7740:0:10" + }, + "src": "7689:60:10", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + }, + "visibility": "internal" + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3297, + "mutability": "mutable", + "name": "votingData", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3417, + "src": "7759:36:10", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage_ptr", + "typeString": "struct LiquidVoting.Data" + }, + "typeName": { + "contractScope": null, + "id": 3296, + "name": "LiquidVoting.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4668, + "src": "7759:17:10", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage_ptr", + "typeString": "struct LiquidVoting.Data" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7613:188:10" + }, + "returnParameters": { + "id": 3299, + "nodeType": "ParameterList", + "parameters": [], + "src": "7810:0:10" + }, + "scope": 3418, + "src": "7587:1115:10", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + } + ], + "scope": 3419, + "src": "407:8297:10" + } + ], + "src": "33:8672:10" + }, + "id": 10 + }, + "Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IFeeCollector.sol": { + "ast": { + "absolutePath": "Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IFeeCollector.sol", + "exportedSymbols": { + "IFeeCollector": [ + 3437 + ] + }, + "id": 3438, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 3420, + "literals": [ + "solidity", + "^", + "0.6", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "33:23:11" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 3437, + "linearizedBaseContracts": [ + 3437 + ], + "name": "IFeeCollector", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "1a399125", + "id": 3427, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "updateReward", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3425, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3422, + "mutability": "mutable", + "name": "receiver", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3427, + "src": "111:16:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3421, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "111:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3424, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3427, + "src": "129:14:11", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3423, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "129:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "110:34:11" + }, + "returnParameters": { + "id": 3426, + "nodeType": "ParameterList", + "parameters": [], + "src": "153:0:11" + }, + "scope": 3437, + "src": "89:65:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "0931753c", + "id": 3436, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "updateRewards", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3434, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3430, + "mutability": "mutable", + "name": "receivers", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3436, + "src": "182:28:11", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 3428, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "182:7:11", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3429, + "length": null, + "nodeType": "ArrayTypeName", + "src": "182:9:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3433, + "mutability": "mutable", + "name": "amounts", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3436, + "src": "212:26:11", + "stateVariable": false, + "storageLocation": "calldata", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr", + "typeString": "uint256[]" + }, + "typeName": { + "baseType": { + "id": 3431, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "212:7:11", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3432, + "length": null, + "nodeType": "ArrayTypeName", + "src": "212:9:11", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", + "typeString": "uint256[]" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "181:58:11" + }, + "returnParameters": { + "id": 3435, + "nodeType": "ParameterList", + "parameters": [], + "src": "248:0:11" + }, + "scope": 3437, + "src": "159:90:11", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "external" + } + ], + "scope": 3438, + "src": "59:192:11" + } + ], + "src": "33:219:11" + }, + "id": 11 + }, + "Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IMooniswapFactoryGovernance.sol": { + "ast": { + "absolutePath": "Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IMooniswapFactoryGovernance.sol", + "exportedSymbols": { + "IMooniswapFactoryGovernance": [ + 4639 + ] + }, + "id": 4640, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4571, + "literals": [ + "solidity", + "^", + "0.6", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "33:23:12" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "interface", + "documentation": null, + "fullyImplemented": false, + "id": 4639, + "linearizedBaseContracts": [ + 4639 + ], + "name": "IMooniswapFactoryGovernance", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "functionSelector": "172886e7", + "id": 4582, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "shareParameters", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4572, + "nodeType": "ParameterList", + "parameters": [], + "src": "127:2:12" + }, + "returnParameters": { + "id": 4581, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4574, + "mutability": "mutable", + "name": "referralShare", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4582, + "src": "152:21:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4573, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "152:7:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4576, + "mutability": "mutable", + "name": "governanceShare", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4582, + "src": "175:23:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4575, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "175:7:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4578, + "mutability": "mutable", + "name": "governanceWallet", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4582, + "src": "200:24:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4577, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "200:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4580, + "mutability": "mutable", + "name": "referralFeeReceiver", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4582, + "src": "226:27:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4579, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "226:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "151:103:12" + }, + "scope": 4639, + "src": "103:152:12", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "edb7a6fa", + "id": 4591, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "defaults", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4583, + "nodeType": "ParameterList", + "parameters": [], + "src": "277:2:12" + }, + "returnParameters": { + "id": 4590, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4585, + "mutability": "mutable", + "name": "defaultFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4591, + "src": "302:18:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4584, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "302:7:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4587, + "mutability": "mutable", + "name": "defaultSlippageFee", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4591, + "src": "322:26:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4586, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "322:7:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4589, + "mutability": "mutable", + "name": "defaultDecayPeriod", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4591, + "src": "350:26:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4588, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "350:7:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "301:76:12" + }, + "scope": 4639, + "src": "260:118:12", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "5a6c72d0", + "id": 4596, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "defaultFee", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4592, + "nodeType": "ParameterList", + "parameters": [], + "src": "403:2:12" + }, + "returnParameters": { + "id": 4595, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4594, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4596, + "src": "428:7:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4593, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "428:7:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "427:9:12" + }, + "scope": 4639, + "src": "384:53:12", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "23662bb9", + "id": 4601, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "defaultSlippageFee", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4597, + "nodeType": "ParameterList", + "parameters": [], + "src": "469:2:12" + }, + "returnParameters": { + "id": 4600, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4599, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4601, + "src": "494:7:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4598, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "494:7:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "493:9:12" + }, + "scope": 4639, + "src": "442:61:12", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "1845f0db", + "id": 4606, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "defaultDecayPeriod", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4602, + "nodeType": "ParameterList", + "parameters": [], + "src": "535:2:12" + }, + "returnParameters": { + "id": 4605, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4604, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4606, + "src": "560:7:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4603, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "560:7:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "559:9:12" + }, + "scope": 4639, + "src": "508:61:12", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "e859e56c", + "id": 4611, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "referralShare", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4607, + "nodeType": "ParameterList", + "parameters": [], + "src": "596:2:12" + }, + "returnParameters": { + "id": 4610, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4609, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4611, + "src": "621:7:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4608, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "621:7:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "620:9:12" + }, + "scope": 4639, + "src": "574:56:12", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "f3830335", + "id": 4616, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "governanceShare", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4612, + "nodeType": "ParameterList", + "parameters": [], + "src": "659:2:12" + }, + "returnParameters": { + "id": 4615, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4614, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4616, + "src": "684:7:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4613, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "684:7:12", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "683:9:12" + }, + "scope": 4639, + "src": "635:58:12", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "70989330", + "id": 4621, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "governanceWallet", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4617, + "nodeType": "ParameterList", + "parameters": [], + "src": "723:2:12" + }, + "returnParameters": { + "id": 4620, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4619, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4621, + "src": "748:7:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4618, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "748:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "747:9:12" + }, + "scope": 4639, + "src": "698:59:12", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "c415b95c", + "id": 4626, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "feeCollector", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4622, + "nodeType": "ParameterList", + "parameters": [], + "src": "783:2:12" + }, + "returnParameters": { + "id": 4625, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4624, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4626, + "src": "808:7:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4623, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "808:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "807:9:12" + }, + "scope": 4639, + "src": "762:55:12", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "3b90b9bf", + "id": 4633, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isFeeCollector", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4629, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4628, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4633, + "src": "847:7:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4627, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "847:7:12", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "846:9:12" + }, + "returnParameters": { + "id": 4632, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4631, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4633, + "src": "878:4:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4630, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "878:4:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "877:6:12" + }, + "scope": 4639, + "src": "823:61:12", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + }, + { + "body": null, + "documentation": null, + "functionSelector": "22f3e2d4", + "id": 4638, + "implemented": false, + "kind": "function", + "modifiers": [], + "name": "isActive", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4634, + "nodeType": "ParameterList", + "parameters": [], + "src": "906:2:12" + }, + "returnParameters": { + "id": 4637, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4636, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4638, + "src": "932:4:12", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4635, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "932:4:12", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "931:6:12" + }, + "scope": 4639, + "src": "889:49:12", + "stateMutability": "view", + "virtual": false, + "visibility": "external" + } + ], + "scope": 4640, + "src": "59:881:12" + } + ], + "src": "33:908:12" + }, + "id": 12 + }, + "Users/k06a/Projects/mooniswap-v2/contracts/libraries/LiquidVoting.sol": { + "ast": { + "absolutePath": "Users/k06a/Projects/mooniswap-v2/contracts/libraries/LiquidVoting.sol", + "exportedSymbols": { + "LiquidVoting": [ + 4973 + ] + }, + "id": 4974, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4641, + "literals": [ + "solidity", + "^", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "33:24:13" + }, + { + "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "file": "@openzeppelin/contracts/math/SafeMath.sol", + "id": 4642, + "nodeType": "ImportDirective", + "scope": 4974, + "sourceUnit": 2037, + "src": "59:51:13", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "Users/k06a/Projects/mooniswap-v2/contracts/libraries/SafeCast.sol", + "file": "./SafeCast.sol", + "id": 4643, + "nodeType": "ImportDirective", + "scope": 4974, + "sourceUnit": 5104, + "src": "111:24:13", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "Users/k06a/Projects/mooniswap-v2/contracts/libraries/VirtualVote.sol", + "file": "./VirtualVote.sol", + "id": 4644, + "nodeType": "ImportDirective", + "scope": 4974, + "sourceUnit": 5385, + "src": "136:27:13", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "Users/k06a/Projects/mooniswap-v2/contracts/libraries/Vote.sol", + "file": "./Vote.sol", + "id": 4645, + "nodeType": "ImportDirective", + "scope": 4974, + "sourceUnit": 5497, + "src": "164:20:13", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": null, + "fullyImplemented": true, + "id": 4973, + "linearizedBaseContracts": [ + 4973 + ], + "name": "LiquidVoting", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 4648, + "libraryName": { + "contractScope": null, + "id": 4646, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2036, + "src": "220:8:13", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$2036", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "214:27:13", + "typeName": { + "id": 4647, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "233:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "id": 4651, + "libraryName": { + "contractScope": null, + "id": 4649, + "name": "SafeCast", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5103, + "src": "252:8:13", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeCast_$5103", + "typeString": "library SafeCast" + } + }, + "nodeType": "UsingForDirective", + "src": "246:27:13", + "typeName": { + "id": 4650, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "265:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "id": 4654, + "libraryName": { + "contractScope": null, + "id": 4652, + "name": "Vote", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5496, + "src": "284:4:13", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Vote_$5496", + "typeString": "library Vote" + } + }, + "nodeType": "UsingForDirective", + "src": "278:25:13", + "typeName": { + "contractScope": null, + "id": 4653, + "name": "Vote.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5389, + "src": "293:9:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_storage_ptr", + "typeString": "struct Vote.Data" + } + } + }, + { + "id": 4657, + "libraryName": { + "contractScope": null, + "id": 4655, + "name": "VirtualVote", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5384, + "src": "314:11:13", + "typeDescriptions": { + "typeIdentifier": "t_contract$_VirtualVote_$5384", + "typeString": "library VirtualVote" + } + }, + "nodeType": "UsingForDirective", + "src": "308:39:13", + "typeName": { + "contractScope": null, + "id": 4656, + "name": "VirtualVote.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5333, + "src": "330:16:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_storage_ptr", + "typeString": "struct VirtualVote.Data" + } + } + }, + { + "canonicalName": "LiquidVoting.Data", + "id": 4668, + "members": [ + { + "constant": false, + "id": 4659, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4668, + "src": "375:21:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_storage_ptr", + "typeString": "struct VirtualVote.Data" + }, + "typeName": { + "contractScope": null, + "id": 4658, + "name": "VirtualVote.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5333, + "src": "375:16:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_storage_ptr", + "typeString": "struct VirtualVote.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4661, + "mutability": "mutable", + "name": "_weightedSum", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4668, + "src": "406:20:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4660, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "406:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4663, + "mutability": "mutable", + "name": "_defaultVotes", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4668, + "src": "436:21:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4662, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "436:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4667, + "mutability": "mutable", + "name": "votes", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4668, + "src": "467:35:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Data_$5389_storage_$", + "typeString": "mapping(address => struct Vote.Data)" + }, + "typeName": { + "id": 4666, + "keyType": { + "id": 4664, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "475:7:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "467:29:13", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Data_$5389_storage_$", + "typeString": "mapping(address => struct Vote.Data)" + }, + "valueType": { + "contractScope": null, + "id": 4665, + "name": "Vote.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5389, + "src": "486:9:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_storage_ptr", + "typeString": "struct Vote.Data" + } + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Data", + "nodeType": "StructDefinition", + "scope": 4973, + "src": "353:156:13", + "visibility": "public" + }, + { + "body": { + "id": 4709, + "nodeType": "Block", + "src": "824:116:13", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4698, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4670, + "src": "849:4:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage_ptr", + "typeString": "struct LiquidVoting.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4699, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4672, + "src": "855:4:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4700, + "name": "oldVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4674, + "src": "861:7:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + { + "argumentTypes": null, + "id": 4701, + "name": "newVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4676, + "src": "870:7:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + { + "argumentTypes": null, + "id": 4702, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4678, + "src": "879:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4703, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4678, + "src": "888:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4704, + "name": "totalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4680, + "src": "897:11:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4705, + "name": "defaultVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4682, + "src": "910:11:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4706, + "name": "emitEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4694, + "src": "923:9:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$4668_storage_ptr", + "typeString": "struct LiquidVoting.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + }, + { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + } + ], + "id": 4697, + "name": "_update", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4972, + "src": "841:7:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$4668_storage_ptr_$_t_address_$_t_struct$_Data_$5389_memory_ptr_$_t_struct$_Data_$5389_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$_$returns$__$", + "typeString": "function (struct LiquidVoting.Data storage pointer,address,struct Vote.Data memory,struct Vote.Data memory,uint256,uint256,uint256,uint256,function (address,uint256,bool,uint256))" + } + }, + "id": 4707, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "841:92:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "functionReturnParameters": 4696, + "id": 4708, + "nodeType": "Return", + "src": "834:99:13" + } + ] + }, + "documentation": null, + "id": 4710, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "updateVote", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4695, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4670, + "mutability": "mutable", + "name": "self", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4710, + "src": "544:30:13", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage_ptr", + "typeString": "struct LiquidVoting.Data" + }, + "typeName": { + "contractScope": null, + "id": 4669, + "name": "LiquidVoting.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4668, + "src": "544:17:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage_ptr", + "typeString": "struct LiquidVoting.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4672, + "mutability": "mutable", + "name": "user", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4710, + "src": "584:12:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4671, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "584:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4674, + "mutability": "mutable", + "name": "oldVote", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4710, + "src": "606:24:13", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data" + }, + "typeName": { + "contractScope": null, + "id": 4673, + "name": "Vote.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5389, + "src": "606:9:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_storage_ptr", + "typeString": "struct Vote.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4676, + "mutability": "mutable", + "name": "newVote", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4710, + "src": "640:24:13", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data" + }, + "typeName": { + "contractScope": null, + "id": 4675, + "name": "Vote.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5389, + "src": "640:9:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_storage_ptr", + "typeString": "struct Vote.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4678, + "mutability": "mutable", + "name": "balance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4710, + "src": "674:15:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4677, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "674:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4680, + "mutability": "mutable", + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4710, + "src": "699:19:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4679, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "699:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4682, + "mutability": "mutable", + "name": "defaultVote", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4710, + "src": "728:19:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4681, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "728:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4694, + "mutability": "mutable", + "name": "emitEvent", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4710, + "src": "757:51:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + }, + "typeName": { + "id": 4693, + "nodeType": "FunctionTypeName", + "parameterTypes": { + "id": 4691, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4684, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4693, + "src": "766:7:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4683, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "766:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4686, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4693, + "src": "775:7:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4685, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "775:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4688, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4693, + "src": "784:4:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4687, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "784:4:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4690, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4693, + "src": "790:7:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4689, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "790:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "765:33:13" + }, + "returnParameterTypes": { + "id": 4692, + "nodeType": "ParameterList", + "parameters": [], + "src": "799:0:13" + }, + "src": "757:51:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + }, + "visibility": "internal" + }, + "value": null, + "visibility": "internal" + } + ], + "src": "534:280:13" + }, + "returnParameters": { + "id": 4696, + "nodeType": "ParameterList", + "parameters": [], + "src": "824:0:13" + }, + "scope": 4973, + "src": "515:425:13", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4758, + "nodeType": "Block", + "src": "1258:157:13", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4740, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4712, + "src": "1283:4:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage_ptr", + "typeString": "struct LiquidVoting.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4741, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4714, + "src": "1289:4:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 4742, + "name": "oldVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4716, + "src": "1295:7:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4745, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4743, + "name": "newBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4720, + "src": "1304:10:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 4744, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1318:1:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1304:15:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "id": 4749, + "name": "oldVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4716, + "src": "1336:7:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + "id": 4750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "1304:39:13", + "trueExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 4746, + "name": "Vote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5496, + "src": "1322:4:13", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Vote_$5496_$", + "typeString": "type(library Vote)" + } + }, + "id": 4747, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "init", + "nodeType": "MemberAccess", + "referencedDeclaration": 5416, + "src": "1322:9:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$__$returns$_t_struct$_Data_$5389_memory_ptr_$", + "typeString": "function () pure returns (struct Vote.Data memory)" + } + }, + "id": 4748, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1322:11:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + { + "argumentTypes": null, + "id": 4751, + "name": "oldBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4718, + "src": "1345:10:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4752, + "name": "newBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4720, + "src": "1357:10:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4753, + "name": "newTotalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4722, + "src": "1369:14:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4754, + "name": "defaultVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4724, + "src": "1385:11:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4755, + "name": "emitEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4736, + "src": "1398:9:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$4668_storage_ptr", + "typeString": "struct LiquidVoting.Data storage pointer" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + }, + { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + } + ], + "id": 4739, + "name": "_update", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4972, + "src": "1275:7:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$4668_storage_ptr_$_t_address_$_t_struct$_Data_$5389_memory_ptr_$_t_struct$_Data_$5389_memory_ptr_$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$_$returns$__$", + "typeString": "function (struct LiquidVoting.Data storage pointer,address,struct Vote.Data memory,struct Vote.Data memory,uint256,uint256,uint256,uint256,function (address,uint256,bool,uint256))" + } + }, + "id": 4756, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1275:133:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "functionReturnParameters": 4738, + "id": 4757, + "nodeType": "Return", + "src": "1268:140:13" + } + ] + }, + "documentation": null, + "id": 4759, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "updateBalance", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4737, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4712, + "mutability": "mutable", + "name": "self", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4759, + "src": "978:30:13", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage_ptr", + "typeString": "struct LiquidVoting.Data" + }, + "typeName": { + "contractScope": null, + "id": 4711, + "name": "LiquidVoting.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4668, + "src": "978:17:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage_ptr", + "typeString": "struct LiquidVoting.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4714, + "mutability": "mutable", + "name": "user", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4759, + "src": "1018:12:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4713, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1018:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4716, + "mutability": "mutable", + "name": "oldVote", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4759, + "src": "1040:24:13", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data" + }, + "typeName": { + "contractScope": null, + "id": 4715, + "name": "Vote.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5389, + "src": "1040:9:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_storage_ptr", + "typeString": "struct Vote.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4718, + "mutability": "mutable", + "name": "oldBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4759, + "src": "1074:18:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4717, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1074:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4720, + "mutability": "mutable", + "name": "newBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4759, + "src": "1102:18:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4719, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1102:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4722, + "mutability": "mutable", + "name": "newTotalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4759, + "src": "1130:22:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4721, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1130:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4724, + "mutability": "mutable", + "name": "defaultVote", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4759, + "src": "1162:19:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4723, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1162:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4736, + "mutability": "mutable", + "name": "emitEvent", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4759, + "src": "1191:51:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + }, + "typeName": { + "id": 4735, + "nodeType": "FunctionTypeName", + "parameterTypes": { + "id": 4733, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4726, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4735, + "src": "1200:7:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4725, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1200:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4728, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4735, + "src": "1209:7:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4727, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1209:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4730, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4735, + "src": "1218:4:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4729, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1218:4:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4732, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4735, + "src": "1224:7:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4731, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1224:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1199:33:13" + }, + "returnParameterTypes": { + "id": 4734, + "nodeType": "ParameterList", + "parameters": [], + "src": "1233:0:13" + }, + "src": "1191:51:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + }, + "visibility": "internal" + }, + "value": null, + "visibility": "internal" + } + ], + "src": "968:280:13" + }, + "returnParameters": { + "id": 4738, + "nodeType": "ParameterList", + "parameters": [], + "src": "1258:0:13" + }, + "scope": 4973, + "src": "946:469:13", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4971, + "nodeType": "Block", + "src": "1760:1594:13", + "statements": [ + { + "assignments": [ + 4791 + ], + "declarations": [ + { + "constant": false, + "id": 4791, + "mutability": "mutable", + "name": "oldWeightedSum", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4971, + "src": "1770:22:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4790, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1770:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4794, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4792, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4761, + "src": "1795:4:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage_ptr", + "typeString": "struct LiquidVoting.Data storage pointer" + } + }, + "id": 4793, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_weightedSum", + "nodeType": "MemberAccess", + "referencedDeclaration": 4661, + "src": "1795:17:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1770:42:13" + }, + { + "assignments": [ + 4796 + ], + "declarations": [ + { + "constant": false, + "id": 4796, + "mutability": "mutable", + "name": "newWeightedSum", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4971, + "src": "1822:22:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4795, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1822:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4798, + "initialValue": { + "argumentTypes": null, + "id": 4797, + "name": "oldWeightedSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4791, + "src": "1847:14:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1822:39:13" + }, + { + "assignments": [ + 4800 + ], + "declarations": [ + { + "constant": false, + "id": 4800, + "mutability": "mutable", + "name": "oldDefaultVotes", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4971, + "src": "1871:23:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4799, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1871:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4803, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4801, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4761, + "src": "1897:4:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage_ptr", + "typeString": "struct LiquidVoting.Data storage pointer" + } + }, + "id": 4802, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "_defaultVotes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4663, + "src": "1897:18:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1871:44:13" + }, + { + "assignments": [ + 4805 + ], + "declarations": [ + { + "constant": false, + "id": 4805, + "mutability": "mutable", + "name": "newDefaultVotes", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4971, + "src": "1925:23:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4804, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1925:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4807, + "initialValue": { + "argumentTypes": null, + "id": 4806, + "name": "oldDefaultVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4800, + "src": "1951:15:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1925:41:13" + }, + { + "condition": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 4808, + "name": "oldVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4765, + "src": "1981:7:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + "id": 4809, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isDefault", + "nodeType": "MemberAccess", + "referencedDeclaration": 5444, + "src": "1981:17:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_struct$_Data_$5389_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$5389_memory_ptr_$", + "typeString": "function (struct Vote.Data memory) pure returns (bool)" + } + }, + "id": 4810, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1981:19:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 4832, + "nodeType": "Block", + "src": "2082:102:13", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 4819, + "name": "newWeightedSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4796, + "src": "2096:14:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4826, + "name": "defaultVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4775, + "src": "2159:11:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4824, + "name": "oldVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4765, + "src": "2147:7:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + "id": 4825, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "get", + "nodeType": "MemberAccess", + "referencedDeclaration": 5467, + "src": "2147:11:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_struct$_Data_$5389_memory_ptr_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_Data_$5389_memory_ptr_$", + "typeString": "function (struct Vote.Data memory,uint256) pure returns (uint256)" + } + }, + "id": 4827, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2147:24:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4822, + "name": "oldBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4769, + "src": "2132:10:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4823, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1949, + "src": "2132:14:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2132:40:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4820, + "name": "newWeightedSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4796, + "src": "2113:14:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4821, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1886, + "src": "2113:18:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4829, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2113:60:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2096:77:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4831, + "nodeType": "ExpressionStatement", + "src": "2096:77:13" + } + ] + }, + "id": 4833, + "nodeType": "IfStatement", + "src": "1977:207:13", + "trueBody": { + "id": 4818, + "nodeType": "Block", + "src": "2002:74:13", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4816, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 4811, + "name": "newDefaultVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4805, + "src": "2016:15:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4814, + "name": "oldBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4769, + "src": "2054:10:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4812, + "name": "newDefaultVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4805, + "src": "2034:15:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1886, + "src": "2034:19:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4815, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2034:31:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2016:49:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4817, + "nodeType": "ExpressionStatement", + "src": "2016:49:13" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 4834, + "name": "newVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4767, + "src": "2198:7:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + "id": 4835, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isDefault", + "nodeType": "MemberAccess", + "referencedDeclaration": 5444, + "src": "2198:17:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_struct$_Data_$5389_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$5389_memory_ptr_$", + "typeString": "function (struct Vote.Data memory) pure returns (bool)" + } + }, + "id": 4836, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2198:19:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 4858, + "nodeType": "Block", + "src": "2299:102:13", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4856, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 4845, + "name": "newWeightedSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4796, + "src": "2313:14:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4852, + "name": "defaultVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4775, + "src": "2376:11:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4850, + "name": "newVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4767, + "src": "2364:7:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + "id": 4851, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "get", + "nodeType": "MemberAccess", + "referencedDeclaration": 5467, + "src": "2364:11:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_struct$_Data_$5389_memory_ptr_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_Data_$5389_memory_ptr_$", + "typeString": "function (struct Vote.Data memory,uint256) pure returns (uint256)" + } + }, + "id": 4853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2364:24:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4848, + "name": "newBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4771, + "src": "2349:10:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4849, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1949, + "src": "2349:14:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4854, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2349:40:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4846, + "name": "newWeightedSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4796, + "src": "2330:14:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4847, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1869, + "src": "2330:18:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4855, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2330:60:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2313:77:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4857, + "nodeType": "ExpressionStatement", + "src": "2313:77:13" + } + ] + }, + "id": 4859, + "nodeType": "IfStatement", + "src": "2194:207:13", + "trueBody": { + "id": 4844, + "nodeType": "Block", + "src": "2219:74:13", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4842, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 4837, + "name": "newDefaultVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4805, + "src": "2233:15:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4840, + "name": "newBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4771, + "src": "2271:10:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4838, + "name": "newDefaultVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4805, + "src": "2251:15:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4839, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1869, + "src": "2251:19:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2251:31:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2233:49:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4843, + "nodeType": "ExpressionStatement", + "src": "2233:49:13" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4860, + "name": "newWeightedSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4796, + "src": "2415:14:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 4861, + "name": "oldWeightedSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4791, + "src": "2433:14:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2415:32:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 4870, + "nodeType": "IfStatement", + "src": "2411:97:13", + "trueBody": { + "id": 4869, + "nodeType": "Block", + "src": "2449:59:13", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4867, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4863, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4761, + "src": "2463:4:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage_ptr", + "typeString": "struct LiquidVoting.Data storage pointer" + } + }, + "id": 4865, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "_weightedSum", + "nodeType": "MemberAccess", + "referencedDeclaration": 4661, + "src": "2463:17:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 4866, + "name": "newWeightedSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4796, + "src": "2483:14:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2463:34:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4868, + "nodeType": "ExpressionStatement", + "src": "2463:34:13" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4873, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4871, + "name": "newDefaultVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4805, + "src": "2522:15:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 4872, + "name": "oldDefaultVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4800, + "src": "2541:15:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2522:34:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 4881, + "nodeType": "IfStatement", + "src": "2518:101:13", + "trueBody": { + "id": 4880, + "nodeType": "Block", + "src": "2558:61:13", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4874, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4761, + "src": "2572:4:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage_ptr", + "typeString": "struct LiquidVoting.Data storage pointer" + } + }, + "id": 4876, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "_defaultVotes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4663, + "src": "2572:18:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 4877, + "name": "newDefaultVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4805, + "src": "2593:15:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2572:36:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4879, + "nodeType": "ExpressionStatement", + "src": "2572:36:13" + } + ] + } + }, + { + "id": 4943, + "nodeType": "Block", + "src": "2629:547:13", + "statements": [ + { + "assignments": [ + 4883 + ], + "declarations": [ + { + "constant": false, + "id": 4883, + "mutability": "mutable", + "name": "newResult", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4943, + "src": "2643:17:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4882, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2643:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4899, + "initialValue": { + "argumentTypes": null, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4886, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4884, + "name": "newTotalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4773, + "src": "2663:14:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 4885, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2681:1:13", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2663:19:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4896, + "name": "newTotalSupply", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4773, + "src": "2756:14:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4892, + "name": "defaultVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4775, + "src": "2738:11:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4890, + "name": "newDefaultVotes", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4805, + "src": "2718:15:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1949, + "src": "2718:19:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2718:32:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4888, + "name": "newWeightedSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4796, + "src": "2699:14:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4889, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1869, + "src": "2699:18:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4894, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2699:52:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4895, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1966, + "src": "2699:56:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4897, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2699:72:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "Conditional", + "src": "2663:108:13", + "trueExpression": { + "argumentTypes": null, + "id": 4887, + "name": "defaultVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4775, + "src": "2685:11:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2643:128:13" + }, + { + "assignments": [ + 4903 + ], + "declarations": [ + { + "constant": false, + "id": 4903, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4943, + "src": "2785:28:13", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_memory_ptr", + "typeString": "struct VirtualVote.Data" + }, + "typeName": { + "contractScope": null, + "id": 4902, + "name": "VirtualVote.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5333, + "src": "2785:16:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_storage_ptr", + "typeString": "struct VirtualVote.Data" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4906, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4904, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4761, + "src": "2816:4:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage_ptr", + "typeString": "struct LiquidVoting.Data storage pointer" + } + }, + "id": 4905, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "data", + "nodeType": "MemberAccess", + "referencedDeclaration": 4659, + "src": "2816:9:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_storage", + "typeString": "struct VirtualVote.Data storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2785:40:13" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 4910, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 4907, + "name": "newResult", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4883, + "src": "2844:9:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4908, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4903, + "src": "2857:4:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_memory_ptr", + "typeString": "struct VirtualVote.Data memory" + } + }, + "id": 4909, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "result", + "nodeType": "MemberAccess", + "referencedDeclaration": 5330, + "src": "2857:11:13", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + "src": "2844:24:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 4942, + "nodeType": "IfStatement", + "src": "2840:326:13", + "trueBody": { + "id": 4941, + "nodeType": "Block", + "src": "2870:296:13", + "statements": [ + { + "assignments": [ + 4914 + ], + "declarations": [ + { + "constant": false, + "id": 4914, + "mutability": "mutable", + "name": "sdata", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4941, + "src": "2888:30:13", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_storage_ptr", + "typeString": "struct VirtualVote.Data" + }, + "typeName": { + "contractScope": null, + "id": 4913, + "name": "VirtualVote.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5333, + "src": "2888:16:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_storage_ptr", + "typeString": "struct VirtualVote.Data" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4917, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4915, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4761, + "src": "2921:4:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage_ptr", + "typeString": "struct LiquidVoting.Data storage pointer" + } + }, + "id": 4916, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "data", + "nodeType": "MemberAccess", + "referencedDeclaration": 4659, + "src": "2921:9:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_storage", + "typeString": "struct VirtualVote.Data storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2888:42:13" + }, + { + "expression": { + "argumentTypes": null, + "id": 4939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4918, + "name": "sdata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4914, + "src": "2949:5:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_storage_ptr", + "typeString": "struct VirtualVote.Data storage pointer" + } + }, + "id": 4920, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "oldResult", + "nodeType": "MemberAccess", + "referencedDeclaration": 5328, + "src": "2949:15:13", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4921, + "name": "sdata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4914, + "src": "2966:5:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_storage_ptr", + "typeString": "struct VirtualVote.Data storage pointer" + } + }, + "id": 4922, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "result", + "nodeType": "MemberAccess", + "referencedDeclaration": 5330, + "src": "2966:12:13", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4923, + "name": "sdata", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4914, + "src": "2980:5:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_storage_ptr", + "typeString": "struct VirtualVote.Data storage pointer" + } + }, + "id": 4924, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "time", + "nodeType": "MemberAccess", + "referencedDeclaration": 5332, + "src": "2980:10:13", + "typeDescriptions": { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + } + } + ], + "id": 4925, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "2948:43:13", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint104_$_t_uint104_$_t_uint48_$", + "typeString": "tuple(uint104,uint104,uint48)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 4926, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4903, + "src": "3016:4:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_memory_ptr", + "typeString": "struct VirtualVote.Data memory" + } + }, + "id": 4927, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "current", + "nodeType": "MemberAccess", + "referencedDeclaration": 5383, + "src": "3016:12:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$5333_memory_ptr_$returns$_t_uint256_$bound_to$_t_struct$_Data_$5333_memory_ptr_$", + "typeString": "function (struct VirtualVote.Data memory) view returns (uint256)" + } + }, + "id": 4928, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3016:14:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4929, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "toUint104", + "nodeType": "MemberAccess", + "referencedDeclaration": 5058, + "src": "3016:24:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint104_$bound_to$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint104)" + } + }, + "id": 4930, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3016:26:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 4931, + "name": "newResult", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4883, + "src": "3064:9:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "toUint104", + "nodeType": "MemberAccess", + "referencedDeclaration": 5058, + "src": "3064:19:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint104_$bound_to$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint104)" + } + }, + "id": 4933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3064:21:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4934, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "3107:5:13", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 4935, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3107:15:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "toUint48", + "nodeType": "MemberAccess", + "referencedDeclaration": 5080, + "src": "3107:24:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint48_$bound_to$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint48)" + } + }, + "id": 4937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3107:26:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + } + } + ], + "id": 4938, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2994:157:13", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint104_$_t_uint104_$_t_uint48_$", + "typeString": "tuple(uint104,uint104,uint48)" + } + }, + "src": "2948:203:13", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4940, + "nodeType": "ExpressionStatement", + "src": "2948:203:13" + } + ] + } + } + ] + }, + { + "condition": { + "argumentTypes": null, + "id": 4948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "3190:20:13", + "subExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4946, + "name": "oldVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4765, + "src": "3202:7:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + ], + "expression": { + "argumentTypes": null, + "id": 4944, + "name": "newVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4767, + "src": "3191:7:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + "id": 4945, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "eq", + "nodeType": "MemberAccess", + "referencedDeclaration": 5405, + "src": "3191:10:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_struct$_Data_$5389_memory_ptr_$_t_struct$_Data_$5389_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$5389_memory_ptr_$", + "typeString": "function (struct Vote.Data memory,struct Vote.Data memory) pure returns (bool)" + } + }, + "id": 4947, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3191:19:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 4958, + "nodeType": "IfStatement", + "src": "3186:77:13", + "trueBody": { + "id": 4957, + "nodeType": "Block", + "src": "3212:51:13", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4955, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4949, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4761, + "src": "3226:4:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage_ptr", + "typeString": "struct LiquidVoting.Data storage pointer" + } + }, + "id": 4952, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "votes", + "nodeType": "MemberAccess", + "referencedDeclaration": 4667, + "src": "3226:10:13", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Data_$5389_storage_$", + "typeString": "mapping(address => struct Vote.Data storage ref)" + } + }, + "id": 4953, + "indexExpression": { + "argumentTypes": null, + "id": 4951, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4763, + "src": "3237:4:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3226:16:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_storage", + "typeString": "struct Vote.Data storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 4954, + "name": "newVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4767, + "src": "3245:7:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + "src": "3226:26:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_storage", + "typeString": "struct Vote.Data storage ref" + } + }, + "id": 4956, + "nodeType": "ExpressionStatement", + "src": "3226:26:13" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4960, + "name": "user", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4763, + "src": "3283:4:13", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4963, + "name": "defaultVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4775, + "src": "3301:11:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4961, + "name": "newVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4767, + "src": "3289:7:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + "id": 4962, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "get", + "nodeType": "MemberAccess", + "referencedDeclaration": 5467, + "src": "3289:11:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_struct$_Data_$5389_memory_ptr_$_t_uint256_$returns$_t_uint256_$bound_to$_t_struct$_Data_$5389_memory_ptr_$", + "typeString": "function (struct Vote.Data memory,uint256) pure returns (uint256)" + } + }, + "id": 4964, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3289:24:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 4965, + "name": "newVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4767, + "src": "3315:7:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + "id": 4966, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "isDefault", + "nodeType": "MemberAccess", + "referencedDeclaration": 5444, + "src": "3315:17:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_struct$_Data_$5389_memory_ptr_$returns$_t_bool_$bound_to$_t_struct$_Data_$5389_memory_ptr_$", + "typeString": "function (struct Vote.Data memory) pure returns (bool)" + } + }, + "id": 4967, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3315:19:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 4968, + "name": "newBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4771, + "src": "3336:10:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4959, + "name": "emitEvent", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4787, + "src": "3273:9:13", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + } + }, + "id": 4969, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3273:74:13", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4970, + "nodeType": "ExpressionStatement", + "src": "3273:74:13" + } + ] + }, + "documentation": null, + "id": 4972, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_update", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4788, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4761, + "mutability": "mutable", + "name": "self", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4972, + "src": "1447:30:13", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage_ptr", + "typeString": "struct LiquidVoting.Data" + }, + "typeName": { + "contractScope": null, + "id": 4760, + "name": "LiquidVoting.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4668, + "src": "1447:17:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$4668_storage_ptr", + "typeString": "struct LiquidVoting.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4763, + "mutability": "mutable", + "name": "user", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4972, + "src": "1487:12:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4762, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1487:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4765, + "mutability": "mutable", + "name": "oldVote", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4972, + "src": "1509:24:13", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data" + }, + "typeName": { + "contractScope": null, + "id": 4764, + "name": "Vote.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5389, + "src": "1509:9:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_storage_ptr", + "typeString": "struct Vote.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4767, + "mutability": "mutable", + "name": "newVote", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4972, + "src": "1543:24:13", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data" + }, + "typeName": { + "contractScope": null, + "id": 4766, + "name": "Vote.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5389, + "src": "1543:9:13", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_storage_ptr", + "typeString": "struct Vote.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4769, + "mutability": "mutable", + "name": "oldBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4972, + "src": "1577:18:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4768, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1577:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4771, + "mutability": "mutable", + "name": "newBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4972, + "src": "1605:18:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4770, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1605:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4773, + "mutability": "mutable", + "name": "newTotalSupply", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4972, + "src": "1633:22:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4772, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1633:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4775, + "mutability": "mutable", + "name": "defaultVote", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4972, + "src": "1665:19:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4774, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1665:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4787, + "mutability": "mutable", + "name": "emitEvent", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4972, + "src": "1694:51:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + }, + "typeName": { + "id": 4786, + "nodeType": "FunctionTypeName", + "parameterTypes": { + "id": 4784, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4777, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4786, + "src": "1703:7:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 4776, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1703:7:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4779, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4786, + "src": "1712:7:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4778, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1712:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4781, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4786, + "src": "1721:4:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 4780, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1721:4:13", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4783, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4786, + "src": "1727:7:13", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4782, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1727:7:13", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1702:33:13" + }, + "returnParameterTypes": { + "id": 4785, + "nodeType": "ParameterList", + "parameters": [], + "src": "1736:0:13" + }, + "src": "1694:51:13", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$_t_bool_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,bool,uint256)" + }, + "visibility": "internal" + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1437:314:13" + }, + "returnParameters": { + "id": 4789, + "nodeType": "ParameterList", + "parameters": [], + "src": "1760:0:13" + }, + "scope": 4973, + "src": "1421:1933:13", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "private" + } + ], + "scope": 4974, + "src": "187:3169:13" + } + ], + "src": "33:3324:13" + }, + "id": 13 + }, + "Users/k06a/Projects/mooniswap-v2/contracts/libraries/MooniswapConstants.sol": { + "ast": { + "absolutePath": "Users/k06a/Projects/mooniswap-v2/contracts/libraries/MooniswapConstants.sol", + "exportedSymbols": { + "MooniswapConstants": [ + 5012 + ] + }, + "id": 5013, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 4975, + "literals": [ + "solidity", + "^", + "0.6", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "33:23:14" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": null, + "fullyImplemented": true, + "id": 5012, + "linearizedBaseContracts": [ + 5012 + ], + "name": "MooniswapConstants", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": true, + "id": 4978, + "mutability": "constant", + "name": "_FEE_DENOMINATOR", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5012, + "src": "92:49:14", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4976, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "92:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "31653138", + "id": 4977, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "137:4:14", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000000000000000_by_1", + "typeString": "int_const 1000000000000000000" + }, + "value": "1e18" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 4981, + "mutability": "constant", + "name": "_MIN_REFERRAL_SHARE", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5012, + "src": "148:55:14", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4979, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "148:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "302e3035653138", + "id": 4980, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "196:7:14", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_50000000000000000_by_1", + "typeString": "int_const 50000000000000000" + }, + "value": "0.05e18" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 4984, + "mutability": "constant", + "name": "_MIN_DECAY_PERIOD", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5012, + "src": "215:55:14", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4982, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "215:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "31", + "id": 4983, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "261:9:14", + "subdenomination": "minutes", + "typeDescriptions": { + "typeIdentifier": "t_rational_60_by_1", + "typeString": "int_const 60" + }, + "value": "1" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 4987, + "mutability": "constant", + "name": "_MAX_FEE", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5012, + "src": "277:44:14", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4985, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "277:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "302e3031653138", + "id": 4986, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "314:7:14", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10000000000000000_by_1", + "typeString": "int_const 10000000000000000" + }, + "value": "0.01e18" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 4990, + "mutability": "constant", + "name": "_MAX_SLIPPAGE_FEE", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5012, + "src": "333:50:14", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4988, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "333:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "31653138", + "id": 4989, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "379:4:14", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000000000000000_by_1", + "typeString": "int_const 1000000000000000000" + }, + "value": "1e18" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 4993, + "mutability": "constant", + "name": "_MAX_SHARE", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5012, + "src": "398:45:14", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4991, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "398:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "302e31653138", + "id": 4992, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "437:6:14", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_100000000000000000_by_1", + "typeString": "int_const 100000000000000000" + }, + "value": "0.1e18" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 4996, + "mutability": "constant", + "name": "_MAX_DECAY_PERIOD", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5012, + "src": "456:55:14", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4994, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "456:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "35", + "id": 4995, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "502:9:14", + "subdenomination": "minutes", + "typeDescriptions": { + "typeIdentifier": "t_rational_300_by_1", + "typeString": "int_const 300" + }, + "value": "5" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 4999, + "mutability": "constant", + "name": "_DEFAULT_FEE", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5012, + "src": "518:42:14", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4997, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "518:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "30", + "id": 4998, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "559:1:14", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 5002, + "mutability": "constant", + "name": "_DEFAULT_SLIPPAGE_FEE", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5012, + "src": "566:54:14", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5000, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "566:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "31653138", + "id": 5001, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "616:4:14", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1000000000000000000_by_1", + "typeString": "int_const 1000000000000000000" + }, + "value": "1e18" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 5005, + "mutability": "constant", + "name": "_DEFAULT_REFERRAL_SHARE", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5012, + "src": "635:58:14", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5003, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "635:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "302e31653138", + "id": 5004, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "687:6:14", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_100000000000000000_by_1", + "typeString": "int_const 100000000000000000" + }, + "value": "0.1e18" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 5008, + "mutability": "constant", + "name": "_DEFAULT_GOVERNANCE_SHARE", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5012, + "src": "706:55:14", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5006, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "706:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "30", + "id": 5007, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "760:1:14", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "visibility": "internal" + }, + { + "constant": true, + "id": 5011, + "mutability": "constant", + "name": "_DEFAULT_DECAY_PERIOD", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5012, + "src": "767:59:14", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5009, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "767:7:14", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "31", + "id": 5010, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "817:9:14", + "subdenomination": "minutes", + "typeDescriptions": { + "typeIdentifier": "t_rational_60_by_1", + "typeString": "int_const 60" + }, + "value": "1" + }, + "visibility": "internal" + } + ], + "scope": 5013, + "src": "59:770:14" + } + ], + "src": "33:797:14" + }, + "id": 14 + }, + "Users/k06a/Projects/mooniswap-v2/contracts/libraries/SafeCast.sol": { + "ast": { + "absolutePath": "Users/k06a/Projects/mooniswap-v2/contracts/libraries/SafeCast.sol", + "exportedSymbols": { + "SafeCast": [ + 5103 + ] + }, + "id": 5104, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 5014, + "literals": [ + "solidity", + "^", + "0.6", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "33:23:15" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": null, + "fullyImplemented": true, + "id": 5103, + "linearizedBaseContracts": [ + 5103 + ], + "name": "SafeCast", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 5035, + "nodeType": "Block", + "src": "147:105:15", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5022, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5016, + "src": "165:5:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_105312291668557186697918027683670432318895095400549111254310977536_by_1", + "typeString": "int_const 1053...(58 digits omitted)...7536" + }, + "id": 5025, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 5023, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "173:1:15", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "hexValue": "323136", + "id": 5024, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "176:3:15", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_216_by_1", + "typeString": "int_const 216" + }, + "value": "216" + }, + "src": "173:6:15", + "typeDescriptions": { + "typeIdentifier": "t_rational_105312291668557186697918027683670432318895095400549111254310977536_by_1", + "typeString": "int_const 1053...(58 digits omitted)...7536" + } + }, + "src": "165:14:15", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "76616c756520646f6573206e6f742066697420696e203231362062697473", + "id": 5027, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "181:32:15", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_fd7db2e277020510ede255e6d17a2e8c37005a980c463b73c9d1804cb27493b5", + "typeString": "literal_string \"value does not fit in 216 bits\"" + }, + "value": "value does not fit in 216 bits" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_fd7db2e277020510ede255e6d17a2e8c37005a980c463b73c9d1804cb27493b5", + "typeString": "literal_string \"value does not fit in 216 bits\"" + } + ], + "id": 5021, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "157:7:15", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5028, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "157:57:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5029, + "nodeType": "ExpressionStatement", + "src": "157:57:15" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5032, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5016, + "src": "239:5:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5031, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "231:7:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint216_$", + "typeString": "type(uint216)" + }, + "typeName": { + "id": 5030, + "name": "uint216", + "nodeType": "ElementaryTypeName", + "src": "231:7:15", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 5033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "231:14:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint216", + "typeString": "uint216" + } + }, + "functionReturnParameters": 5020, + "id": 5034, + "nodeType": "Return", + "src": "224:21:15" + } + ] + }, + "documentation": null, + "id": 5036, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint216", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 5017, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5016, + "mutability": "mutable", + "name": "value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5036, + "src": "100:13:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5015, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "100:7:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "99:15:15" + }, + "returnParameters": { + "id": 5020, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5019, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5036, + "src": "138:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint216", + "typeString": "uint216" + }, + "typeName": { + "id": 5018, + "name": "uint216", + "nodeType": "ElementaryTypeName", + "src": "138:7:15", + "typeDescriptions": { + "typeIdentifier": "t_uint216", + "typeString": "uint216" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "137:9:15" + }, + "scope": 5103, + "src": "81:171:15", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5057, + "nodeType": "Block", + "src": "324:105:15", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5048, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5044, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5038, + "src": "342:5:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_20282409603651670423947251286016_by_1", + "typeString": "int_const 20282409603651670423947251286016" + }, + "id": 5047, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 5045, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "350:1:15", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "hexValue": "313034", + "id": 5046, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "353:3:15", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_104_by_1", + "typeString": "int_const 104" + }, + "value": "104" + }, + "src": "350:6:15", + "typeDescriptions": { + "typeIdentifier": "t_rational_20282409603651670423947251286016_by_1", + "typeString": "int_const 20282409603651670423947251286016" + } + }, + "src": "342:14:15", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "76616c756520646f6573206e6f742066697420696e203130342062697473", + "id": 5049, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "358:32:15", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_188d91d75b492ddf4b7a3c2241fc2b2ff513cc901999483d4d169bcb56b88d5d", + "typeString": "literal_string \"value does not fit in 104 bits\"" + }, + "value": "value does not fit in 104 bits" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_188d91d75b492ddf4b7a3c2241fc2b2ff513cc901999483d4d169bcb56b88d5d", + "typeString": "literal_string \"value does not fit in 104 bits\"" + } + ], + "id": 5043, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "334:7:15", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5050, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "334:57:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5051, + "nodeType": "ExpressionStatement", + "src": "334:57:15" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5054, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5038, + "src": "416:5:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5053, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "408:7:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint104_$", + "typeString": "type(uint104)" + }, + "typeName": { + "id": 5052, + "name": "uint104", + "nodeType": "ElementaryTypeName", + "src": "408:7:15", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 5055, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "408:14:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + "functionReturnParameters": 5042, + "id": 5056, + "nodeType": "Return", + "src": "401:21:15" + } + ] + }, + "documentation": null, + "id": 5058, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint104", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 5039, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5038, + "mutability": "mutable", + "name": "value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5058, + "src": "277:13:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5037, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "277:7:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "276:15:15" + }, + "returnParameters": { + "id": 5042, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5041, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5058, + "src": "315:7:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + }, + "typeName": { + "id": 5040, + "name": "uint104", + "nodeType": "ElementaryTypeName", + "src": "315:7:15", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "314:9:15" + }, + "scope": 5103, + "src": "258:171:15", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5079, + "nodeType": "Block", + "src": "499:102:15", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5070, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5066, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5060, + "src": "517:5:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_281474976710656_by_1", + "typeString": "int_const 281474976710656" + }, + "id": 5069, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 5067, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "525:1:15", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3438", + "id": 5068, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "528:2:15", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_48_by_1", + "typeString": "int_const 48" + }, + "value": "48" + }, + "src": "525:5:15", + "typeDescriptions": { + "typeIdentifier": "t_rational_281474976710656_by_1", + "typeString": "int_const 281474976710656" + } + }, + "src": "517:13:15", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "76616c756520646f6573206e6f742066697420696e2034382062697473", + "id": 5071, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "532:31:15", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_8441fc001460000ecd751d817bad1de057101be78e61aaf9ef4c90b66b660451", + "typeString": "literal_string \"value does not fit in 48 bits\"" + }, + "value": "value does not fit in 48 bits" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_8441fc001460000ecd751d817bad1de057101be78e61aaf9ef4c90b66b660451", + "typeString": "literal_string \"value does not fit in 48 bits\"" + } + ], + "id": 5065, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "509:7:15", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5072, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "509:55:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5073, + "nodeType": "ExpressionStatement", + "src": "509:55:15" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5076, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5060, + "src": "588:5:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5075, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "581:6:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint48_$", + "typeString": "type(uint48)" + }, + "typeName": { + "id": 5074, + "name": "uint48", + "nodeType": "ElementaryTypeName", + "src": "581:6:15", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 5077, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "581:13:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + } + }, + "functionReturnParameters": 5064, + "id": 5078, + "nodeType": "Return", + "src": "574:20:15" + } + ] + }, + "documentation": null, + "id": 5080, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint48", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 5061, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5060, + "mutability": "mutable", + "name": "value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5080, + "src": "453:13:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5059, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "453:7:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "452:15:15" + }, + "returnParameters": { + "id": 5064, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5063, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5080, + "src": "491:6:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + }, + "typeName": { + "id": 5062, + "name": "uint48", + "nodeType": "ElementaryTypeName", + "src": "491:6:15", + "typeDescriptions": { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "490:8:15" + }, + "scope": 5103, + "src": "435:166:15", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5101, + "nodeType": "Block", + "src": "671:102:15", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5092, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5088, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5082, + "src": "689:5:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_rational_1099511627776_by_1", + "typeString": "int_const 1099511627776" + }, + "id": 5091, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 5089, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "697:1:15", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3430", + "id": 5090, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "700:2:15", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_40_by_1", + "typeString": "int_const 40" + }, + "value": "40" + }, + "src": "697:5:15", + "typeDescriptions": { + "typeIdentifier": "t_rational_1099511627776_by_1", + "typeString": "int_const 1099511627776" + } + }, + "src": "689:13:15", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "76616c756520646f6573206e6f742066697420696e2034302062697473", + "id": 5093, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "704:31:15", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_172700490614e4dfe732cc281f73d181a1bd9e8d7b31c8a03ff282ea9d3cc656", + "typeString": "literal_string \"value does not fit in 40 bits\"" + }, + "value": "value does not fit in 40 bits" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_172700490614e4dfe732cc281f73d181a1bd9e8d7b31c8a03ff282ea9d3cc656", + "typeString": "literal_string \"value does not fit in 40 bits\"" + } + ], + "id": 5087, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "681:7:15", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 5094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "681:55:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 5095, + "nodeType": "ExpressionStatement", + "src": "681:55:15" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5098, + "name": "value", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5082, + "src": "760:5:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 5097, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "753:6:15", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint40_$", + "typeString": "type(uint40)" + }, + "typeName": { + "id": 5096, + "name": "uint40", + "nodeType": "ElementaryTypeName", + "src": "753:6:15", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 5099, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "753:13:15", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint40", + "typeString": "uint40" + } + }, + "functionReturnParameters": 5086, + "id": 5100, + "nodeType": "Return", + "src": "746:20:15" + } + ] + }, + "documentation": null, + "id": 5102, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "toUint40", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 5083, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5082, + "mutability": "mutable", + "name": "value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5102, + "src": "625:13:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5081, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "625:7:15", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "624:15:15" + }, + "returnParameters": { + "id": 5086, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5085, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5102, + "src": "663:6:15", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint40", + "typeString": "uint40" + }, + "typeName": { + "id": 5084, + "name": "uint40", + "nodeType": "ElementaryTypeName", + "src": "663:6:15", + "typeDescriptions": { + "typeIdentifier": "t_uint40", + "typeString": "uint40" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "662:8:15" + }, + "scope": 5103, + "src": "607:166:15", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 5104, + "src": "58:717:15" + } + ], + "src": "33:743:15" + }, + "id": 15 + }, + "Users/k06a/Projects/mooniswap-v2/contracts/libraries/Sqrt.sol": { + "ast": { + "absolutePath": "Users/k06a/Projects/mooniswap-v2/contracts/libraries/Sqrt.sol", + "exportedSymbols": { + "Sqrt": [ + 3497 + ] + }, + "id": 3498, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 3439, + "literals": [ + "solidity", + "^", + "0.6", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "33:23:16" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": null, + "fullyImplemented": true, + "id": 3497, + "linearizedBaseContracts": [ + 3497 + ], + "name": "Sqrt", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 3495, + "nodeType": "Block", + "src": "244:314:16", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3448, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3446, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "258:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "33", + "id": 3447, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "262:1:16", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_3_by_1", + "typeString": "int_const 3" + }, + "value": "3" + }, + "src": "258:5:16", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3486, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3484, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "472:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3485, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "477:1:16", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "472:6:16", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 3492, + "nodeType": "Block", + "src": "519:33:16", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3490, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "540:1:16", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "functionReturnParameters": 3445, + "id": 3491, + "nodeType": "Return", + "src": "533:8:16" + } + ] + }, + "id": 3493, + "nodeType": "IfStatement", + "src": "468:84:16", + "trueBody": { + "id": 3489, + "nodeType": "Block", + "src": "480:33:16", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "31", + "id": 3487, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "501:1:16", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "functionReturnParameters": 3445, + "id": 3488, + "nodeType": "Return", + "src": "494:8:16" + } + ] + } + }, + "id": 3494, + "nodeType": "IfStatement", + "src": "254:298:16", + "trueBody": { + "id": 3483, + "nodeType": "Block", + "src": "265:197:16", + "statements": [ + { + "assignments": [ + 3450 + ], + "declarations": [ + { + "constant": false, + "id": 3450, + "mutability": "mutable", + "name": "z", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3483, + "src": "279:9:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3449, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "279:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3452, + "initialValue": { + "argumentTypes": null, + "id": 3451, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "291:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "279:13:16" + }, + { + "assignments": [ + 3454 + ], + "declarations": [ + { + "constant": false, + "id": 3454, + "mutability": "mutable", + "name": "x", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3483, + "src": "306:9:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3453, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "306:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3460, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3459, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3457, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3455, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "318:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 3456, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "322:1:16", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "318:5:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 3458, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "326:1:16", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "318:9:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "306:21:16" + }, + { + "body": { + "id": 3479, + "nodeType": "Block", + "src": "355:75:16", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 3466, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3464, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3450, + "src": "373:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 3465, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3454, + "src": "377:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "373:5:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3467, + "nodeType": "ExpressionStatement", + "src": "373:5:16" + }, + { + "expression": { + "argumentTypes": null, + "id": 3477, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 3468, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3454, + "src": "396:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3473, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3471, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3469, + "name": "y", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3441, + "src": "401:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 3470, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3454, + "src": "405:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "401:5:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 3472, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3454, + "src": "409:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "401:9:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3474, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "400:11:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 3475, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "414:1:16", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "400:15:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "396:19:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3478, + "nodeType": "ExpressionStatement", + "src": "396:19:16" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3463, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3461, + "name": "x", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3454, + "src": "348:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 3462, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3450, + "src": "352:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "348:5:16", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3480, + "nodeType": "WhileStatement", + "src": "341:89:16" + }, + { + "expression": { + "argumentTypes": null, + "id": 3481, + "name": "z", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3450, + "src": "450:1:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3445, + "id": 3482, + "nodeType": "Return", + "src": "443:8:16" + } + ] + } + } + ] + }, + "documentation": null, + "id": 3496, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "sqrt", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3442, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3441, + "mutability": "mutable", + "name": "y", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3496, + "src": "201:9:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3440, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "201:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "200:11:16" + }, + "returnParameters": { + "id": 3445, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3444, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3496, + "src": "235:7:16", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3443, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "235:7:16", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "234:9:16" + }, + "scope": 3497, + "src": "187:371:16", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 3498, + "src": "59:501:16" + } + ], + "src": "33:528:16" + }, + "id": 16 + }, + "Users/k06a/Projects/mooniswap-v2/contracts/libraries/UniERC20.sol": { + "ast": { + "absolutePath": "Users/k06a/Projects/mooniswap-v2/contracts/libraries/UniERC20.sol", + "exportedSymbols": { + "UniERC20": [ + 3970 + ] + }, + "id": 3971, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 3499, + "literals": [ + "solidity", + "^", + "0.6", + ".0" + ], + "nodeType": "PragmaDirective", + "src": "33:23:17" + }, + { + "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "file": "@openzeppelin/contracts/math/SafeMath.sol", + "id": 3500, + "nodeType": "ImportDirective", + "scope": 3971, + "sourceUnit": 2037, + "src": "58:51:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol", + "id": 3501, + "nodeType": "ImportDirective", + "scope": 3971, + "sourceUnit": 4217, + "src": "110:56:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol", + "file": "@openzeppelin/contracts/token/ERC20/SafeERC20.sol", + "id": 3502, + "nodeType": "ImportDirective", + "scope": 3971, + "sourceUnit": 5317, + "src": "167:59:17", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": null, + "fullyImplemented": true, + "id": 3970, + "linearizedBaseContracts": [ + 3970 + ], + "name": "UniERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 3505, + "libraryName": { + "contractScope": null, + "id": 3503, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2036, + "src": "258:8:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$2036", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "252:27:17", + "typeName": { + "id": 3504, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "271:7:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "id": 3508, + "libraryName": { + "contractScope": null, + "id": 3506, + "name": "SafeERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5316, + "src": "290:9:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeERC20_$5316", + "typeString": "library SafeERC20" + } + }, + "nodeType": "UsingForDirective", + "src": "284:27:17", + "typeName": { + "contractScope": null, + "id": 3507, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "304:6:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + } + }, + { + "body": { + "id": 3526, + "nodeType": "Block", + "src": "374:54:17", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3523, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3517, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3510, + "src": "400:5:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + ], + "id": 3516, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "392:7:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3515, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "392:7:17", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 3518, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "392:14:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 3521, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "418:1:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 3520, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "410:7:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3519, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "410:7:17", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 3522, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "410:10:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "392:28:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "id": 3524, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "391:30:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 3514, + "id": 3525, + "nodeType": "Return", + "src": "384:37:17" + } + ] + }, + "documentation": null, + "id": 3527, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isETH", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3511, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3510, + "mutability": "mutable", + "name": "token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3527, + "src": "332:12:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 3509, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "332:6:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "331:14:17" + }, + "returnParameters": { + "id": 3514, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3513, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3527, + "src": "368:4:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3512, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "368:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "367:6:17" + }, + "scope": 3970, + "src": "317:111:17", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3550, + "nodeType": "Block", + "src": "519:143:17", + "statements": [ + { + "condition": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3537, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3529, + "src": "539:5:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + ], + "id": 3536, + "name": "isETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3527, + "src": "533:5:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_contract$_IERC20_$4216_$returns$_t_bool_$", + "typeString": "function (contract IERC20) pure returns (bool)" + } + }, + "id": 3538, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "533:12:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 3548, + "nodeType": "Block", + "src": "600:56:17", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3545, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3531, + "src": "637:7:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3543, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3529, + "src": "621:5:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 3544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 4155, + "src": "621:15:17", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 3546, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "621:24:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3535, + "id": 3547, + "nodeType": "Return", + "src": "614:31:17" + } + ] + }, + "id": 3549, + "nodeType": "IfStatement", + "src": "529:127:17", + "trueBody": { + "id": 3542, + "nodeType": "Block", + "src": "547:47:17", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3539, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3531, + "src": "568:7:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "568:15:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 3535, + "id": 3541, + "nodeType": "Return", + "src": "561:22:17" + } + ] + } + } + ] + }, + "documentation": null, + "id": 3551, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "uniBalanceOf", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3532, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3529, + "mutability": "mutable", + "name": "token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3551, + "src": "456:12:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 3528, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "456:6:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3531, + "mutability": "mutable", + "name": "account", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3551, + "src": "470:15:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3530, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "470:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "455:31:17" + }, + "returnParameters": { + "id": 3535, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3534, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3551, + "src": "510:7:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3533, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "510:7:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "509:9:17" + }, + "scope": 3970, + "src": "434:228:17", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3584, + "nodeType": "Block", + "src": "748:195:17", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3562, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3560, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3557, + "src": "762:6:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3561, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "771:1:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "762:10:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3583, + "nodeType": "IfStatement", + "src": "758:179:17", + "trueBody": { + "id": 3582, + "nodeType": "Block", + "src": "774:163:17", + "statements": [ + { + "condition": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3564, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3553, + "src": "798:5:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + ], + "id": 3563, + "name": "isETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3527, + "src": "792:5:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_contract$_IERC20_$4216_$returns$_t_bool_$", + "typeString": "function (contract IERC20) pure returns (bool)" + } + }, + "id": 3565, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "792:12:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 3580, + "nodeType": "Block", + "src": "864:63:17", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3576, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3555, + "src": "901:2:17", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3577, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3557, + "src": "905:6:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3573, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3553, + "src": "882:5:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 3575, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 5137, + "src": "882:18:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4216_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$4216_$", + "typeString": "function (contract IERC20,address,uint256)" + } + }, + "id": 3578, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "882:30:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3579, + "nodeType": "ExpressionStatement", + "src": "882:30:17" + } + ] + }, + "id": 3581, + "nodeType": "IfStatement", + "src": "788:139:17", + "trueBody": { + "id": 3572, + "nodeType": "Block", + "src": "806:52:17", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3569, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3557, + "src": "836:6:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3566, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3555, + "src": "824:2:17", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 3568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "824:11:17", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3570, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "824:19:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3571, + "nodeType": "ExpressionStatement", + "src": "824:19:17" + } + ] + } + } + ] + } + } + ] + }, + "documentation": null, + "id": 3585, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "uniTransfer", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3558, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3553, + "mutability": "mutable", + "name": "token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3585, + "src": "689:12:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 3552, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "689:6:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3555, + "mutability": "mutable", + "name": "to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3585, + "src": "703:18:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 3554, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "703:15:17", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3557, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3585, + "src": "723:14:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3556, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "723:7:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "688:50:17" + }, + "returnParameters": { + "id": 3559, + "nodeType": "ParameterList", + "parameters": [], + "src": "748:0:17" + }, + "scope": 3970, + "src": "668:275:17", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3657, + "nodeType": "Block", + "src": "1047:546:17", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3598, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3596, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3593, + "src": "1061:6:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3597, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1070:1:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "1061:10:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3656, + "nodeType": "IfStatement", + "src": "1057:530:17", + "trueBody": { + "id": 3655, + "nodeType": "Block", + "src": "1073:514:17", + "statements": [ + { + "condition": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3600, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3587, + "src": "1097:5:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + ], + "id": 3599, + "name": "isETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3527, + "src": "1091:5:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_contract$_IERC20_$4216_$returns$_t_bool_$", + "typeString": "function (contract IERC20) pure returns (bool)" + } + }, + "id": 3601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1091:12:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 3653, + "nodeType": "Block", + "src": "1504:73:17", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3648, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3589, + "src": "1545:4:17", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + { + "argumentTypes": null, + "id": 3649, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3591, + "src": "1551:2:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 3650, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3593, + "src": "1555:6:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3645, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3587, + "src": "1522:5:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "id": 3647, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "safeTransferFrom", + "nodeType": "MemberAccess", + "referencedDeclaration": 5162, + "src": "1522:22:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IERC20_$4216_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$4216_$", + "typeString": "function (contract IERC20,address,address,uint256)" + } + }, + "id": 3651, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1522:40:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3652, + "nodeType": "ExpressionStatement", + "src": "1522:40:17" + } + ] + }, + "id": 3654, + "nodeType": "IfStatement", + "src": "1087:490:17", + "trueBody": { + "id": 3644, + "nodeType": "Block", + "src": "1105:393:17", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3606, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3603, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1131:3:17", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3604, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1131:9:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 3605, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3593, + "src": "1144:6:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1131:19:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "556e6945524332303a206e6f7420656e6f7567682076616c7565", + "id": 3607, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1152:28:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f063ea9425249c7c19d20c520ff74fdd489d423cacb235aa2b2d9a0850ee4f0f", + "typeString": "literal_string \"UniERC20: not enough value\"" + }, + "value": "UniERC20: not enough value" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_f063ea9425249c7c19d20c520ff74fdd489d423cacb235aa2b2d9a0850ee4f0f", + "typeString": "literal_string \"UniERC20: not enough value\"" + } + ], + "id": 3602, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1123:7:17", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1123:58:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3609, + "nodeType": "ExpressionStatement", + "src": "1123:58:17" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "id": 3614, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3611, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3589, + "src": "1207:4:17", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3612, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1215:3:17", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1215:10:17", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "src": "1207:18:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "66726f6d206973206e6f74206d73672e73656e646572", + "id": 3615, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1227:24:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_222e45d44519a738ad1d5b992e349214edd6b0843540c43ac077e5b93f96600e", + "typeString": "literal_string \"from is not msg.sender\"" + }, + "value": "from is not msg.sender" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_222e45d44519a738ad1d5b992e349214edd6b0843540c43ac077e5b93f96600e", + "typeString": "literal_string \"from is not msg.sender\"" + } + ], + "id": 3610, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1199:7:17", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3616, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1199:53:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3617, + "nodeType": "ExpressionStatement", + "src": "1199:53:17" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 3624, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3619, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3591, + "src": "1278:2:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3622, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -28, + "src": "1292:4:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_UniERC20_$3970", + "typeString": "library UniERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_UniERC20_$3970", + "typeString": "library UniERC20" + } + ], + "id": 3621, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1284:7:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3620, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1284:7:17", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 3623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1284:13:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "1278:19:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "746f206973206e6f742074686973", + "id": 3625, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1299:16:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_b6bbb74cfb85756ba53d31cc84e36589ae5b1ea2adb53aa339bfdd84c3a8acb9", + "typeString": "literal_string \"to is not this\"" + }, + "value": "to is not this" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_b6bbb74cfb85756ba53d31cc84e36589ae5b1ea2adb53aa339bfdd84c3a8acb9", + "typeString": "literal_string \"to is not this\"" + } + ], + "id": 3618, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + -18, + -18 + ], + "referencedDeclaration": -18, + "src": "1270:7:17", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 3626, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1270:46:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3627, + "nodeType": "ExpressionStatement", + "src": "1270:46:17" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3631, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3628, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1338:3:17", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3629, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1338:9:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 3630, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3593, + "src": "1350:6:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "1338:18:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3643, + "nodeType": "IfStatement", + "src": "1334:150:17", + "trueBody": { + "id": 3642, + "nodeType": "Block", + "src": "1358:126:17", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3638, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3593, + "src": "1457:6:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3635, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -15, + "src": "1443:3:17", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 3636, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1443:9:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3637, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1886, + "src": "1443:13:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 3639, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1443:21:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 3632, + "name": "from", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3589, + "src": "1429:4:17", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "id": 3634, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1429:13:17", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 3640, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1429:36:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3641, + "nodeType": "ExpressionStatement", + "src": "1429:36:17" + } + ] + } + } + ] + } + } + ] + } + } + ] + }, + "documentation": null, + "id": 3658, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "uniTransferFrom", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3594, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3587, + "mutability": "mutable", + "name": "token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3658, + "src": "974:12:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 3586, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "974:6:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3589, + "mutability": "mutable", + "name": "from", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3658, + "src": "988:20:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + }, + "typeName": { + "id": 3588, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "988:15:17", + "stateMutability": "payable", + "typeDescriptions": { + "typeIdentifier": "t_address_payable", + "typeString": "address payable" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3591, + "mutability": "mutable", + "name": "to", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3658, + "src": "1010:10:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3590, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1010:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3593, + "mutability": "mutable", + "name": "amount", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3658, + "src": "1022:14:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3592, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1022:7:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "973:64:17" + }, + "returnParameters": { + "id": 3595, + "nodeType": "ParameterList", + "parameters": [], + "src": "1047:0:17" + }, + "scope": 3970, + "src": "949:644:17", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3833, + "nodeType": "Block", + "src": "1669:1139:17", + "statements": [ + { + "condition": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3666, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3660, + "src": "1689:5:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + ], + "id": 3665, + "name": "isETH", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3527, + "src": "1683:5:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_contract$_IERC20_$4216_$returns$_t_bool_$", + "typeString": "function (contract IERC20) pure returns (bool)" + } + }, + "id": 3667, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1683:12:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3671, + "nodeType": "IfStatement", + "src": "1679:55:17", + "trueBody": { + "id": 3670, + "nodeType": "Block", + "src": "1697:37:17", + "statements": [ + { + "expression": { + "argumentTypes": null, + "hexValue": "455448", + "id": 3668, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1718:5:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_aaaebeba3810b1e6b70781f14b2d72c1cb89c0b2b320c43bb67ff79f562f5ff4", + "typeString": "literal_string \"ETH\"" + }, + "value": "ETH" + }, + "functionReturnParameters": 3664, + "id": 3669, + "nodeType": "Return", + "src": "1711:12:17" + } + ] + } + }, + { + "assignments": [ + 3673, + 3675 + ], + "declarations": [ + { + "constant": false, + "id": 3673, + "mutability": "mutable", + "name": "success", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3833, + "src": "1745:12:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 3672, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1745:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3675, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3833, + "src": "1759:17:17", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3674, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "1759:5:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3688, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "73796d626f6c2829", + "id": 3685, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1857:10:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_95d89b41e2f5f391a79ec54e9d87c79d6e777c63e32c28da95b4e9e4a79250ec", + "typeString": "literal_string \"symbol()\"" + }, + "value": "symbol()" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_95d89b41e2f5f391a79ec54e9d87c79d6e777c63e32c28da95b4e9e4a79250ec", + "typeString": "literal_string \"symbol()\"" + } + ], + "expression": { + "argumentTypes": null, + "id": 3683, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "1833:3:17", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3684, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1833:23:17", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 3686, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1833:35:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3678, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3660, + "src": "1788:5:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + ], + "id": 3677, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1780:7:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3676, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1780:7:17", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 3679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1780:14:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3680, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "staticcall", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1780:25:17", + "typeDescriptions": { + "typeIdentifier": "t_function_barestaticcall_view$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory) view returns (bool,bytes memory)" + } + }, + "id": 3682, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "gas" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "argumentTypes": null, + "hexValue": "3230303030", + "id": 3681, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1812:5:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_20000_by_1", + "typeString": "int_const 20000" + }, + "value": "20000" + } + ], + "src": "1780:39:17", + "typeDescriptions": { + "typeIdentifier": "t_function_barestaticcall_view$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$gas", + "typeString": "function (bytes memory) view returns (bool,bytes memory)" + } + }, + "id": 3687, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1780:98:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1744:134:17" + }, + { + "condition": { + "argumentTypes": null, + "id": 3690, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "1892:8:17", + "subExpression": { + "argumentTypes": null, + "id": 3689, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3673, + "src": "1893:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3709, + "nodeType": "IfStatement", + "src": "1888:163:17", + "trueBody": { + "id": 3708, + "nodeType": "Block", + "src": "1902:149:17", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 3706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 3691, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3673, + "src": "1917:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 3692, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3675, + "src": "1926:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "id": 3693, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "1916:15:17", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "53594d424f4c2829", + "id": 3703, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2015:10:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_f76f8d7879ebad29e9c8d569fc5504b048b2a036ce9b09a321bc8a05e3e1ec05", + "typeString": "literal_string \"SYMBOL()\"" + }, + "value": "SYMBOL()" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_stringliteral_f76f8d7879ebad29e9c8d569fc5504b048b2a036ce9b09a321bc8a05e3e1ec05", + "typeString": "literal_string \"SYMBOL()\"" + } + ], + "expression": { + "argumentTypes": null, + "id": 3701, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "1991:3:17", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3702, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodeWithSignature", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1991:23:17", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (string memory) pure returns (bytes memory)" + } + }, + "id": 3704, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1991:35:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3696, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3660, + "src": "1942:5:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + ], + "id": 3695, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1934:7:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3694, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1934:7:17", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 3697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1934:14:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 3698, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "staticcall", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1934:25:17", + "typeDescriptions": { + "typeIdentifier": "t_function_barestaticcall_view$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "function (bytes memory) view returns (bool,bytes memory)" + } + }, + "id": 3700, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "names": [ + "gas" + ], + "nodeType": "FunctionCallOptions", + "options": [ + { + "argumentTypes": null, + "hexValue": "3230303030", + "id": 3699, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1966:5:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_20000_by_1", + "typeString": "int_const 20000" + }, + "value": "20000" + } + ], + "src": "1934:39:17", + "typeDescriptions": { + "typeIdentifier": "t_function_barestaticcall_view$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$gas", + "typeString": "function (bytes memory) view returns (bool,bytes memory)" + } + }, + "id": 3705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1934:106:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", + "typeString": "tuple(bool,bytes memory)" + } + }, + "src": "1916:124:17", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 3707, + "nodeType": "ExpressionStatement", + "src": "1916:124:17" + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3715, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3710, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3673, + "src": "2065:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3714, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3711, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3675, + "src": "2076:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3712, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2076:11:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3936", + "id": 3713, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2091:2:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_96_by_1", + "typeString": "int_const 96" + }, + "value": "96" + }, + "src": "2076:17:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2065:28:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3755, + "nodeType": "IfStatement", + "src": "2061:258:17", + "trueBody": { + "id": 3754, + "nodeType": "Block", + "src": "2095:224:17", + "statements": [ + { + "assignments": [ + 3717, + 3719 + ], + "declarations": [ + { + "constant": false, + "id": 3717, + "mutability": "mutable", + "name": "offset", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3754, + "src": "2110:14:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3716, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2110:7:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3719, + "mutability": "mutable", + "name": "len", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3754, + "src": "2126:11:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3718, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2126:7:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3729, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3722, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3675, + "src": "2152:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 3724, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2159:7:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 3723, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2159:7:17", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + { + "argumentTypes": null, + "id": 3726, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2168:7:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 3725, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2168:7:17", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + } + ], + "id": 3727, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2158:18:17", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_type$_t_uint256_$_$_t_type$_t_uint256_$_$", + "typeString": "tuple(type(uint256),type(uint256))" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_tuple$_t_type$_t_uint256_$_$_t_type$_t_uint256_$_$", + "typeString": "tuple(type(uint256),type(uint256))" + } + ], + "expression": { + "argumentTypes": null, + "id": 3720, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2141:3:17", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3721, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2141:10:17", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3728, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2141:36:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint256_$_t_uint256_$", + "typeString": "tuple(uint256,uint256)" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2109:68:17" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3740, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3736, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3732, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3730, + "name": "offset", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3717, + "src": "2195:6:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30783230", + "id": 3731, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2205:4:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "0x20" + }, + "src": "2195:14:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3735, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3733, + "name": "len", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3719, + "src": "2213:3:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3734, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2219:1:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2213:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2195:25:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3739, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3737, + "name": "len", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3719, + "src": "2224:3:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "323536", + "id": 3738, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2231:3:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_256_by_1", + "typeString": "int_const 256" + }, + "value": "256" + }, + "src": "2224:10:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2195:39:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3753, + "nodeType": "IfStatement", + "src": "2191:118:17", + "trueBody": { + "id": 3752, + "nodeType": "Block", + "src": "2236:73:17", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3745, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3675, + "src": "2279:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 3747, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2286:5:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": { + "id": 3746, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2286:5:17", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + } + ], + "id": 3748, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "2285:7:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + }, + { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + } + ], + "expression": { + "argumentTypes": null, + "id": 3743, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2268:3:17", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3744, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "decode", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2268:10:17", + "typeDescriptions": { + "typeIdentifier": "t_function_abidecode_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 3749, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2268:25:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3742, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2261:6:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 3741, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2261:6:17", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 3750, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2261:33:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 3664, + "id": 3751, + "nodeType": "Return", + "src": "2254:40:17" + } + ] + } + } + ] + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3761, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3756, + "name": "success", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3673, + "src": "2333:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3760, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3757, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3675, + "src": "2344:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2344:11:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3332", + "id": 3759, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2359:2:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "32" + }, + "src": "2344:17:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2333:28:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3825, + "nodeType": "IfStatement", + "src": "2329:433:17", + "trueBody": { + "id": 3824, + "nodeType": "Block", + "src": "2363:399:17", + "statements": [ + { + "assignments": [ + 3763 + ], + "declarations": [ + { + "constant": false, + "id": 3763, + "mutability": "mutable", + "name": "len", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3824, + "src": "2377:8:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3762, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2377:4:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3765, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 3764, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2388:1:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "2377:12:17" + }, + { + "body": { + "id": 3785, + "nodeType": "Block", + "src": "2471:38:17", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 3783, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "2489:5:17", + "subExpression": { + "argumentTypes": null, + "id": 3782, + "name": "len", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3763, + "src": "2489:3:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3784, + "nodeType": "ExpressionStatement", + "src": "2489:5:17" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3781, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 3775, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3769, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3766, + "name": "len", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3763, + "src": "2410:3:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3767, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3675, + "src": "2416:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3768, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2416:11:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2410:17:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "id": 3774, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3770, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3675, + "src": "2431:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3772, + "indexExpression": { + "argumentTypes": null, + "id": 3771, + "name": "len", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3763, + "src": "2436:3:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2431:9:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30783230", + "id": 3773, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2444:4:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_32_by_1", + "typeString": "int_const 32" + }, + "value": "0x20" + }, + "src": "2431:17:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2410:38:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + }, + "id": 3780, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3776, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3675, + "src": "2452:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3778, + "indexExpression": { + "argumentTypes": null, + "id": 3777, + "name": "len", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3763, + "src": "2457:3:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2452:9:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30783745", + "id": 3779, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2465:4:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_126_by_1", + "typeString": "int_const 126" + }, + "value": "0x7E" + }, + "src": "2452:17:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "2410:59:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3786, + "nodeType": "WhileStatement", + "src": "2403:106:17" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3787, + "name": "len", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3763, + "src": "2527:3:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3788, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2533:1:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "2527:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 3823, + "nodeType": "IfStatement", + "src": "2523:229:17", + "trueBody": { + "id": 3822, + "nodeType": "Block", + "src": "2536:216:17", + "statements": [ + { + "assignments": [ + 3791 + ], + "declarations": [ + { + "constant": false, + "id": 3791, + "mutability": "mutable", + "name": "result", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3822, + "src": "2554:19:17", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3790, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2554:5:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3796, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3794, + "name": "len", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3763, + "src": "2586:3:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3793, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "2576:9:17", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256) pure returns (bytes memory)" + }, + "typeName": { + "id": 3792, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2580:5:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + } + }, + "id": 3795, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2576:14:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "2554:36:17" + }, + { + "body": { + "id": 3815, + "nodeType": "Block", + "src": "2639:60:17", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 3813, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3807, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3791, + "src": "2661:6:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3809, + "indexExpression": { + "argumentTypes": null, + "id": 3808, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3798, + "src": "2668:1:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2661:9:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3810, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3675, + "src": "2673:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3812, + "indexExpression": { + "argumentTypes": null, + "id": 3811, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3798, + "src": "2678:1:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "2673:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "src": "2661:19:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 3814, + "nodeType": "ExpressionStatement", + "src": "2661:19:17" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3803, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3801, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3798, + "src": "2625:1:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 3802, + "name": "len", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3763, + "src": "2629:3:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2625:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3816, + "initializationExpression": { + "assignments": [ + 3798 + ], + "declarations": [ + { + "constant": false, + "id": 3798, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3816, + "src": "2613:6:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3797, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "2613:4:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3800, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 3799, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2622:1:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "2613:10:17" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 3805, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "2634:3:17", + "subExpression": { + "argumentTypes": null, + "id": 3804, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3798, + "src": "2634:1:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3806, + "nodeType": "ExpressionStatement", + "src": "2634:3:17" + }, + "nodeType": "ForStatement", + "src": "2608:91:17" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3819, + "name": "result", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3791, + "src": "2730:6:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3818, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2723:6:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 3817, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2723:6:17", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 3820, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2723:14:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 3664, + "id": 3821, + "nodeType": "Return", + "src": "2716:21:17" + } + ] + } + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3829, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3660, + "src": "2794:5:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + ], + "id": 3828, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2786:7:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": { + "id": 3827, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2786:7:17", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 3830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2786:14:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 3826, + "name": "_toHex", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3849, + 3969 + ], + "referencedDeclaration": 3849, + "src": "2779:6:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_address_$returns$_t_string_memory_ptr_$", + "typeString": "function (address) pure returns (string memory)" + } + }, + "id": 3831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2779:22:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 3664, + "id": 3832, + "nodeType": "Return", + "src": "2772:29:17" + } + ] + }, + "documentation": null, + "id": 3834, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "uniSymbol", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3661, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3660, + "mutability": "mutable", + "name": "token", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3834, + "src": "1618:12:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + }, + "typeName": { + "contractScope": null, + "id": 3659, + "name": "IERC20", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 4216, + "src": "1618:6:17", + "typeDescriptions": { + "typeIdentifier": "t_contract$_IERC20_$4216", + "typeString": "contract IERC20" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1617:14:17" + }, + "returnParameters": { + "id": 3664, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3663, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3834, + "src": "1654:13:17", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3662, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1654:6:17", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1653:15:17" + }, + "scope": 3970, + "src": "1599:1209:17", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 3848, + "nodeType": "Block", + "src": "2883:57:17", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3844, + "name": "account", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3836, + "src": "2924:7:17", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 3842, + "name": "abi", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -1, + "src": "2907:3:17", + "typeDescriptions": { + "typeIdentifier": "t_magic_abi", + "typeString": "abi" + } + }, + "id": 3843, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "memberName": "encodePacked", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2907:16:17", + "typeDescriptions": { + "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$", + "typeString": "function () pure returns (bytes memory)" + } + }, + "id": 3845, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2907:25:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3841, + "name": "_toHex", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 3849, + 3969 + ], + "referencedDeclaration": 3969, + "src": "2900:6:17", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_bytes_memory_ptr_$returns$_t_string_memory_ptr_$", + "typeString": "function (bytes memory) pure returns (string memory)" + } + }, + "id": 3846, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2900:33:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 3840, + "id": 3847, + "nodeType": "Return", + "src": "2893:40:17" + } + ] + }, + "documentation": null, + "id": 3849, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_toHex", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3837, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3836, + "mutability": "mutable", + "name": "account", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3849, + "src": "2830:15:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 3835, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2830:7:17", + "stateMutability": "nonpayable", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2829:17:17" + }, + "returnParameters": { + "id": 3840, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3839, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3849, + "src": "2868:13:17", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3838, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2868:6:17", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2867:15:17" + }, + "scope": 3970, + "src": "2814:126:17", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + }, + { + "body": { + "id": 3968, + "nodeType": "Block", + "src": "3017:416:17", + "statements": [ + { + "assignments": [ + 3857 + ], + "declarations": [ + { + "constant": false, + "id": 3857, + "mutability": "mutable", + "name": "str", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3968, + "src": "3027:16:17", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3856, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3027:5:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3867, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3865, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 3860, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3056:1:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3864, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3861, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3851, + "src": "3060:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3060:11:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "32", + "id": 3863, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3074:1:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "src": "3060:15:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3056:19:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3859, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "NewExpression", + "src": "3046:9:17", + "typeDescriptions": { + "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_bytes_memory_ptr_$", + "typeString": "function (uint256) pure returns (bytes memory)" + }, + "typeName": { + "id": 3858, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "3050:5:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + } + }, + "id": 3866, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3046:30:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3027:49:17" + }, + { + "expression": { + "argumentTypes": null, + "id": 3872, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3868, + "name": "str", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3857, + "src": "3086:3:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3870, + "indexExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 3869, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3090:1:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3086:6:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "30", + "id": 3871, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3095:3:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_044852b2a670ade5407e78fb2863c51de9fcb96542a07186fe3aeda6bb8a116d", + "typeString": "literal_string \"0\"" + }, + "value": "0" + }, + "src": "3086:12:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 3873, + "nodeType": "ExpressionStatement", + "src": "3086:12:17" + }, + { + "expression": { + "argumentTypes": null, + "id": 3878, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3874, + "name": "str", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3857, + "src": "3108:3:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3876, + "indexExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 3875, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3112:1:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3108:6:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "78", + "id": 3877, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3117:3:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_7521d1cadbcfa91eec65aa16715b94ffc1c9654ba57ea2ef1a2127bca1127a83", + "typeString": "literal_string \"x\"" + }, + "value": "x" + }, + "src": "3108:12:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 3879, + "nodeType": "ExpressionStatement", + "src": "3108:12:17" + }, + { + "assignments": [ + 3881 + ], + "declarations": [ + { + "constant": false, + "id": 3881, + "mutability": "mutable", + "name": "j", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3968, + "src": "3130:6:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3880, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3130:4:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3883, + "initialValue": { + "argumentTypes": null, + "hexValue": "32", + "id": 3882, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3139:1:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_2_by_1", + "typeString": "int_const 2" + }, + "value": "2" + }, + "nodeType": "VariableDeclarationStatement", + "src": "3130:10:17" + }, + { + "body": { + "id": 3961, + "nodeType": "Block", + "src": "3189:209:17", + "statements": [ + { + "assignments": [ + 3896 + ], + "declarations": [ + { + "constant": false, + "id": 3896, + "mutability": "mutable", + "name": "a", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3961, + "src": "3203:6:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3895, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3203:4:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3905, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3904, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3899, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3851, + "src": "3218:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3901, + "indexExpression": { + "argumentTypes": null, + "id": 3900, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3885, + "src": "3223:1:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3218:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + ], + "id": 3898, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3212:5:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 3897, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3212:5:17", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 3902, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3212:14:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": ">>", + "rightExpression": { + "argumentTypes": null, + "hexValue": "34", + "id": 3903, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3230:1:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_4_by_1", + "typeString": "int_const 4" + }, + "value": "4" + }, + "src": "3212:19:17", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3203:28:17" + }, + { + "assignments": [ + 3907 + ], + "declarations": [ + { + "constant": false, + "id": 3907, + "mutability": "mutable", + "name": "b", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3961, + "src": "3245:6:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3906, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3245:4:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3916, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + }, + "id": 3915, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3910, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3851, + "src": "3260:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3912, + "indexExpression": { + "argumentTypes": null, + "id": 3911, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3885, + "src": "3265:1:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3260:7:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + ], + "id": 3909, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3254:5:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 3908, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3254:5:17", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 3913, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3254:14:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "BinaryOperation", + "operator": "&", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30783066", + "id": 3914, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3271:4:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_15_by_1", + "typeString": "int_const 15" + }, + "value": "0x0f" + }, + "src": "3254:21:17", + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "3245:30:17" + }, + { + "expression": { + "argumentTypes": null, + "id": 3937, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3917, + "name": "str", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3857, + "src": "3289:3:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3920, + "indexExpression": { + "argumentTypes": null, + "id": 3919, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "3293:3:17", + "subExpression": { + "argumentTypes": null, + "id": 3918, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3881, + "src": "3293:1:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3289:8:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3934, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3927, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3925, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3896, + "src": "3311:1:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3438", + "id": 3926, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3315:2:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_48_by_1", + "typeString": "int_const 48" + }, + "value": "48" + }, + "src": "3311:6:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3933, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3930, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3928, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3896, + "src": "3321:1:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 3929, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3323:2:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "3321:4:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3931, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "3320:6:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3339", + "id": 3932, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3327:2:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_39_by_1", + "typeString": "int_const 39" + }, + "value": "39" + }, + "src": "3320:9:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3311:18:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3924, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3305:5:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 3923, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3305:5:17", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 3935, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3305:25:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 3922, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3300:4:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 3921, + "name": "byte", + "nodeType": "ElementaryTypeName", + "src": "3300:4:17", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 3936, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3300:31:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "src": "3289:42:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 3938, + "nodeType": "ExpressionStatement", + "src": "3289:42:17" + }, + { + "expression": { + "argumentTypes": null, + "id": 3959, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 3939, + "name": "str", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3857, + "src": "3345:3:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3942, + "indexExpression": { + "argumentTypes": null, + "id": 3941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "3349:3:17", + "subExpression": { + "argumentTypes": null, + "id": 3940, + "name": "j", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3881, + "src": "3349:1:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "3345:8:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3949, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3947, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3907, + "src": "3367:1:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3438", + "id": 3948, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3371:2:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_48_by_1", + "typeString": "int_const 48" + }, + "value": "48" + }, + "src": "3367:6:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3955, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3952, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3950, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3907, + "src": "3377:1:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 3951, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3379:2:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "3377:4:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 3953, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "3376:6:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3339", + "id": 3954, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3383:2:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_39_by_1", + "typeString": "int_const 39" + }, + "value": "39" + }, + "src": "3376:9:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3367:18:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 3946, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3361:5:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint8_$", + "typeString": "type(uint8)" + }, + "typeName": { + "id": 3945, + "name": "uint8", + "nodeType": "ElementaryTypeName", + "src": "3361:5:17", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 3957, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3361:25:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint8", + "typeString": "uint8" + } + ], + "id": 3944, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3356:4:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes1_$", + "typeString": "type(bytes1)" + }, + "typeName": { + "id": 3943, + "name": "byte", + "nodeType": "ElementaryTypeName", + "src": "3356:4:17", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 3958, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3356:31:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "src": "3345:42:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes1", + "typeString": "bytes1" + } + }, + "id": 3960, + "nodeType": "ExpressionStatement", + "src": "3345:42:17" + } + ] + }, + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 3891, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 3888, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3885, + "src": "3167:1:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3889, + "name": "data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3851, + "src": "3171:4:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + }, + "id": 3890, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3171:11:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3167:15:17", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 3962, + "initializationExpression": { + "assignments": [ + 3885 + ], + "declarations": [ + { + "constant": false, + "id": 3885, + "mutability": "mutable", + "name": "i", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3962, + "src": "3155:6:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3884, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3155:4:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 3887, + "initialValue": { + "argumentTypes": null, + "hexValue": "30", + "id": 3886, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3164:1:17", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "nodeType": "VariableDeclarationStatement", + "src": "3155:10:17" + }, + "loopExpression": { + "expression": { + "argumentTypes": null, + "id": 3893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "++", + "prefix": false, + "src": "3184:3:17", + "subExpression": { + "argumentTypes": null, + "id": 3892, + "name": "i", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3885, + "src": "3184:1:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 3894, + "nodeType": "ExpressionStatement", + "src": "3184:3:17" + }, + "nodeType": "ForStatement", + "src": "3150:248:17" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 3965, + "name": "str", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3857, + "src": "3422:3:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 3964, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "3415:6:17", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": { + "id": 3963, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3415:6:17", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 3966, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3415:11:17", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "functionReturnParameters": 3855, + "id": 3967, + "nodeType": "Return", + "src": "3408:18:17" + } + ] + }, + "documentation": null, + "id": 3969, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "_toHex", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3852, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3851, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3969, + "src": "2962:17:17", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 3850, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2962:5:17", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2961:19:17" + }, + "returnParameters": { + "id": 3855, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3854, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3969, + "src": "3002:13:17", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 3853, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3002:6:17", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3001:15:17" + }, + "scope": 3970, + "src": "2946:487:17", + "stateMutability": "pure", + "virtual": false, + "visibility": "private" + } + ], + "scope": 3971, + "src": "229:3206:17" + } + ], + "src": "33:3403:17" + }, + "id": 17 + }, + "Users/k06a/Projects/mooniswap-v2/contracts/libraries/VirtualBalance.sol": { + "ast": { + "absolutePath": "Users/k06a/Projects/mooniswap-v2/contracts/libraries/VirtualBalance.sol", + "exportedSymbols": { + "VirtualBalance": [ + 4115 + ] + }, + "id": 4116, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 3972, + "literals": [ + "solidity", + "^", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "33:24:18" + }, + { + "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "file": "@openzeppelin/contracts/math/SafeMath.sol", + "id": 3973, + "nodeType": "ImportDirective", + "scope": 4116, + "sourceUnit": 2037, + "src": "60:51:18", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/math/Math.sol", + "file": "@openzeppelin/contracts/math/Math.sol", + "id": 3974, + "nodeType": "ImportDirective", + "scope": 4116, + "sourceUnit": 1841, + "src": "112:47:18", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "Users/k06a/Projects/mooniswap-v2/contracts/libraries/SafeCast.sol", + "file": "./SafeCast.sol", + "id": 3975, + "nodeType": "ImportDirective", + "scope": 4116, + "sourceUnit": 5104, + "src": "160:24:18", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": null, + "fullyImplemented": true, + "id": 4115, + "linearizedBaseContracts": [ + 4115 + ], + "name": "VirtualBalance", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 3978, + "libraryName": { + "contractScope": null, + "id": 3976, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2036, + "src": "222:8:18", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$2036", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "216:27:18", + "typeName": { + "id": 3977, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "235:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "id": 3981, + "libraryName": { + "contractScope": null, + "id": 3979, + "name": "SafeCast", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5103, + "src": "254:8:18", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeCast_$5103", + "typeString": "library SafeCast" + } + }, + "nodeType": "UsingForDirective", + "src": "248:27:18", + "typeName": { + "id": 3980, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "267:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "canonicalName": "VirtualBalance.Data", + "id": 3986, + "members": [ + { + "constant": false, + "id": 3983, + "mutability": "mutable", + "name": "balance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3986, + "src": "303:15:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint216", + "typeString": "uint216" + }, + "typeName": { + "id": 3982, + "name": "uint216", + "nodeType": "ElementaryTypeName", + "src": "303:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint216", + "typeString": "uint216" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3985, + "mutability": "mutable", + "name": "time", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 3986, + "src": "328:11:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint40", + "typeString": "uint40" + }, + "typeName": { + "id": 3984, + "name": "uint40", + "nodeType": "ElementaryTypeName", + "src": "328:6:18", + "typeDescriptions": { + "typeIdentifier": "t_uint40", + "typeString": "uint40" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Data", + "nodeType": "StructDefinition", + "scope": 4115, + "src": "281:65:18", + "visibility": "public" + }, + { + "body": { + "id": 4009, + "nodeType": "Block", + "src": "425:128:18", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 4007, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3993, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3988, + "src": "436:4:18", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_storage_ptr", + "typeString": "struct VirtualBalance.Data storage pointer" + } + }, + "id": 3995, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 3983, + "src": "436:12:18", + "typeDescriptions": { + "typeIdentifier": "t_uint216", + "typeString": "uint216" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 3996, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3988, + "src": "450:4:18", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_storage_ptr", + "typeString": "struct VirtualBalance.Data storage pointer" + } + }, + "id": 3997, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "time", + "nodeType": "MemberAccess", + "referencedDeclaration": 3985, + "src": "450:9:18", + "typeDescriptions": { + "typeIdentifier": "t_uint40", + "typeString": "uint40" + } + } + ], + "id": 3998, + "isConstant": false, + "isInlineArray": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "TupleExpression", + "src": "435:25:18", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint216_$_t_uint40_$", + "typeString": "tuple(uint216,uint40)" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "id": 3999, + "name": "balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3990, + "src": "477:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4000, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "toUint216", + "nodeType": "MemberAccess", + "referencedDeclaration": 5036, + "src": "477:17:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint216_$bound_to$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint216)" + } + }, + "id": 4001, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "477:19:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint216", + "typeString": "uint216" + } + }, + { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4002, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "510:5:18", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 4003, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "510:15:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4004, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "toUint40", + "nodeType": "MemberAccess", + "referencedDeclaration": 5102, + "src": "510:24:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_uint40_$bound_to$_t_uint256_$", + "typeString": "function (uint256) pure returns (uint40)" + } + }, + "id": 4005, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "510:26:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint40", + "typeString": "uint40" + } + } + ], + "id": 4006, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "463:83:18", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_uint216_$_t_uint40_$", + "typeString": "tuple(uint216,uint40)" + } + }, + "src": "435:111:18", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4008, + "nodeType": "ExpressionStatement", + "src": "435:111:18" + } + ] + }, + "documentation": null, + "id": 4010, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "set", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 3991, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 3988, + "mutability": "mutable", + "name": "self", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4010, + "src": "365:32:18", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_storage_ptr", + "typeString": "struct VirtualBalance.Data" + }, + "typeName": { + "contractScope": null, + "id": 3987, + "name": "VirtualBalance.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3986, + "src": "365:19:18", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_storage_ptr", + "typeString": "struct VirtualBalance.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 3990, + "mutability": "mutable", + "name": "balance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4010, + "src": "399:15:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 3989, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "399:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "364:51:18" + }, + "returnParameters": { + "id": 3992, + "nodeType": "ParameterList", + "parameters": [], + "src": "425:0:18" + }, + "scope": 4115, + "src": "352:201:18", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4028, + "nodeType": "Block", + "src": "660:67:18", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4020, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4012, + "src": "674:4:18", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_storage_ptr", + "typeString": "struct VirtualBalance.Data storage pointer" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4022, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4012, + "src": "688:4:18", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_storage_ptr", + "typeString": "struct VirtualBalance.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4023, + "name": "decayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4014, + "src": "694:11:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4024, + "name": "realBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4016, + "src": "707:11:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$3986_storage_ptr", + "typeString": "struct VirtualBalance.Data storage pointer" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4021, + "name": "current", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4114, + "src": "680:7:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$3986_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (struct VirtualBalance.Data memory,uint256,uint256) view returns (uint256)" + } + }, + "id": 4025, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "680:39:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$3986_storage_ptr", + "typeString": "struct VirtualBalance.Data storage pointer" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4019, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4010, + "src": "670:3:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$3986_storage_ptr_$_t_uint256_$returns$__$", + "typeString": "function (struct VirtualBalance.Data storage pointer,uint256)" + } + }, + "id": 4026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "670:50:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4027, + "nodeType": "ExpressionStatement", + "src": "670:50:18" + } + ] + }, + "documentation": null, + "id": 4029, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "update", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4017, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4012, + "mutability": "mutable", + "name": "self", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4029, + "src": "575:32:18", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_storage_ptr", + "typeString": "struct VirtualBalance.Data" + }, + "typeName": { + "contractScope": null, + "id": 4011, + "name": "VirtualBalance.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3986, + "src": "575:19:18", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_storage_ptr", + "typeString": "struct VirtualBalance.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4014, + "mutability": "mutable", + "name": "decayPeriod", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4029, + "src": "609:19:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4013, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "609:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4016, + "mutability": "mutable", + "name": "realBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4029, + "src": "630:19:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4015, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "630:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "574:76:18" + }, + "returnParameters": { + "id": 4018, + "nodeType": "ParameterList", + "parameters": [], + "src": "660:0:18" + }, + "scope": 4115, + "src": "559:168:18", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4063, + "nodeType": "Block", + "src": "861:105:18", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4043, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4031, + "src": "875:4:18", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_storage_ptr", + "typeString": "struct VirtualBalance.Data storage pointer" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4059, + "name": "denom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4039, + "src": "952:5:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 4055, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "944:1:18", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "id": 4053, + "name": "denom", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4039, + "src": "934:5:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4054, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1886, + "src": "934:9:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4056, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "934:12:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4050, + "name": "num", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4037, + "src": "925:3:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4045, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4031, + "src": "889:4:18", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_storage_ptr", + "typeString": "struct VirtualBalance.Data storage pointer" + } + }, + { + "argumentTypes": null, + "id": 4046, + "name": "decayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4033, + "src": "895:11:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 4047, + "name": "realBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4035, + "src": "908:11:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$3986_storage_ptr", + "typeString": "struct VirtualBalance.Data storage pointer" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4044, + "name": "current", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4114, + "src": "881:7:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_struct$_Data_$3986_memory_ptr_$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (struct VirtualBalance.Data memory,uint256,uint256) view returns (uint256)" + } + }, + "id": 4048, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "881:39:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4049, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1949, + "src": "881:43:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4051, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "881:48:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4052, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1869, + "src": "881:52:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4057, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "881:66:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4058, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1966, + "src": "881:70:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4060, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "881:77:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_struct$_Data_$3986_storage_ptr", + "typeString": "struct VirtualBalance.Data storage pointer" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 4042, + "name": "set", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4010, + "src": "871:3:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Data_$3986_storage_ptr_$_t_uint256_$returns$__$", + "typeString": "function (struct VirtualBalance.Data storage pointer,uint256)" + } + }, + "id": 4061, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "871:88:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 4062, + "nodeType": "ExpressionStatement", + "src": "871:88:18" + } + ] + }, + "documentation": null, + "id": 4064, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "scale", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4040, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4031, + "mutability": "mutable", + "name": "self", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4064, + "src": "748:32:18", + "stateVariable": false, + "storageLocation": "storage", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_storage_ptr", + "typeString": "struct VirtualBalance.Data" + }, + "typeName": { + "contractScope": null, + "id": 4030, + "name": "VirtualBalance.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3986, + "src": "748:19:18", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_storage_ptr", + "typeString": "struct VirtualBalance.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4033, + "mutability": "mutable", + "name": "decayPeriod", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4064, + "src": "782:19:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4032, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "782:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4035, + "mutability": "mutable", + "name": "realBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4064, + "src": "803:19:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4034, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "803:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4037, + "mutability": "mutable", + "name": "num", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4064, + "src": "824:11:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4036, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "824:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4039, + "mutability": "mutable", + "name": "denom", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4064, + "src": "837:13:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4038, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "837:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "747:104:18" + }, + "returnParameters": { + "id": 4041, + "nodeType": "ParameterList", + "parameters": [], + "src": "861:0:18" + }, + "scope": 4115, + "src": "733:233:18", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 4113, + "nodeType": "Block", + "src": "1095:275:18", + "statements": [ + { + "assignments": [ + 4076 + ], + "declarations": [ + { + "constant": false, + "id": 4076, + "mutability": "mutable", + "name": "timePassed", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4113, + "src": "1105:18:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4075, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1105:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4087, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4079, + "name": "decayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4068, + "src": "1135:11:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4083, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4066, + "src": "1168:4:18", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_memory_ptr", + "typeString": "struct VirtualBalance.Data memory" + } + }, + "id": 4084, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "time", + "nodeType": "MemberAccess", + "referencedDeclaration": 3985, + "src": "1168:9:18", + "typeDescriptions": { + "typeIdentifier": "t_uint40", + "typeString": "uint40" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint40", + "typeString": "uint40" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4080, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "1148:5:18", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 4081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "1148:15:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4082, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1886, + "src": "1148:19:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4085, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1148:30:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4077, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1840, + "src": "1126:4:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$1840_$", + "typeString": "type(library Math)" + } + }, + "id": 4078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 1806, + "src": "1126:8:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1126:53:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1105:74:18" + }, + { + "assignments": [ + 4089 + ], + "declarations": [ + { + "constant": false, + "id": 4089, + "mutability": "mutable", + "name": "timeRemain", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4113, + "src": "1189:18:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4088, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1189:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 4094, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4092, + "name": "timePassed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4076, + "src": "1226:10:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4090, + "name": "decayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4068, + "src": "1210:11:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4091, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1886, + "src": "1210:15:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4093, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1210:27:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "1189:48:18" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4110, + "name": "decayPeriod", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4068, + "src": "1351:11:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4106, + "name": "timePassed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4076, + "src": "1325:10:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 4104, + "name": "realBalance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4070, + "src": "1309:11:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4105, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1949, + "src": "1309:15:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4107, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1309:27:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 4101, + "name": "timeRemain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4089, + "src": "1280:10:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 4097, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 4066, + "src": "1262:4:18", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_memory_ptr", + "typeString": "struct VirtualBalance.Data memory" + } + }, + "id": 4098, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": 3983, + "src": "1262:12:18", + "typeDescriptions": { + "typeIdentifier": "t_uint216", + "typeString": "uint216" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint216", + "typeString": "uint216" + } + ], + "id": 4096, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "1254:7:18", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 4095, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1254:7:18", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 4099, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1254:21:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4100, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1949, + "src": "1254:25:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4102, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1254:37:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4103, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1869, + "src": "1254:41:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1254:92:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 4109, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1966, + "src": "1254:96:18", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 4111, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1254:109:18", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 4074, + "id": 4112, + "nodeType": "Return", + "src": "1247:116:18" + } + ] + }, + "documentation": null, + "id": 4114, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "current", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 4071, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4066, + "mutability": "mutable", + "name": "self", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4114, + "src": "989:31:18", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_memory_ptr", + "typeString": "struct VirtualBalance.Data" + }, + "typeName": { + "contractScope": null, + "id": 4065, + "name": "VirtualBalance.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 3986, + "src": "989:19:18", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$3986_storage_ptr", + "typeString": "struct VirtualBalance.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4068, + "mutability": "mutable", + "name": "decayPeriod", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4114, + "src": "1022:19:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4067, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1022:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 4070, + "mutability": "mutable", + "name": "realBalance", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4114, + "src": "1043:19:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4069, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1043:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "988:75:18" + }, + "returnParameters": { + "id": 4074, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 4073, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 4114, + "src": "1086:7:18", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 4072, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1086:7:18", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "1085:9:18" + }, + "scope": 4115, + "src": "972:398:18", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 4116, + "src": "187:1185:18" + } + ], + "src": "33:1340:18" + }, + "id": 18 + }, + "Users/k06a/Projects/mooniswap-v2/contracts/libraries/VirtualVote.sol": { + "ast": { + "absolutePath": "Users/k06a/Projects/mooniswap-v2/contracts/libraries/VirtualVote.sol", + "exportedSymbols": { + "VirtualVote": [ + 5384 + ] + }, + "id": 5385, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 5318, + "literals": [ + "solidity", + "^", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "33:24:19" + }, + { + "absolutePath": "@openzeppelin/contracts/math/Math.sol", + "file": "@openzeppelin/contracts/math/Math.sol", + "id": 5319, + "nodeType": "ImportDirective", + "scope": 5385, + "sourceUnit": 1841, + "src": "59:47:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", + "file": "@openzeppelin/contracts/math/SafeMath.sol", + "id": 5320, + "nodeType": "ImportDirective", + "scope": 5385, + "sourceUnit": 2037, + "src": "107:51:19", + "symbolAliases": [], + "unitAlias": "" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": null, + "fullyImplemented": true, + "id": 5384, + "linearizedBaseContracts": [ + 5384 + ], + "name": "VirtualVote", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 5323, + "libraryName": { + "contractScope": null, + "id": 5321, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 2036, + "src": "193:8:19", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$2036", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "187:27:19", + "typeName": { + "id": 5322, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "206:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": true, + "id": 5326, + "mutability": "constant", + "name": "_VOTE_DECAY_PERIOD", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5384, + "src": "220:52:19", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5324, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "220:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "31", + "id": 5325, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "266:6:19", + "subdenomination": "days", + "typeDescriptions": { + "typeIdentifier": "t_rational_86400_by_1", + "typeString": "int_const 86400" + }, + "value": "1" + }, + "visibility": "private" + }, + { + "canonicalName": "VirtualVote.Data", + "id": 5333, + "members": [ + { + "constant": false, + "id": 5328, + "mutability": "mutable", + "name": "oldResult", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5333, + "src": "301:17:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + }, + "typeName": { + "id": 5327, + "name": "uint104", + "nodeType": "ElementaryTypeName", + "src": "301:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5330, + "mutability": "mutable", + "name": "result", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5333, + "src": "328:14:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + }, + "typeName": { + "id": 5329, + "name": "uint104", + "nodeType": "ElementaryTypeName", + "src": "328:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5332, + "mutability": "mutable", + "name": "time", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5333, + "src": "352:11:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + }, + "typeName": { + "id": 5331, + "name": "uint48", + "nodeType": "ElementaryTypeName", + "src": "352:6:19", + "typeDescriptions": { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Data", + "nodeType": "StructDefinition", + "scope": 5384, + "src": "279:91:19", + "visibility": "public" + }, + { + "body": { + "id": 5382, + "nodeType": "Block", + "src": "454:307:19", + "statements": [ + { + "assignments": [ + 5341 + ], + "declarations": [ + { + "constant": false, + "id": 5341, + "mutability": "mutable", + "name": "timePassed", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5382, + "src": "464:18:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5340, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "464:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5352, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5344, + "name": "_VOTE_DECAY_PERIOD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5326, + "src": "494:18:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5348, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5335, + "src": "534:4:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_memory_ptr", + "typeString": "struct VirtualVote.Data memory" + } + }, + "id": 5349, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "time", + "nodeType": "MemberAccess", + "referencedDeclaration": 5332, + "src": "534:9:19", + "typeDescriptions": { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint48", + "typeString": "uint48" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5345, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": -4, + "src": "514:5:19", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 5346, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "timestamp", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "514:15:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1886, + "src": "514:19:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 5350, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "514:30:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5342, + "name": "Math", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1840, + "src": "485:4:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Math_$1840_$", + "typeString": "type(library Math)" + } + }, + "id": 5343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "min", + "nodeType": "MemberAccess", + "referencedDeclaration": 1806, + "src": "485:8:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 5351, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "485:60:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "464:81:19" + }, + { + "assignments": [ + 5354 + ], + "declarations": [ + { + "constant": false, + "id": 5354, + "mutability": "mutable", + "name": "timeRemain", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5382, + "src": "555:18:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5353, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "555:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 5359, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5357, + "name": "timePassed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5341, + "src": "599:10:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5355, + "name": "_VOTE_DECAY_PERIOD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5326, + "src": "576:18:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1886, + "src": "576:22:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 5358, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "576:34:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "555:55:19" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5379, + "name": "_VOTE_DECAY_PERIOD", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5326, + "src": "735:18:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5375, + "name": "timePassed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5341, + "src": "709:10:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5371, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5335, + "src": "692:4:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_memory_ptr", + "typeString": "struct VirtualVote.Data memory" + } + }, + "id": 5372, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "result", + "nodeType": "MemberAccess", + "referencedDeclaration": 5330, + "src": "692:11:19", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + ], + "id": 5370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "684:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 5369, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "684:7:19", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 5373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "684:20:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1949, + "src": "684:24:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 5376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "684:36:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 5366, + "name": "timeRemain", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5354, + "src": "655:10:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5362, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5335, + "src": "635:4:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_memory_ptr", + "typeString": "struct VirtualVote.Data memory" + } + }, + "id": 5363, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "oldResult", + "nodeType": "MemberAccess", + "referencedDeclaration": 5328, + "src": "635:14:19", + "typeDescriptions": { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint104", + "typeString": "uint104" + } + ], + "id": 5361, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "627:7:19", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_uint256_$", + "typeString": "type(uint256)" + }, + "typeName": { + "id": 5360, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "627:7:19", + "typeDescriptions": { + "typeIdentifier": null, + "typeString": null + } + } + }, + "id": 5364, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "627:23:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5365, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1949, + "src": "627:27:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 5367, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "627:39:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5368, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1869, + "src": "627:43:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 5377, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "627:103:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 5378, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1966, + "src": "627:107:19", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) pure returns (uint256)" + } + }, + "id": 5380, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "627:127:19", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5339, + "id": 5381, + "nodeType": "Return", + "src": "620:134:19" + } + ] + }, + "documentation": null, + "id": 5383, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "current", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 5336, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5335, + "mutability": "mutable", + "name": "self", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5383, + "src": "393:28:19", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_memory_ptr", + "typeString": "struct VirtualVote.Data" + }, + "typeName": { + "contractScope": null, + "id": 5334, + "name": "VirtualVote.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5333, + "src": "393:16:19", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5333_storage_ptr", + "typeString": "struct VirtualVote.Data" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "392:30:19" + }, + "returnParameters": { + "id": 5339, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5338, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5383, + "src": "445:7:19", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5337, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "445:7:19", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "444:9:19" + }, + "scope": 5384, + "src": "376:385:19", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 5385, + "src": "161:602:19" + } + ], + "src": "33:731:19" + }, + "id": 19 + }, + "Users/k06a/Projects/mooniswap-v2/contracts/libraries/Vote.sol": { + "ast": { + "absolutePath": "Users/k06a/Projects/mooniswap-v2/contracts/libraries/Vote.sol", + "exportedSymbols": { + "Vote": [ + 5496 + ] + }, + "id": 5497, + "license": "MIT", + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 5386, + "literals": [ + "solidity", + "^", + "0.6", + ".12" + ], + "nodeType": "PragmaDirective", + "src": "33:24:20" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": null, + "fullyImplemented": true, + "id": 5496, + "linearizedBaseContracts": [ + 5496 + ], + "name": "Vote", + "nodeType": "ContractDefinition", + "nodes": [ + { + "canonicalName": "Vote.Data", + "id": 5389, + "members": [ + { + "constant": false, + "id": 5388, + "mutability": "mutable", + "name": "value", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5389, + "src": "101:13:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5387, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "101:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Data", + "nodeType": "StructDefinition", + "scope": 5496, + "src": "79:42:20", + "visibility": "public" + }, + { + "body": { + "id": 5404, + "nodeType": "Block", + "src": "213:48:20", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5402, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5398, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5391, + "src": "230:4:20", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + "id": 5399, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": 5388, + "src": "230:10:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5400, + "name": "vote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5393, + "src": "244:4:20", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + "id": 5401, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": 5388, + "src": "244:10:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "230:24:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 5397, + "id": 5403, + "nodeType": "Return", + "src": "223:31:20" + } + ] + }, + "documentation": null, + "id": 5405, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "eq", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 5394, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5391, + "mutability": "mutable", + "name": "self", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5405, + "src": "139:21:20", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data" + }, + "typeName": { + "contractScope": null, + "id": 5390, + "name": "Vote.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5389, + "src": "139:9:20", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_storage_ptr", + "typeString": "struct Vote.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5393, + "mutability": "mutable", + "name": "vote", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5405, + "src": "162:21:20", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data" + }, + "typeName": { + "contractScope": null, + "id": 5392, + "name": "Vote.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5389, + "src": "162:9:20", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_storage_ptr", + "typeString": "struct Vote.Data" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "138:46:20" + }, + "returnParameters": { + "id": 5397, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5396, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5405, + "src": "207:4:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5395, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "207:4:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "206:6:20" + }, + "scope": 5496, + "src": "127:134:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5415, + "nodeType": "Block", + "src": "328:67:20", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 5412, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "376:1:20", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "expression": { + "argumentTypes": null, + "id": 5410, + "name": "Vote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5496, + "src": "345:4:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Vote_$5496_$", + "typeString": "type(library Vote)" + } + }, + "id": 5411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "Data", + "nodeType": "MemberAccess", + "referencedDeclaration": 5389, + "src": "345:9:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Data_$5389_storage_ptr_$", + "typeString": "type(struct Vote.Data storage pointer)" + } + }, + "id": 5413, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCall", + "src": "345:43:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + "functionReturnParameters": 5409, + "id": 5414, + "nodeType": "Return", + "src": "338:50:20" + } + ] + }, + "documentation": null, + "id": 5416, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "init", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 5406, + "nodeType": "ParameterList", + "parameters": [], + "src": "280:2:20" + }, + "returnParameters": { + "id": 5409, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5408, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5416, + "src": "305:21:20", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data" + }, + "typeName": { + "contractScope": null, + "id": 5407, + "name": "Vote.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5389, + "src": "305:9:20", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_storage_ptr", + "typeString": "struct Vote.Data" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "304:23:20" + }, + "scope": 5496, + "src": "267:128:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5430, + "nodeType": "Block", + "src": "474:74:20", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5427, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 5425, + "name": "vote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5418, + "src": "522:4:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 5426, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "529:1:20", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "522:8:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 5423, + "name": "Vote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5496, + "src": "491:4:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Vote_$5496_$", + "typeString": "type(library Vote)" + } + }, + "id": 5424, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "Data", + "nodeType": "MemberAccess", + "referencedDeclaration": 5389, + "src": "491:9:20", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_struct$_Data_$5389_storage_ptr_$", + "typeString": "type(struct Vote.Data storage pointer)" + } + }, + "id": 5428, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "structConstructorCall", + "lValueRequested": false, + "names": [ + "value" + ], + "nodeType": "FunctionCall", + "src": "491:50:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + "functionReturnParameters": 5422, + "id": 5429, + "nodeType": "Return", + "src": "484:57:20" + } + ] + }, + "documentation": null, + "id": 5431, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "init", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 5419, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5418, + "mutability": "mutable", + "name": "vote", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5431, + "src": "415:12:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5417, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "415:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "414:14:20" + }, + "returnParameters": { + "id": 5422, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5421, + "mutability": "mutable", + "name": "data", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5431, + "src": "451:21:20", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data" + }, + "typeName": { + "contractScope": null, + "id": 5420, + "name": "Vote.Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5389, + "src": "451:9:20", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_storage_ptr", + "typeString": "struct Vote.Data" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "450:23:20" + }, + "scope": 5496, + "src": "401:147:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5443, + "nodeType": "Block", + "src": "619:39:20", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5441, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5438, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5433, + "src": "636:4:20", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + "id": 5439, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": 5388, + "src": "636:10:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5440, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "650:1:20", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "636:15:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "functionReturnParameters": 5437, + "id": 5442, + "nodeType": "Return", + "src": "629:22:20" + } + ] + }, + "documentation": null, + "id": 5444, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "isDefault", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 5434, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5433, + "mutability": "mutable", + "name": "self", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5444, + "src": "573:16:20", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data" + }, + "typeName": { + "contractScope": null, + "id": 5432, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5389, + "src": "573:4:20", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_storage_ptr", + "typeString": "struct Vote.Data" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "572:18:20" + }, + "returnParameters": { + "id": 5437, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5436, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5444, + "src": "613:4:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 5435, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "613:4:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "612:6:20" + }, + "scope": 5496, + "src": "554:104:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5466, + "nodeType": "Block", + "src": "747:110:20", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5456, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5453, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5446, + "src": "761:4:20", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + "id": 5454, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": 5388, + "src": "761:10:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5455, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "774:1:20", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "761:14:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5463, + "nodeType": "IfStatement", + "src": "757:66:20", + "trueBody": { + "id": 5462, + "nodeType": "Block", + "src": "777:46:20", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5460, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5457, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5446, + "src": "798:4:20", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + "id": 5458, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": 5388, + "src": "798:10:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 5459, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "811:1:20", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "798:14:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5452, + "id": 5461, + "nodeType": "Return", + "src": "791:21:20" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "id": 5464, + "name": "defaultVote", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5448, + "src": "839:11:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5452, + "id": 5465, + "nodeType": "Return", + "src": "832:18:20" + } + ] + }, + "documentation": null, + "id": 5467, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "get", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 5449, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5446, + "mutability": "mutable", + "name": "self", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5467, + "src": "677:16:20", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data" + }, + "typeName": { + "contractScope": null, + "id": 5445, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5389, + "src": "677:4:20", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_storage_ptr", + "typeString": "struct Vote.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5448, + "mutability": "mutable", + "name": "defaultVote", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5467, + "src": "695:19:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5447, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "695:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "676:39:20" + }, + "returnParameters": { + "id": 5452, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5451, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5467, + "src": "738:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5450, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "738:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "737:9:20" + }, + "scope": 5496, + "src": "664:193:20", + "stateMutability": "pure", + "virtual": false, + "visibility": "internal" + }, + { + "body": { + "id": 5494, + "nodeType": "Block", + "src": "982:114:20", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5483, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5480, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5469, + "src": "996:4:20", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + "id": 5481, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": 5388, + "src": "996:10:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 5482, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1009:1:20", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "996:14:20", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 5490, + "nodeType": "IfStatement", + "src": "992:66:20", + "trueBody": { + "id": 5489, + "nodeType": "Block", + "src": "1012:46:20", + "statements": [ + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 5487, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 5484, + "name": "self", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5469, + "src": "1033:4:20", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data memory" + } + }, + "id": 5485, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": 5388, + "src": "1033:10:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 5486, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1046:1:20", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "1033:14:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5479, + "id": 5488, + "nodeType": "Return", + "src": "1026:21:20" + } + ] + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 5491, + "name": "defaultVoteFn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 5475, + "src": "1074:13:20", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + } + }, + "id": 5492, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "1074:15:20", + "tryCall": false, + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 5479, + "id": 5493, + "nodeType": "Return", + "src": "1067:22:20" + } + ] + }, + "documentation": null, + "id": 5495, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "get", + "nodeType": "FunctionDefinition", + "overrides": null, + "parameters": { + "id": 5476, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5469, + "mutability": "mutable", + "name": "self", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5495, + "src": "876:16:20", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_memory_ptr", + "typeString": "struct Vote.Data" + }, + "typeName": { + "contractScope": null, + "id": 5468, + "name": "Data", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 5389, + "src": "876:4:20", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Data_$5389_storage_ptr", + "typeString": "struct Vote.Data" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 5475, + "mutability": "mutable", + "name": "defaultVoteFn", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5495, + "src": "894:55:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + }, + "typeName": { + "id": 5474, + "nodeType": "FunctionTypeName", + "parameterTypes": { + "id": 5470, + "nodeType": "ParameterList", + "parameters": [], + "src": "902:2:20" + }, + "returnParameterTypes": { + "id": 5473, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5472, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5474, + "src": "927:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5471, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "927:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "926:9:20" + }, + "src": "894:55:20", + "stateMutability": "view", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$", + "typeString": "function () view external returns (uint256)" + }, + "visibility": "external" + }, + "value": null, + "visibility": "internal" + } + ], + "src": "875:75:20" + }, + "returnParameters": { + "id": 5479, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 5478, + "mutability": "mutable", + "name": "", + "nodeType": "VariableDeclaration", + "overrides": null, + "scope": 5495, + "src": "973:7:20", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 5477, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "973:7:20", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "972:9:20" + }, + "scope": 5496, + "src": "863:233:20", + "stateMutability": "view", + "virtual": false, + "visibility": "internal" + } + ], + "scope": 5497, + "src": "60:1038:20" + } + ], + "src": "33:1066:20" + }, + "id": 20 + } + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/path-translation.json b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/path-translation.json new file mode 100644 index 0000000000..d74f94736d --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/path-translation.json @@ -0,0 +1 @@ +{"/Users/k06a/Projects/mooniswap-v2/contracts/Mooniswap.sol":"Users/k06a/Projects/mooniswap-v2/contracts/Mooniswap.sol","/Users/k06a/Projects/mooniswap-v2/contracts/MooniswapFactory.sol":"Users/k06a/Projects/mooniswap-v2/contracts/MooniswapFactory.sol","/Users/k06a/Projects/mooniswap-v2/contracts/governance/BaseGovernanceModule.sol":"Users/k06a/Projects/mooniswap-v2/contracts/governance/BaseGovernanceModule.sol","/Users/k06a/Projects/mooniswap-v2/contracts/governance/MooniswapFactoryGovernance.sol":"Users/k06a/Projects/mooniswap-v2/contracts/governance/MooniswapFactoryGovernance.sol","/Users/k06a/Projects/mooniswap-v2/contracts/governance/MooniswapGovernance.sol":"Users/k06a/Projects/mooniswap-v2/contracts/governance/MooniswapGovernance.sol","/Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IFeeCollector.sol":"Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IFeeCollector.sol","/Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IGovernanceModule.sol":"Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IGovernanceModule.sol","/Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IMooniswapDeployer.sol":"Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IMooniswapDeployer.sol","/Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IMooniswapFactory.sol":"Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IMooniswapFactory.sol","/Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IMooniswapFactoryGovernance.sol":"Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IMooniswapFactoryGovernance.sol","/Users/k06a/Projects/mooniswap-v2/contracts/libraries/ExplicitLiquidVoting.sol":"Users/k06a/Projects/mooniswap-v2/contracts/libraries/ExplicitLiquidVoting.sol","/Users/k06a/Projects/mooniswap-v2/contracts/libraries/LiquidVoting.sol":"Users/k06a/Projects/mooniswap-v2/contracts/libraries/LiquidVoting.sol","/Users/k06a/Projects/mooniswap-v2/contracts/libraries/MooniswapConstants.sol":"Users/k06a/Projects/mooniswap-v2/contracts/libraries/MooniswapConstants.sol","/Users/k06a/Projects/mooniswap-v2/contracts/libraries/SafeCast.sol":"Users/k06a/Projects/mooniswap-v2/contracts/libraries/SafeCast.sol","/Users/k06a/Projects/mooniswap-v2/contracts/libraries/Sqrt.sol":"Users/k06a/Projects/mooniswap-v2/contracts/libraries/Sqrt.sol","/Users/k06a/Projects/mooniswap-v2/contracts/libraries/UniERC20.sol":"Users/k06a/Projects/mooniswap-v2/contracts/libraries/UniERC20.sol","/Users/k06a/Projects/mooniswap-v2/contracts/libraries/VirtualBalance.sol":"Users/k06a/Projects/mooniswap-v2/contracts/libraries/VirtualBalance.sol","/Users/k06a/Projects/mooniswap-v2/contracts/libraries/VirtualVote.sol":"Users/k06a/Projects/mooniswap-v2/contracts/libraries/VirtualVote.sol","/Users/k06a/Projects/mooniswap-v2/contracts/libraries/Vote.sol":"Users/k06a/Projects/mooniswap-v2/contracts/libraries/Vote.sol","/Users/k06a/Projects/mooniswap-v2/contracts/utils/BalanceAccounting.sol":"Users/k06a/Projects/mooniswap-v2/contracts/utils/BalanceAccounting.sol"} \ No newline at end of file diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/GSN/Context.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/GSN/Context.sol new file mode 100644 index 0000000000..337acb1939 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/GSN/Context.sol @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + +/* + * @dev Provides information about the current execution context, including the + * sender of the transaction and its data. While these are generally available + * via msg.sender and msg.data, they should not be accessed in such a direct + * manner, since when dealing with GSN meta-transactions the account sending and + * paying for execution may not be the actual sender (as far as an application + * is concerned). + * + * This contract is only required for intermediate, library-like contracts. + */ +abstract contract Context { + function _msgSender() internal view virtual returns (address payable) { + return msg.sender; + } + + function _msgData() internal view virtual returns (bytes memory) { + this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 + return msg.data; + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/access/Ownable.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/access/Ownable.sol new file mode 100644 index 0000000000..353e79c2cd --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/access/Ownable.sol @@ -0,0 +1,68 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + +import "../GSN/Context.sol"; +/** + * @dev Contract module which provides a basic access control mechanism, where + * there is an account (an owner) that can be granted exclusive access to + * specific functions. + * + * By default, the owner account will be the one that deploys the contract. This + * can later be changed with {transferOwnership}. + * + * This module is used through inheritance. It will make available the modifier + * `onlyOwner`, which can be applied to your functions to restrict their use to + * the owner. + */ +contract Ownable is Context { + address private _owner; + + event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); + + /** + * @dev Initializes the contract setting the deployer as the initial owner. + */ + constructor () internal { + address msgSender = _msgSender(); + _owner = msgSender; + emit OwnershipTransferred(address(0), msgSender); + } + + /** + * @dev Returns the address of the current owner. + */ + function owner() public view returns (address) { + return _owner; + } + + /** + * @dev Throws if called by any account other than the owner. + */ + modifier onlyOwner() { + require(_owner == _msgSender(), "Ownable: caller is not the owner"); + _; + } + + /** + * @dev Leaves the contract without owner. It will not be possible to call + * `onlyOwner` functions anymore. Can only be called by the current owner. + * + * NOTE: Renouncing ownership will leave the contract without an owner, + * thereby removing any functionality that is only available to the owner. + */ + function renounceOwnership() public virtual onlyOwner { + emit OwnershipTransferred(_owner, address(0)); + _owner = address(0); + } + + /** + * @dev Transfers ownership of the contract to a new account (`newOwner`). + * Can only be called by the current owner. + */ + function transferOwnership(address newOwner) public virtual onlyOwner { + require(newOwner != address(0), "Ownable: new owner is the zero address"); + emit OwnershipTransferred(_owner, newOwner); + _owner = newOwner; + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/math/Math.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/math/Math.sol new file mode 100644 index 0000000000..ec4ac227d3 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/math/Math.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + +/** + * @dev Standard math utilities missing in the Solidity language. + */ +library Math { + /** + * @dev Returns the largest of two numbers. + */ + function max(uint256 a, uint256 b) internal pure returns (uint256) { + return a >= b ? a : b; + } + + /** + * @dev Returns the smallest of two numbers. + */ + function min(uint256 a, uint256 b) internal pure returns (uint256) { + return a < b ? a : b; + } + + /** + * @dev Returns the average of two numbers. The result is rounded towards + * zero. + */ + function average(uint256 a, uint256 b) internal pure returns (uint256) { + // (a + b) / 2 can overflow, so we distribute + return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2); + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/math/SafeMath.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/math/SafeMath.sol new file mode 100644 index 0000000000..80490effea --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/math/SafeMath.sol @@ -0,0 +1,159 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + +/** + * @dev Wrappers over Solidity's arithmetic operations with added overflow + * checks. + * + * Arithmetic operations in Solidity wrap on overflow. This can easily result + * in bugs, because programmers usually assume that an overflow raises an + * error, which is the standard behavior in high level programming languages. + * `SafeMath` restores this intuition by reverting the transaction when an + * operation overflows. + * + * Using this library instead of the unchecked operations eliminates an entire + * class of bugs, so it's recommended to use it always. + */ +library SafeMath { + /** + * @dev Returns the addition of two unsigned integers, reverting on + * overflow. + * + * Counterpart to Solidity's `+` operator. + * + * Requirements: + * + * - Addition cannot overflow. + */ + function add(uint256 a, uint256 b) internal pure returns (uint256) { + uint256 c = a + b; + require(c >= a, "SafeMath: addition overflow"); + + return c; + } + + /** + * @dev Returns the subtraction of two unsigned integers, reverting on + * overflow (when the result is negative). + * + * Counterpart to Solidity's `-` operator. + * + * Requirements: + * + * - Subtraction cannot overflow. + */ + function sub(uint256 a, uint256 b) internal pure returns (uint256) { + return sub(a, b, "SafeMath: subtraction overflow"); + } + + /** + * @dev Returns the subtraction of two unsigned integers, reverting with custom message on + * overflow (when the result is negative). + * + * Counterpart to Solidity's `-` operator. + * + * Requirements: + * + * - Subtraction cannot overflow. + */ + function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { + require(b <= a, errorMessage); + uint256 c = a - b; + + return c; + } + + /** + * @dev Returns the multiplication of two unsigned integers, reverting on + * overflow. + * + * Counterpart to Solidity's `*` operator. + * + * Requirements: + * + * - Multiplication cannot overflow. + */ + function mul(uint256 a, uint256 b) internal pure returns (uint256) { + // Gas optimization: this is cheaper than requiring 'a' not being zero, but the + // benefit is lost if 'b' is also tested. + // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 + if (a == 0) { + return 0; + } + + uint256 c = a * b; + require(c / a == b, "SafeMath: multiplication overflow"); + + return c; + } + + /** + * @dev Returns the integer division of two unsigned integers. Reverts on + * division by zero. The result is rounded towards zero. + * + * Counterpart to Solidity's `/` operator. Note: this function uses a + * `revert` opcode (which leaves remaining gas untouched) while Solidity + * uses an invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * + * - The divisor cannot be zero. + */ + function div(uint256 a, uint256 b) internal pure returns (uint256) { + return div(a, b, "SafeMath: division by zero"); + } + + /** + * @dev Returns the integer division of two unsigned integers. Reverts with custom message on + * division by zero. The result is rounded towards zero. + * + * Counterpart to Solidity's `/` operator. Note: this function uses a + * `revert` opcode (which leaves remaining gas untouched) while Solidity + * uses an invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * + * - The divisor cannot be zero. + */ + function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { + require(b > 0, errorMessage); + uint256 c = a / b; + // assert(a == b * c + a % b); // There is no case in which this doesn't hold + + return c; + } + + /** + * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), + * Reverts when dividing by zero. + * + * Counterpart to Solidity's `%` operator. This function uses a `revert` + * opcode (which leaves remaining gas untouched) while Solidity uses an + * invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * + * - The divisor cannot be zero. + */ + function mod(uint256 a, uint256 b) internal pure returns (uint256) { + return mod(a, b, "SafeMath: modulo by zero"); + } + + /** + * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), + * Reverts with custom message when dividing by zero. + * + * Counterpart to Solidity's `%` operator. This function uses a `revert` + * opcode (which leaves remaining gas untouched) while Solidity uses an + * invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * + * - The divisor cannot be zero. + */ + function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { + require(b != 0, errorMessage); + return a % b; + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/token/ERC20/ERC20.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/token/ERC20/ERC20.sol new file mode 100644 index 0000000000..a8ab97f27c --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/token/ERC20/ERC20.sol @@ -0,0 +1,307 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + +import "../../GSN/Context.sol"; +import "./IERC20.sol"; +import "../../math/SafeMath.sol"; +import "../../utils/Address.sol"; + +/** + * @dev Implementation of the {IERC20} interface. + * + * This implementation is agnostic to the way tokens are created. This means + * that a supply mechanism has to be added in a derived contract using {_mint}. + * For a generic mechanism see {ERC20PresetMinterPauser}. + * + * TIP: For a detailed writeup see our guide + * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How + * to implement supply mechanisms]. + * + * We have followed general OpenZeppelin guidelines: functions revert instead + * of returning `false` on failure. This behavior is nonetheless conventional + * and does not conflict with the expectations of ERC20 applications. + * + * Additionally, an {Approval} event is emitted on calls to {transferFrom}. + * This allows applications to reconstruct the allowance for all accounts just + * by listening to said events. Other implementations of the EIP may not emit + * these events, as it isn't required by the specification. + * + * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} + * functions have been added to mitigate the well-known issues around setting + * allowances. See {IERC20-approve}. + */ +contract ERC20 is Context, IERC20 { + using SafeMath for uint256; + using Address for address; + + mapping (address => uint256) private _balances; + + mapping (address => mapping (address => uint256)) private _allowances; + + uint256 private _totalSupply; + + string private _name; + string private _symbol; + uint8 private _decimals; + + /** + * @dev Sets the values for {name} and {symbol}, initializes {decimals} with + * a default value of 18. + * + * To select a different value for {decimals}, use {_setupDecimals}. + * + * All three of these values are immutable: they can only be set once during + * construction. + */ + constructor (string memory name, string memory symbol) public { + _name = name; + _symbol = symbol; + _decimals = 18; + } + + /** + * @dev Returns the name of the token. + */ + function name() public view returns (string memory) { + return _name; + } + + /** + * @dev Returns the symbol of the token, usually a shorter version of the + * name. + */ + function symbol() public view returns (string memory) { + return _symbol; + } + + /** + * @dev Returns the number of decimals used to get its user representation. + * For example, if `decimals` equals `2`, a balance of `505` tokens should + * be displayed to a user as `5,05` (`505 / 10 ** 2`). + * + * Tokens usually opt for a value of 18, imitating the relationship between + * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is + * called. + * + * NOTE: This information is only used for _display_ purposes: it in + * no way affects any of the arithmetic of the contract, including + * {IERC20-balanceOf} and {IERC20-transfer}. + */ + function decimals() public view returns (uint8) { + return _decimals; + } + + /** + * @dev See {IERC20-totalSupply}. + */ + function totalSupply() public view override returns (uint256) { + return _totalSupply; + } + + /** + * @dev See {IERC20-balanceOf}. + */ + function balanceOf(address account) public view override returns (uint256) { + return _balances[account]; + } + + /** + * @dev See {IERC20-transfer}. + * + * Requirements: + * + * - `recipient` cannot be the zero address. + * - the caller must have a balance of at least `amount`. + */ + function transfer(address recipient, uint256 amount) public virtual override returns (bool) { + _transfer(_msgSender(), recipient, amount); + return true; + } + + /** + * @dev See {IERC20-allowance}. + */ + function allowance(address owner, address spender) public view virtual override returns (uint256) { + return _allowances[owner][spender]; + } + + /** + * @dev See {IERC20-approve}. + * + * Requirements: + * + * - `spender` cannot be the zero address. + */ + function approve(address spender, uint256 amount) public virtual override returns (bool) { + _approve(_msgSender(), spender, amount); + return true; + } + + /** + * @dev See {IERC20-transferFrom}. + * + * Emits an {Approval} event indicating the updated allowance. This is not + * required by the EIP. See the note at the beginning of {ERC20}; + * + * Requirements: + * - `sender` and `recipient` cannot be the zero address. + * - `sender` must have a balance of at least `amount`. + * - the caller must have allowance for ``sender``'s tokens of at least + * `amount`. + */ + function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { + _transfer(sender, recipient, amount); + _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); + return true; + } + + /** + * @dev Atomically increases the allowance granted to `spender` by the caller. + * + * This is an alternative to {approve} that can be used as a mitigation for + * problems described in {IERC20-approve}. + * + * Emits an {Approval} event indicating the updated allowance. + * + * Requirements: + * + * - `spender` cannot be the zero address. + */ + function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { + _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); + return true; + } + + /** + * @dev Atomically decreases the allowance granted to `spender` by the caller. + * + * This is an alternative to {approve} that can be used as a mitigation for + * problems described in {IERC20-approve}. + * + * Emits an {Approval} event indicating the updated allowance. + * + * Requirements: + * + * - `spender` cannot be the zero address. + * - `spender` must have allowance for the caller of at least + * `subtractedValue`. + */ + function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { + _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); + return true; + } + + /** + * @dev Moves tokens `amount` from `sender` to `recipient`. + * + * This is internal function is equivalent to {transfer}, and can be used to + * e.g. implement automatic token fees, slashing mechanisms, etc. + * + * Emits a {Transfer} event. + * + * Requirements: + * + * - `sender` cannot be the zero address. + * - `recipient` cannot be the zero address. + * - `sender` must have a balance of at least `amount`. + */ + function _transfer(address sender, address recipient, uint256 amount) internal virtual { + require(sender != address(0), "ERC20: transfer from the zero address"); + require(recipient != address(0), "ERC20: transfer to the zero address"); + + _beforeTokenTransfer(sender, recipient, amount); + + _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); + _balances[recipient] = _balances[recipient].add(amount); + emit Transfer(sender, recipient, amount); + } + + /** @dev Creates `amount` tokens and assigns them to `account`, increasing + * the total supply. + * + * Emits a {Transfer} event with `from` set to the zero address. + * + * Requirements + * + * - `to` cannot be the zero address. + */ + function _mint(address account, uint256 amount) internal virtual { + require(account != address(0), "ERC20: mint to the zero address"); + + _beforeTokenTransfer(address(0), account, amount); + + _totalSupply = _totalSupply.add(amount); + _balances[account] = _balances[account].add(amount); + emit Transfer(address(0), account, amount); + } + + /** + * @dev Destroys `amount` tokens from `account`, reducing the + * total supply. + * + * Emits a {Transfer} event with `to` set to the zero address. + * + * Requirements + * + * - `account` cannot be the zero address. + * - `account` must have at least `amount` tokens. + */ + function _burn(address account, uint256 amount) internal virtual { + require(account != address(0), "ERC20: burn from the zero address"); + + _beforeTokenTransfer(account, address(0), amount); + + _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); + _totalSupply = _totalSupply.sub(amount); + emit Transfer(account, address(0), amount); + } + + /** + * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. + * + * This is internal function is equivalent to `approve`, and can be used to + * e.g. set automatic allowances for certain subsystems, etc. + * + * Emits an {Approval} event. + * + * Requirements: + * + * - `owner` cannot be the zero address. + * - `spender` cannot be the zero address. + */ + function _approve(address owner, address spender, uint256 amount) internal virtual { + require(owner != address(0), "ERC20: approve from the zero address"); + require(spender != address(0), "ERC20: approve to the zero address"); + + _allowances[owner][spender] = amount; + emit Approval(owner, spender, amount); + } + + /** + * @dev Sets {decimals} to a value other than the default one of 18. + * + * WARNING: This function should only be called from the constructor. Most + * applications that interact with token contracts will not expect + * {decimals} to ever change, and may work incorrectly if it does. + */ + function _setupDecimals(uint8 decimals_) internal { + _decimals = decimals_; + } + + /** + * @dev Hook that is called before any transfer of tokens. This includes + * minting and burning. + * + * Calling conditions: + * + * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens + * will be to transferred to `to`. + * - when `from` is zero, `amount` tokens will be minted for `to`. + * - when `to` is zero, `amount` of ``from``'s tokens will be burned. + * - `from` and `to` are never both zero. + * + * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. + */ + function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/token/ERC20/IERC20.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/token/ERC20/IERC20.sol new file mode 100644 index 0000000000..a1f9ca7f66 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/token/ERC20/IERC20.sol @@ -0,0 +1,77 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + +/** + * @dev Interface of the ERC20 standard as defined in the EIP. + */ +interface IERC20 { + /** + * @dev Returns the amount of tokens in existence. + */ + function totalSupply() external view returns (uint256); + + /** + * @dev Returns the amount of tokens owned by `account`. + */ + function balanceOf(address account) external view returns (uint256); + + /** + * @dev Moves `amount` tokens from the caller's account to `recipient`. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * Emits a {Transfer} event. + */ + function transfer(address recipient, uint256 amount) external returns (bool); + + /** + * @dev Returns the remaining number of tokens that `spender` will be + * allowed to spend on behalf of `owner` through {transferFrom}. This is + * zero by default. + * + * This value changes when {approve} or {transferFrom} are called. + */ + function allowance(address owner, address spender) external view returns (uint256); + + /** + * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * IMPORTANT: Beware that changing an allowance with this method brings the risk + * that someone may use both the old and the new allowance by unfortunate + * transaction ordering. One possible solution to mitigate this race + * condition is to first reduce the spender's allowance to 0 and set the + * desired value afterwards: + * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 + * + * Emits an {Approval} event. + */ + function approve(address spender, uint256 amount) external returns (bool); + + /** + * @dev Moves `amount` tokens from `sender` to `recipient` using the + * allowance mechanism. `amount` is then deducted from the caller's + * allowance. + * + * Returns a boolean value indicating whether the operation succeeded. + * + * Emits a {Transfer} event. + */ + function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); + + /** + * @dev Emitted when `value` tokens are moved from one account (`from`) to + * another (`to`). + * + * Note that `value` may be zero. + */ + event Transfer(address indexed from, address indexed to, uint256 value); + + /** + * @dev Emitted when the allowance of a `spender` for an `owner` is set by + * a call to {approve}. `value` is the new allowance. + */ + event Approval(address indexed owner, address indexed spender, uint256 value); +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/token/ERC20/SafeERC20.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/token/ERC20/SafeERC20.sol new file mode 100644 index 0000000000..e5f0d23aa5 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/token/ERC20/SafeERC20.sol @@ -0,0 +1,75 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + +import "./IERC20.sol"; +import "../../math/SafeMath.sol"; +import "../../utils/Address.sol"; + +/** + * @title SafeERC20 + * @dev Wrappers around ERC20 operations that throw on failure (when the token + * contract returns false). Tokens that return no value (and instead revert or + * throw on failure) are also supported, non-reverting calls are assumed to be + * successful. + * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, + * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. + */ +library SafeERC20 { + using SafeMath for uint256; + using Address for address; + + function safeTransfer(IERC20 token, address to, uint256 value) internal { + _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); + } + + function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { + _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); + } + + /** + * @dev Deprecated. This function has issues similar to the ones found in + * {IERC20-approve}, and its usage is discouraged. + * + * Whenever possible, use {safeIncreaseAllowance} and + * {safeDecreaseAllowance} instead. + */ + function safeApprove(IERC20 token, address spender, uint256 value) internal { + // safeApprove should only be called when setting an initial allowance, + // or when resetting it to zero. To increase and decrease it, use + // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' + // solhint-disable-next-line max-line-length + require((value == 0) || (token.allowance(address(this), spender) == 0), + "SafeERC20: approve from non-zero to non-zero allowance" + ); + _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); + } + + function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { + uint256 newAllowance = token.allowance(address(this), spender).add(value); + _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); + } + + function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { + uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); + _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); + } + + /** + * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement + * on the return value: the return value is optional (but if data is returned, it must not be false). + * @param token The token targeted by the call. + * @param data The call data (encoded using abi.encode or one of its variants). + */ + function _callOptionalReturn(IERC20 token, bytes memory data) private { + // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since + // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that + // the target address contains contract code and also asserts for success in the low-level call. + + bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); + if (returndata.length > 0) { // Return data is optional + // solhint-disable-next-line max-line-length + require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); + } + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/utils/Address.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/utils/Address.sol new file mode 100644 index 0000000000..1d952cc077 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/utils/Address.sol @@ -0,0 +1,141 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.2; + +/** + * @dev Collection of functions related to the address type + */ +library Address { + /** + * @dev Returns true if `account` is a contract. + * + * [IMPORTANT] + * ==== + * It is unsafe to assume that an address for which this function returns + * false is an externally-owned account (EOA) and not a contract. + * + * Among others, `isContract` will return false for the following + * types of addresses: + * + * - an externally-owned account + * - a contract in construction + * - an address where a contract will be created + * - an address where a contract lived, but was destroyed + * ==== + */ + function isContract(address account) internal view returns (bool) { + // According to EIP-1052, 0x0 is the value returned for not-yet created accounts + // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned + // for accounts without code, i.e. `keccak256('')` + bytes32 codehash; + bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; + // solhint-disable-next-line no-inline-assembly + assembly { codehash := extcodehash(account) } + return (codehash != accountHash && codehash != 0x0); + } + + /** + * @dev Replacement for Solidity's `transfer`: sends `amount` wei to + * `recipient`, forwarding all available gas and reverting on errors. + * + * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost + * of certain opcodes, possibly making contracts go over the 2300 gas limit + * imposed by `transfer`, making them unable to receive funds via + * `transfer`. {sendValue} removes this limitation. + * + * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. + * + * IMPORTANT: because control is transferred to `recipient`, care must be + * taken to not create reentrancy vulnerabilities. Consider using + * {ReentrancyGuard} or the + * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. + */ + function sendValue(address payable recipient, uint256 amount) internal { + require(address(this).balance >= amount, "Address: insufficient balance"); + + // solhint-disable-next-line avoid-low-level-calls, avoid-call-value + (bool success, ) = recipient.call{ value: amount }(""); + require(success, "Address: unable to send value, recipient may have reverted"); + } + + /** + * @dev Performs a Solidity function call using a low level `call`. A + * plain`call` is an unsafe replacement for a function call: use this + * function instead. + * + * If `target` reverts with a revert reason, it is bubbled up by this + * function (like regular Solidity function calls). + * + * Returns the raw returned data. To convert to the expected return value, + * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. + * + * Requirements: + * + * - `target` must be a contract. + * - calling `target` with `data` must not revert. + * + * _Available since v3.1._ + */ + function functionCall(address target, bytes memory data) internal returns (bytes memory) { + return functionCall(target, data, "Address: low-level call failed"); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with + * `errorMessage` as a fallback revert reason when `target` reverts. + * + * _Available since v3.1._ + */ + function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { + return _functionCallWithValue(target, data, 0, errorMessage); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but also transferring `value` wei to `target`. + * + * Requirements: + * + * - the calling contract must have an ETH balance of at least `value`. + * - the called Solidity function must be `payable`. + * + * _Available since v3.1._ + */ + function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { + return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); + } + + /** + * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but + * with `errorMessage` as a fallback revert reason when `target` reverts. + * + * _Available since v3.1._ + */ + function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { + require(address(this).balance >= value, "Address: insufficient balance for call"); + return _functionCallWithValue(target, data, value, errorMessage); + } + + function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { + require(isContract(target), "Address: call to non-contract"); + + // solhint-disable-next-line avoid-low-level-calls + (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); + if (success) { + return returndata; + } else { + // Look for revert reason and bubble it up if present + if (returndata.length > 0) { + // The easiest way to bubble the revert reason is using memory via assembly + + // solhint-disable-next-line no-inline-assembly + assembly { + let returndata_size := mload(returndata) + revert(add(32, returndata), returndata_size) + } + } else { + revert(errorMessage); + } + } + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/utils/Pausable.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/utils/Pausable.sol new file mode 100644 index 0000000000..9e1b42ab7e --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/utils/Pausable.sol @@ -0,0 +1,90 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + +import "../GSN/Context.sol"; + +/** + * @dev Contract module which allows children to implement an emergency stop + * mechanism that can be triggered by an authorized account. + * + * This module is used through inheritance. It will make available the + * modifiers `whenNotPaused` and `whenPaused`, which can be applied to + * the functions of your contract. Note that they will not be pausable by + * simply including this module, only once the modifiers are put in place. + */ +contract Pausable is Context { + /** + * @dev Emitted when the pause is triggered by `account`. + */ + event Paused(address account); + + /** + * @dev Emitted when the pause is lifted by `account`. + */ + event Unpaused(address account); + + bool private _paused; + + /** + * @dev Initializes the contract in unpaused state. + */ + constructor () internal { + _paused = false; + } + + /** + * @dev Returns true if the contract is paused, and false otherwise. + */ + function paused() public view returns (bool) { + return _paused; + } + + /** + * @dev Modifier to make a function callable only when the contract is not paused. + * + * Requirements: + * + * - The contract must not be paused. + */ + modifier whenNotPaused() { + require(!_paused, "Pausable: paused"); + _; + } + + /** + * @dev Modifier to make a function callable only when the contract is paused. + * + * Requirements: + * + * - The contract must be paused. + */ + modifier whenPaused() { + require(_paused, "Pausable: not paused"); + _; + } + + /** + * @dev Triggers stopped state. + * + * Requirements: + * + * - The contract must not be paused. + */ + function _pause() internal virtual whenNotPaused { + _paused = true; + emit Paused(_msgSender()); + } + + /** + * @dev Returns to normal state. + * + * Requirements: + * + * - The contract must be paused. + */ + function _unpause() internal virtual whenPaused { + _paused = false; + emit Unpaused(_msgSender()); + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/utils/ReentrancyGuard.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/utils/ReentrancyGuard.sol new file mode 100644 index 0000000000..b7bea91f8d --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/@openzeppelin/contracts/utils/ReentrancyGuard.sol @@ -0,0 +1,62 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + +/** + * @dev Contract module that helps prevent reentrant calls to a function. + * + * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier + * available, which can be applied to functions to make sure there are no nested + * (reentrant) calls to them. + * + * Note that because there is a single `nonReentrant` guard, functions marked as + * `nonReentrant` may not call one another. This can be worked around by making + * those functions `private`, and then adding `external` `nonReentrant` entry + * points to them. + * + * TIP: If you would like to learn more about reentrancy and alternative ways + * to protect against it, check out our blog post + * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. + */ +contract ReentrancyGuard { + // Booleans are more expensive than uint256 or any type that takes up a full + // word because each write operation emits an extra SLOAD to first read the + // slot's contents, replace the bits taken up by the boolean, and then write + // back. This is the compiler's defense against contract upgrades and + // pointer aliasing, and it cannot be disabled. + + // The values being non-zero value makes deployment a bit more expensive, + // but in exchange the refund on every call to nonReentrant will be lower in + // amount. Since refunds are capped to a percentage of the total + // transaction's gas, it is best to keep them low in cases like this one, to + // increase the likelihood of the full refund coming into effect. + uint256 private constant _NOT_ENTERED = 1; + uint256 private constant _ENTERED = 2; + + uint256 private _status; + + constructor () internal { + _status = _NOT_ENTERED; + } + + /** + * @dev Prevents a contract from calling itself, directly or indirectly. + * Calling a `nonReentrant` function from another `nonReentrant` + * function is not supported. It is possible to prevent this from happening + * by making the `nonReentrant` function external, and make it call a + * `private` function that does the actual work. + */ + modifier nonReentrant() { + // On the first call to nonReentrant, _notEntered will be true + require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); + + // Any calls to nonReentrant after this point will fail + _status = _ENTERED; + + _; + + // By storing the original value once again, a refund is triggered (see + // https://eips.ethereum.org/EIPS/eip-2200) + _status = _NOT_ENTERED; + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/Mooniswap.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/Mooniswap.sol new file mode 100644 index 0000000000..2d665b3bd1 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/Mooniswap.sol @@ -0,0 +1,362 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + +import "@openzeppelin/contracts/math/Math.sol"; +import "@openzeppelin/contracts/math/SafeMath.sol"; +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import "./interfaces/IFeeCollector.sol"; +import "./libraries/UniERC20.sol"; +import "./libraries/Sqrt.sol"; +import "./libraries/VirtualBalance.sol"; +import "./governance/MooniswapGovernance.sol"; + + +contract Mooniswap is MooniswapGovernance { + using Sqrt for uint256; + using SafeMath for uint256; + using UniERC20 for IERC20; + using VirtualBalance for VirtualBalance.Data; + + struct Balances { + uint256 src; + uint256 dst; + } + + struct SwapVolumes { + uint128 confirmed; + uint128 result; + } + + struct Fees { + uint256 fee; + uint256 slippageFee; + } + + event Error(string reason); + + event Deposited( + address indexed sender, + address indexed receiver, + uint256 share, + uint256 token0Amount, + uint256 token1Amount + ); + + event Withdrawn( + address indexed sender, + address indexed receiver, + uint256 share, + uint256 token0Amount, + uint256 token1Amount + ); + + event Swapped( + address indexed sender, + address indexed receiver, + address indexed srcToken, + address dstToken, + uint256 amount, + uint256 result, + uint256 srcAdditionBalance, + uint256 dstRemovalBalance, + address referral + ); + + event Sync( + uint256 srcBalance, + uint256 dstBalance, + uint256 fee, + uint256 slippageFee, + uint256 referralShare, + uint256 governanceShare + ); + + uint256 private constant _BASE_SUPPLY = 1000; // Total supply on first deposit + + IERC20 public immutable token0; + IERC20 public immutable token1; + mapping(IERC20 => SwapVolumes) public volumes; + mapping(IERC20 => VirtualBalance.Data) public virtualBalancesForAddition; + mapping(IERC20 => VirtualBalance.Data) public virtualBalancesForRemoval; + + modifier whenNotShutdown { + require(mooniswapFactoryGovernance.isActive(), "Mooniswap: factory shutdown"); + _; + } + + constructor( + IERC20 _token0, + IERC20 _token1, + string memory name, + string memory symbol, + IMooniswapFactoryGovernance _mooniswapFactoryGovernance + ) + public + ERC20(name, symbol) + MooniswapGovernance(_mooniswapFactoryGovernance) + { + require(bytes(name).length > 0, "Mooniswap: name is empty"); + require(bytes(symbol).length > 0, "Mooniswap: symbol is empty"); + require(_token0 != _token1, "Mooniswap: duplicate tokens"); + token0 = _token0; + token1 = _token1; + } + + function getTokens() external view returns(IERC20[] memory tokens) { + tokens = new IERC20[](2); + tokens[0] = token0; + tokens[1] = token1; + } + + function tokens(uint256 i) external view returns(IERC20) { + if (i == 0) { + return token0; + } else if (i == 1) { + return token1; + } else { + revert("Pool has two tokens"); + } + } + + function getBalanceForAddition(IERC20 token) public view returns(uint256) { + uint256 balance = token.uniBalanceOf(address(this)); + return Math.max(virtualBalancesForAddition[token].current(decayPeriod(), balance), balance); + } + + function getBalanceForRemoval(IERC20 token) public view returns(uint256) { + uint256 balance = token.uniBalanceOf(address(this)); + return Math.min(virtualBalancesForRemoval[token].current(decayPeriod(), balance), balance); + } + + function getReturn(IERC20 src, IERC20 dst, uint256 amount) external view returns(uint256) { + return _getReturn(src, dst, amount, getBalanceForAddition(src), getBalanceForRemoval(dst), fee(), slippageFee()); + } + + function deposit(uint256[2] memory maxAmounts, uint256[2] memory minAmounts) external payable returns(uint256 fairSupply, uint256[2] memory receivedAmounts) { + return depositFor(maxAmounts, minAmounts, msg.sender); + } + + function depositFor(uint256[2] memory maxAmounts, uint256[2] memory minAmounts, address target) public payable nonReentrant returns(uint256 fairSupply, uint256[2] memory receivedAmounts) { + IERC20[2] memory _tokens = [token0, token1]; + require(msg.value == (_tokens[0].isETH() ? maxAmounts[0] : (_tokens[1].isETH() ? maxAmounts[1] : 0)), "Mooniswap: wrong value usage"); + + uint256 totalSupply = totalSupply(); + + if (totalSupply == 0) { + fairSupply = _BASE_SUPPLY.mul(99); + _mint(address(this), _BASE_SUPPLY); // Donate up to 1% + + for (uint i = 0; i < maxAmounts.length; i++) { + fairSupply = Math.max(fairSupply, maxAmounts[i]); + + require(maxAmounts[i] > 0, "Mooniswap: amount is zero"); + require(maxAmounts[i] >= minAmounts[i], "Mooniswap: minAmount not reached"); + + _tokens[i].uniTransferFrom(msg.sender, address(this), maxAmounts[i]); + receivedAmounts[i] = maxAmounts[i]; + } + } + else { + uint256[2] memory realBalances; + for (uint i = 0; i < realBalances.length; i++) { + realBalances[i] = _tokens[i].uniBalanceOf(address(this)).sub(_tokens[i].isETH() ? msg.value : 0); + } + + // Pre-compute fair supply + fairSupply = type(uint256).max; + for (uint i = 0; i < maxAmounts.length; i++) { + fairSupply = Math.min(fairSupply, totalSupply.mul(maxAmounts[i]).div(realBalances[i])); + } + + uint256 fairSupplyCached = fairSupply; + + for (uint i = 0; i < maxAmounts.length; i++) { + require(maxAmounts[i] > 0, "Mooniswap: amount is zero"); + uint256 amount = realBalances[i].mul(fairSupplyCached).add(totalSupply - 1).div(totalSupply); + require(amount >= minAmounts[i], "Mooniswap: minAmount not reached"); + + _tokens[i].uniTransferFrom(msg.sender, address(this), amount); + receivedAmounts[i] = _tokens[i].uniBalanceOf(address(this)).sub(realBalances[i]); + fairSupply = Math.min(fairSupply, totalSupply.mul(receivedAmounts[i]).div(realBalances[i])); + } + + uint256 _decayPeriod = decayPeriod(); // gas savings + for (uint i = 0; i < maxAmounts.length; i++) { + virtualBalancesForRemoval[_tokens[i]].scale(_decayPeriod, realBalances[i], totalSupply.add(fairSupply), totalSupply); + virtualBalancesForAddition[_tokens[i]].scale(_decayPeriod, realBalances[i], totalSupply.add(fairSupply), totalSupply); + } + } + + require(fairSupply > 0, "Mooniswap: result is not enough"); + _mint(target, fairSupply); + + emit Deposited(msg.sender, target, fairSupply, receivedAmounts[0], receivedAmounts[1]); + } + + function withdraw(uint256 amount, uint256[] memory minReturns) external returns(uint256[2] memory withdrawnAmounts) { + return withdrawFor(amount, minReturns, msg.sender); + } + + function withdrawFor(uint256 amount, uint256[] memory minReturns, address payable target) public nonReentrant returns(uint256[2] memory withdrawnAmounts) { + IERC20[2] memory _tokens = [token0, token1]; + + uint256 totalSupply = totalSupply(); + uint256 _decayPeriod = decayPeriod(); // gas savings + _burn(msg.sender, amount); + + for (uint i = 0; i < _tokens.length; i++) { + IERC20 token = _tokens[i]; + + uint256 preBalance = token.uniBalanceOf(address(this)); + uint256 value = preBalance.mul(amount).div(totalSupply); + token.uniTransfer(target, value); + withdrawnAmounts[i] = value; + require(i >= minReturns.length || value >= minReturns[i], "Mooniswap: result is not enough"); + + virtualBalancesForAddition[token].scale(_decayPeriod, preBalance, totalSupply.sub(amount), totalSupply); + virtualBalancesForRemoval[token].scale(_decayPeriod, preBalance, totalSupply.sub(amount), totalSupply); + } + + emit Withdrawn(msg.sender, target, amount, withdrawnAmounts[0], withdrawnAmounts[1]); + } + + function swap(IERC20 src, IERC20 dst, uint256 amount, uint256 minReturn, address referral) external payable returns(uint256 result) { + return swapFor(src, dst, amount, minReturn, referral, msg.sender); + } + + function swapFor(IERC20 src, IERC20 dst, uint256 amount, uint256 minReturn, address referral, address payable receiver) public payable nonReentrant whenNotShutdown returns(uint256 result) { + require(msg.value == (src.isETH() ? amount : 0), "Mooniswap: wrong value usage"); + + Balances memory balances = Balances({ + src: src.uniBalanceOf(address(this)).sub(src.isETH() ? msg.value : 0), + dst: dst.uniBalanceOf(address(this)) + }); + uint256 confirmed; + Balances memory virtualBalances; + Fees memory fees = Fees({ + fee: fee(), + slippageFee: slippageFee() + }); + (confirmed, result, virtualBalances) = _doTransfers(src, dst, amount, minReturn, receiver, balances, fees); + emit Swapped(msg.sender, receiver, address(src), address(dst), confirmed, result, virtualBalances.src, virtualBalances.dst, referral); + _mintRewards(confirmed, result, referral, balances, fees); + + // Overflow of uint128 is desired + volumes[src].confirmed += uint128(confirmed); + volumes[src].result += uint128(result); + } + + function _doTransfers(IERC20 src, IERC20 dst, uint256 amount, uint256 minReturn, address payable receiver, Balances memory balances, Fees memory fees) + private returns(uint256 confirmed, uint256 result, Balances memory virtualBalances) + { + uint256 _decayPeriod = decayPeriod(); + virtualBalances.src = virtualBalancesForAddition[src].current(_decayPeriod, balances.src); + virtualBalances.src = Math.max(virtualBalances.src, balances.src); + virtualBalances.dst = virtualBalancesForRemoval[dst].current(_decayPeriod, balances.dst); + virtualBalances.dst = Math.min(virtualBalances.dst, balances.dst); + src.uniTransferFrom(msg.sender, address(this), amount); + confirmed = src.uniBalanceOf(address(this)).sub(balances.src); + result = _getReturn(src, dst, confirmed, virtualBalances.src, virtualBalances.dst, fees.fee, fees.slippageFee); + require(result > 0 && result >= minReturn, "Mooniswap: return is not enough"); + dst.uniTransfer(receiver, result); + + // Update virtual balances to the same direction only at imbalanced state + if (virtualBalances.src != balances.src) { + virtualBalancesForAddition[src].set(virtualBalances.src.add(confirmed)); + } + if (virtualBalances.dst != balances.dst) { + virtualBalancesForRemoval[dst].set(virtualBalances.dst.sub(result)); + } + // Update virtual balances to the opposite direction + virtualBalancesForRemoval[src].update(_decayPeriod, balances.src); + virtualBalancesForAddition[dst].update(_decayPeriod, balances.dst); + } + + function _mintRewards(uint256 confirmed, uint256 result, address referral, Balances memory balances, Fees memory fees) private { + (uint256 referralShare, uint256 governanceShare, address govWallet, address feeCollector) = mooniswapFactoryGovernance.shareParameters(); + + uint256 refReward; + uint256 govReward; + + uint256 invariantRatio = uint256(1e36); + invariantRatio = invariantRatio.mul(balances.src.add(confirmed)).div(balances.src); + invariantRatio = invariantRatio.mul(balances.dst.sub(result)).div(balances.dst); + if (invariantRatio > 1e36) { + // calculate share only if invariant increased + invariantRatio = invariantRatio.sqrt(); + uint256 invIncrease = totalSupply().mul(invariantRatio.sub(1e18)).div(invariantRatio); + + refReward = (referral != address(0)) ? invIncrease.mul(referralShare).div(MooniswapConstants._FEE_DENOMINATOR) : 0; + govReward = (govWallet != address(0)) ? invIncrease.mul(governanceShare).div(MooniswapConstants._FEE_DENOMINATOR) : 0; + + if (feeCollector == address(0)) { + if (refReward > 0) { + _mint(referral, refReward); + } + if (govReward > 0) { + _mint(govWallet, govReward); + } + } + else if (refReward > 0 || govReward > 0) { + uint256 len = (refReward > 0 ? 1 : 0) + (govReward > 0 ? 1 : 0); + address[] memory wallets = new address[](len); + uint256[] memory rewards = new uint256[](len); + + wallets[0] = referral; + rewards[0] = refReward; + if (govReward > 0) { + wallets[len - 1] = govWallet; + rewards[len - 1] = govReward; + } + + try IFeeCollector(feeCollector).updateRewards(wallets, rewards) { + _mint(feeCollector, refReward.add(govReward)); + } + catch { + emit Error("updateRewards() failed"); + } + } + } + + emit Sync(balances.src, balances.dst, fees.fee, fees.slippageFee, refReward, govReward); + } + + /* + spot_ret = dx * y / x + uni_ret = dx * y / (x + dx) + slippage = (spot_ret - uni_ret) / spot_ret + slippage = dx * dx * y / (x * (x + dx)) / (dx * y / x) + slippage = dx / (x + dx) + ret = uni_ret * (1 - slip_fee * slippage) + ret = dx * y / (x + dx) * (1 - slip_fee * dx / (x + dx)) + ret = dx * y / (x + dx) * (x + dx - slip_fee * dx) / (x + dx) + + x = amount * denominator + dx = amount * (denominator - fee) + */ + function _getReturn(IERC20 src, IERC20 dst, uint256 amount, uint256 srcBalance, uint256 dstBalance, uint256 fee, uint256 slippageFee) internal view returns(uint256) { + if (src > dst) { + (src, dst) = (dst, src); + } + if (amount > 0 && src == token0 && dst == token1) { + uint256 taxedAmount = amount.sub(amount.mul(fee).div(MooniswapConstants._FEE_DENOMINATOR)); + uint256 srcBalancePlusTaxedAmount = srcBalance.add(taxedAmount); + uint256 ret = taxedAmount.mul(dstBalance).div(srcBalancePlusTaxedAmount); + uint256 feeNumerator = MooniswapConstants._FEE_DENOMINATOR.mul(srcBalancePlusTaxedAmount).sub(slippageFee.mul(taxedAmount)); + uint256 feeDenominator = MooniswapConstants._FEE_DENOMINATOR.mul(srcBalancePlusTaxedAmount); + return ret.mul(feeNumerator).div(feeDenominator); + } + } + + function rescueFunds(IERC20 token, uint256 amount) external nonReentrant onlyOwner { + uint256 balance0 = token0.uniBalanceOf(address(this)); + uint256 balance1 = token1.uniBalanceOf(address(this)); + + token.uniTransfer(msg.sender, amount); + + require(token0.uniBalanceOf(address(this)) >= balance0, "Mooniswap: access denied"); + require(token1.uniBalanceOf(address(this)) >= balance1, "Mooniswap: access denied"); + require(balanceOf(address(this)) >= _BASE_SUPPLY, "Mooniswap: access denied"); + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/MooniswapFactory.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/MooniswapFactory.sol new file mode 100644 index 0000000000..e218d6f30a --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/MooniswapFactory.sol @@ -0,0 +1,70 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + +import "./interfaces/IMooniswapDeployer.sol"; +import "./interfaces/IMooniswapFactory.sol"; +import "./libraries/UniERC20.sol"; +import "./Mooniswap.sol"; +import "./governance/MooniswapFactoryGovernance.sol"; + + +contract MooniswapFactory is IMooniswapFactory, MooniswapFactoryGovernance { + using UniERC20 for IERC20; + + event Deployed( + Mooniswap indexed mooniswap, + IERC20 indexed token1, + IERC20 indexed token2 + ); + + IMooniswapDeployer public immutable mooniswapDeployer; + address public immutable poolOwner; + Mooniswap[] public allPools; + mapping(Mooniswap => bool) public override isPool; + mapping(IERC20 => mapping(IERC20 => Mooniswap)) private _pools; + + constructor (address _poolOwner, IMooniswapDeployer _mooniswapDeployer, address _governanceMothership) public MooniswapFactoryGovernance(_governanceMothership) { + poolOwner = _poolOwner; + mooniswapDeployer = _mooniswapDeployer; + } + + function getAllPools() external view returns(Mooniswap[] memory) { + return allPools; + } + + function pools(IERC20 tokenA, IERC20 tokenB) external view override returns (Mooniswap pool) { + (IERC20 token1, IERC20 token2) = sortTokens(tokenA, tokenB); + return _pools[token1][token2]; + } + + function deploy(IERC20 tokenA, IERC20 tokenB) public returns(Mooniswap pool) { + require(tokenA != tokenB, "Factory: not support same tokens"); + (IERC20 token1, IERC20 token2) = sortTokens(tokenA, tokenB); + require(_pools[token1][token2] == Mooniswap(0), "Factory: pool already exists"); + + string memory symbol1 = token1.uniSymbol(); + string memory symbol2 = token2.uniSymbol(); + + pool = mooniswapDeployer.deploy( + token1, + token2, + string(abi.encodePacked("1inch Liquidity Pool (", symbol1, "-", symbol2, ")")), + string(abi.encodePacked("1LP-", symbol1, "-", symbol2)), + poolOwner + ); + + _pools[token1][token2] = pool; + allPools.push(pool); + isPool[pool] = true; + + emit Deployed(pool, token1, token2); + } + + function sortTokens(IERC20 tokenA, IERC20 tokenB) public pure returns(IERC20, IERC20) { + if (tokenA < tokenB) { + return (tokenA, tokenB); + } + return (tokenB, tokenA); + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/governance/BaseGovernanceModule.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/governance/BaseGovernanceModule.sol new file mode 100644 index 0000000000..5dd734721d --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/governance/BaseGovernanceModule.sol @@ -0,0 +1,34 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + +import "../interfaces/IGovernanceModule.sol"; + + +abstract contract BaseGovernanceModule is IGovernanceModule { + address public immutable mothership; + + modifier onlyMothership { + require(msg.sender == mothership, "Access restricted to mothership"); + + _; + } + + constructor(address _mothership) public { + mothership = _mothership; + } + + function notifyStakesChanged(address[] calldata accounts, uint256[] calldata newBalances) external override onlyMothership { + require(accounts.length == newBalances.length, "Arrays length should be equal"); + + for(uint256 i = 0; i < accounts.length; ++i) { + _notifyStakeChanged(accounts[i], newBalances[i]); + } + } + + function notifyStakeChanged(address account, uint256 newBalance) external override onlyMothership { + _notifyStakeChanged(account, newBalance); + } + + function _notifyStakeChanged(address account, uint256 newBalance) internal virtual; +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/governance/MooniswapFactoryGovernance.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/governance/MooniswapFactoryGovernance.sol new file mode 100644 index 0000000000..eac64a96fb --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/governance/MooniswapFactoryGovernance.sol @@ -0,0 +1,215 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + +import "@openzeppelin/contracts/access/Ownable.sol"; +import "@openzeppelin/contracts/utils/Pausable.sol"; +import "../interfaces/IMooniswapFactoryGovernance.sol"; +import "../libraries/ExplicitLiquidVoting.sol"; +import "../libraries/MooniswapConstants.sol"; +import "../libraries/SafeCast.sol"; +import "../utils/BalanceAccounting.sol"; +import "./BaseGovernanceModule.sol"; + + +contract MooniswapFactoryGovernance is IMooniswapFactoryGovernance, BaseGovernanceModule, BalanceAccounting, Ownable, Pausable { + using Vote for Vote.Data; + using ExplicitLiquidVoting for ExplicitLiquidVoting.Data; + using VirtualVote for VirtualVote.Data; + using SafeMath for uint256; + using SafeCast for uint256; + + event DefaultFeeVoteUpdate(address indexed user, uint256 fee, bool isDefault, uint256 amount); + event DefaultSlippageFeeVoteUpdate(address indexed user, uint256 slippageFee, bool isDefault, uint256 amount); + event DefaultDecayPeriodVoteUpdate(address indexed user, uint256 decayPeriod, bool isDefault, uint256 amount); + event ReferralShareVoteUpdate(address indexed user, uint256 referralShare, bool isDefault, uint256 amount); + event GovernanceShareVoteUpdate(address indexed user, uint256 governanceShare, bool isDefault, uint256 amount); + event GovernanceWalletUpdate(address governanceWallet); + event FeeCollectorUpdate(address feeCollector); + + ExplicitLiquidVoting.Data private _defaultFee; + ExplicitLiquidVoting.Data private _defaultSlippageFee; + ExplicitLiquidVoting.Data private _defaultDecayPeriod; + ExplicitLiquidVoting.Data private _referralShare; + ExplicitLiquidVoting.Data private _governanceShare; + address public override governanceWallet; + address public override feeCollector; + + mapping(address => bool) public override isFeeCollector; + + constructor(address _mothership) public BaseGovernanceModule(_mothership) { + _defaultFee.data.result = MooniswapConstants._DEFAULT_FEE.toUint104(); + _defaultSlippageFee.data.result = MooniswapConstants._DEFAULT_SLIPPAGE_FEE.toUint104(); + _defaultDecayPeriod.data.result = MooniswapConstants._DEFAULT_DECAY_PERIOD.toUint104(); + _referralShare.data.result = MooniswapConstants._DEFAULT_REFERRAL_SHARE.toUint104(); + _governanceShare.data.result = MooniswapConstants._DEFAULT_GOVERNANCE_SHARE.toUint104(); + } + + function shutdown() external onlyOwner { + _pause(); + } + + function isActive() external view override returns (bool) { + return !paused(); + } + + function shareParameters() external view override returns(uint256, uint256, address, address) { + return (_referralShare.data.current(), _governanceShare.data.current(), governanceWallet, feeCollector); + } + + function defaults() external view override returns(uint256, uint256, uint256) { + return (_defaultFee.data.current(), _defaultSlippageFee.data.current(), _defaultDecayPeriod.data.current()); + } + + function defaultFee() external view override returns(uint256) { + return _defaultFee.data.current(); + } + + function defaultFeeVotes(address user) external view returns(uint256) { + return _defaultFee.votes[user].get(MooniswapConstants._DEFAULT_FEE); + } + + function virtualDefaultFee() external view returns(uint104, uint104, uint48) { + return (_defaultFee.data.oldResult, _defaultFee.data.result, _defaultFee.data.time); + } + + function defaultSlippageFee() external view override returns(uint256) { + return _defaultSlippageFee.data.current(); + } + + function defaultSlippageFeeVotes(address user) external view returns(uint256) { + return _defaultSlippageFee.votes[user].get(MooniswapConstants._DEFAULT_SLIPPAGE_FEE); + } + + function virtualDefaultSlippageFee() external view returns(uint104, uint104, uint48) { + return (_defaultSlippageFee.data.oldResult, _defaultSlippageFee.data.result, _defaultSlippageFee.data.time); + } + + function defaultDecayPeriod() external view override returns(uint256) { + return _defaultDecayPeriod.data.current(); + } + + function defaultDecayPeriodVotes(address user) external view returns(uint256) { + return _defaultDecayPeriod.votes[user].get(MooniswapConstants._DEFAULT_DECAY_PERIOD); + } + + function virtualDefaultDecayPeriod() external view returns(uint104, uint104, uint48) { + return (_defaultDecayPeriod.data.oldResult, _defaultDecayPeriod.data.result, _defaultDecayPeriod.data.time); + } + + function referralShare() external view override returns(uint256) { + return _referralShare.data.current(); + } + + function referralShareVotes(address user) external view returns(uint256) { + return _referralShare.votes[user].get(MooniswapConstants._DEFAULT_REFERRAL_SHARE); + } + + function virtualReferralShare() external view returns(uint104, uint104, uint48) { + return (_referralShare.data.oldResult, _referralShare.data.result, _referralShare.data.time); + } + + function governanceShare() external view override returns(uint256) { + return _governanceShare.data.current(); + } + + function governanceShareVotes(address user) external view returns(uint256) { + return _governanceShare.votes[user].get(MooniswapConstants._DEFAULT_GOVERNANCE_SHARE); + } + + function virtualGovernanceShare() external view returns(uint104, uint104, uint48) { + return (_governanceShare.data.oldResult, _governanceShare.data.result, _governanceShare.data.time); + } + + function setGovernanceWallet(address newGovernanceWallet) external onlyOwner { + governanceWallet = newGovernanceWallet; + isFeeCollector[newGovernanceWallet] = true; + emit GovernanceWalletUpdate(newGovernanceWallet); + } + + function setFeeCollector(address newFeeCollector) external onlyOwner { + feeCollector = newFeeCollector; + isFeeCollector[newFeeCollector] = true; + emit FeeCollectorUpdate(newFeeCollector); + } + + function defaultFeeVote(uint256 vote) external { + require(vote <= MooniswapConstants._MAX_FEE, "Fee vote is too high"); + _defaultFee.updateVote(msg.sender, _defaultFee.votes[msg.sender], Vote.init(vote), balanceOf(msg.sender), MooniswapConstants._DEFAULT_FEE, _emitDefaultFeeVoteUpdate); + } + + function discardDefaultFeeVote() external { + _defaultFee.updateVote(msg.sender, _defaultFee.votes[msg.sender], Vote.init(), balanceOf(msg.sender), MooniswapConstants._DEFAULT_FEE, _emitDefaultFeeVoteUpdate); + } + + function defaultSlippageFeeVote(uint256 vote) external { + require(vote <= MooniswapConstants._MAX_SLIPPAGE_FEE, "Slippage fee vote is too high"); + _defaultSlippageFee.updateVote(msg.sender, _defaultSlippageFee.votes[msg.sender], Vote.init(vote), balanceOf(msg.sender), MooniswapConstants._DEFAULT_SLIPPAGE_FEE, _emitDefaultSlippageFeeVoteUpdate); + } + + function discardDefaultSlippageFeeVote() external { + _defaultSlippageFee.updateVote(msg.sender, _defaultSlippageFee.votes[msg.sender], Vote.init(), balanceOf(msg.sender), MooniswapConstants._DEFAULT_SLIPPAGE_FEE, _emitDefaultSlippageFeeVoteUpdate); + } + + function defaultDecayPeriodVote(uint256 vote) external { + require(vote <= MooniswapConstants._MAX_DECAY_PERIOD, "Decay period vote is too high"); + require(vote >= MooniswapConstants._MIN_DECAY_PERIOD, "Decay period vote is too low"); + _defaultDecayPeriod.updateVote(msg.sender, _defaultDecayPeriod.votes[msg.sender], Vote.init(vote), balanceOf(msg.sender), MooniswapConstants._DEFAULT_DECAY_PERIOD, _emitDefaultDecayPeriodVoteUpdate); + } + + function discardDefaultDecayPeriodVote() external { + _defaultDecayPeriod.updateVote(msg.sender, _defaultDecayPeriod.votes[msg.sender], Vote.init(), balanceOf(msg.sender), MooniswapConstants._DEFAULT_DECAY_PERIOD, _emitDefaultDecayPeriodVoteUpdate); + } + + function referralShareVote(uint256 vote) external { + require(vote <= MooniswapConstants._MAX_SHARE, "Referral share vote is too high"); + require(vote >= MooniswapConstants._MIN_REFERRAL_SHARE, "Referral share vote is too low"); + _referralShare.updateVote(msg.sender, _referralShare.votes[msg.sender], Vote.init(vote), balanceOf(msg.sender), MooniswapConstants._DEFAULT_REFERRAL_SHARE, _emitReferralShareVoteUpdate); + } + + function discardReferralShareVote() external { + _referralShare.updateVote(msg.sender, _referralShare.votes[msg.sender], Vote.init(), balanceOf(msg.sender), MooniswapConstants._DEFAULT_REFERRAL_SHARE, _emitReferralShareVoteUpdate); + } + + function governanceShareVote(uint256 vote) external { + require(vote <= MooniswapConstants._MAX_SHARE, "Gov share vote is too high"); + _governanceShare.updateVote(msg.sender, _governanceShare.votes[msg.sender], Vote.init(vote), balanceOf(msg.sender), MooniswapConstants._DEFAULT_GOVERNANCE_SHARE, _emitGovernanceShareVoteUpdate); + } + + function discardGovernanceShareVote() external { + _governanceShare.updateVote(msg.sender, _governanceShare.votes[msg.sender], Vote.init(), balanceOf(msg.sender), MooniswapConstants._DEFAULT_GOVERNANCE_SHARE, _emitGovernanceShareVoteUpdate); + } + + function _notifyStakeChanged(address account, uint256 newBalance) internal override { + uint256 balance = _set(account, newBalance); + if (newBalance == balance) { + return; + } + + _defaultFee.updateBalance(account, _defaultFee.votes[account], balance, newBalance, MooniswapConstants._DEFAULT_FEE, _emitDefaultFeeVoteUpdate); + _defaultSlippageFee.updateBalance(account, _defaultSlippageFee.votes[account], balance, newBalance, MooniswapConstants._DEFAULT_SLIPPAGE_FEE, _emitDefaultSlippageFeeVoteUpdate); + _defaultDecayPeriod.updateBalance(account, _defaultDecayPeriod.votes[account], balance, newBalance, MooniswapConstants._DEFAULT_DECAY_PERIOD, _emitDefaultDecayPeriodVoteUpdate); + _referralShare.updateBalance(account, _referralShare.votes[account], balance, newBalance, MooniswapConstants._DEFAULT_REFERRAL_SHARE, _emitReferralShareVoteUpdate); + _governanceShare.updateBalance(account, _governanceShare.votes[account], balance, newBalance, MooniswapConstants._DEFAULT_GOVERNANCE_SHARE, _emitGovernanceShareVoteUpdate); + } + + function _emitDefaultFeeVoteUpdate(address user, uint256 newDefaultFee, bool isDefault, uint256 balance) private { + emit DefaultFeeVoteUpdate(user, newDefaultFee, isDefault, balance); + } + + function _emitDefaultSlippageFeeVoteUpdate(address user, uint256 newDefaultSlippageFee, bool isDefault, uint256 balance) private { + emit DefaultSlippageFeeVoteUpdate(user, newDefaultSlippageFee, isDefault, balance); + } + + function _emitDefaultDecayPeriodVoteUpdate(address user, uint256 newDefaultDecayPeriod, bool isDefault, uint256 balance) private { + emit DefaultDecayPeriodVoteUpdate(user, newDefaultDecayPeriod, isDefault, balance); + } + + function _emitReferralShareVoteUpdate(address user, uint256 newReferralShare, bool isDefault, uint256 balance) private { + emit ReferralShareVoteUpdate(user, newReferralShare, isDefault, balance); + } + + function _emitGovernanceShareVoteUpdate(address user, uint256 newGovernanceShare, bool isDefault, uint256 balance) private { + emit GovernanceShareVoteUpdate(user, newGovernanceShare, isDefault, balance); + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/governance/MooniswapGovernance.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/governance/MooniswapGovernance.sol new file mode 100644 index 0000000000..7393ad071f --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/governance/MooniswapGovernance.sol @@ -0,0 +1,195 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + +import "@openzeppelin/contracts/access/Ownable.sol"; +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; +import "../interfaces/IMooniswapFactoryGovernance.sol"; +import "../libraries/LiquidVoting.sol"; +import "../libraries/MooniswapConstants.sol"; +import "../libraries/SafeCast.sol"; + + +abstract contract MooniswapGovernance is ERC20, Ownable, ReentrancyGuard { + using Vote for Vote.Data; + using LiquidVoting for LiquidVoting.Data; + using VirtualVote for VirtualVote.Data; + using SafeCast for uint256; + + event FeeVoteUpdate(address indexed user, uint256 fee, bool isDefault, uint256 amount); + event SlippageFeeVoteUpdate(address indexed user, uint256 slippageFee, bool isDefault, uint256 amount); + event DecayPeriodVoteUpdate(address indexed user, uint256 decayPeriod, bool isDefault, uint256 amount); + + IMooniswapFactoryGovernance public mooniswapFactoryGovernance; + LiquidVoting.Data private _fee; + LiquidVoting.Data private _slippageFee; + LiquidVoting.Data private _decayPeriod; + + constructor(IMooniswapFactoryGovernance _mooniswapFactoryGovernance) internal { + mooniswapFactoryGovernance = _mooniswapFactoryGovernance; + _fee.data.result = _mooniswapFactoryGovernance.defaultFee().toUint104(); + _slippageFee.data.result = _mooniswapFactoryGovernance.defaultSlippageFee().toUint104(); + _decayPeriod.data.result = _mooniswapFactoryGovernance.defaultDecayPeriod().toUint104(); + } + + function setMooniswapFactoryGovernance(IMooniswapFactoryGovernance newMooniswapFactoryGovernance) external onlyOwner { + mooniswapFactoryGovernance = newMooniswapFactoryGovernance; + this.discardFeeVote(); + this.discardSlippageFeeVote(); + this.discardDecayPeriodVote(); + } + + function fee() public view returns(uint256) { + return _fee.data.current(); + } + + function slippageFee() public view returns(uint256) { + return _slippageFee.data.current(); + } + + function decayPeriod() public view returns(uint256) { + return _decayPeriod.data.current(); + } + + function virtualFee() external view returns(uint104, uint104, uint48) { + return (_fee.data.oldResult, _fee.data.result, _fee.data.time); + } + + function virtualSlippageFee() external view returns(uint104, uint104, uint48) { + return (_slippageFee.data.oldResult, _slippageFee.data.result, _slippageFee.data.time); + } + + function virtualDecayPeriod() external view returns(uint104, uint104, uint48) { + return (_decayPeriod.data.oldResult, _decayPeriod.data.result, _decayPeriod.data.time); + } + + function feeVotes(address user) external view returns(uint256) { + return _fee.votes[user].get(mooniswapFactoryGovernance.defaultFee); + } + + function slippageFeeVotes(address user) external view returns(uint256) { + return _slippageFee.votes[user].get(mooniswapFactoryGovernance.defaultSlippageFee); + } + + function decayPeriodVotes(address user) external view returns(uint256) { + return _decayPeriod.votes[user].get(mooniswapFactoryGovernance.defaultDecayPeriod); + } + + function feeVote(uint256 vote) external { + require(vote <= MooniswapConstants._MAX_FEE, "Fee vote is too high"); + + _fee.updateVote(msg.sender, _fee.votes[msg.sender], Vote.init(vote), balanceOf(msg.sender), totalSupply(), mooniswapFactoryGovernance.defaultFee(), _emitFeeVoteUpdate); + } + + function slippageFeeVote(uint256 vote) external { + require(vote <= MooniswapConstants._MAX_SLIPPAGE_FEE, "Slippage fee vote is too high"); + + _slippageFee.updateVote(msg.sender, _slippageFee.votes[msg.sender], Vote.init(vote), balanceOf(msg.sender), totalSupply(), mooniswapFactoryGovernance.defaultSlippageFee(), _emitSlippageFeeVoteUpdate); + } + + function decayPeriodVote(uint256 vote) external { + require(vote <= MooniswapConstants._MAX_DECAY_PERIOD, "Decay period vote is too high"); + require(vote >= MooniswapConstants._MIN_DECAY_PERIOD, "Decay period vote is too low"); + + _decayPeriod.updateVote(msg.sender, _decayPeriod.votes[msg.sender], Vote.init(vote), balanceOf(msg.sender), totalSupply(), mooniswapFactoryGovernance.defaultDecayPeriod(), _emitDecayPeriodVoteUpdate); + } + + function discardFeeVote() external { + _fee.updateVote(msg.sender, _fee.votes[msg.sender], Vote.init(), balanceOf(msg.sender), totalSupply(), mooniswapFactoryGovernance.defaultFee(), _emitFeeVoteUpdate); + } + + function discardSlippageFeeVote() external { + _slippageFee.updateVote(msg.sender, _slippageFee.votes[msg.sender], Vote.init(), balanceOf(msg.sender), totalSupply(), mooniswapFactoryGovernance.defaultSlippageFee(), _emitSlippageFeeVoteUpdate); + } + + function discardDecayPeriodVote() external { + _decayPeriod.updateVote(msg.sender, _decayPeriod.votes[msg.sender], Vote.init(), balanceOf(msg.sender), totalSupply(), mooniswapFactoryGovernance.defaultDecayPeriod(), _emitDecayPeriodVoteUpdate); + } + + function _emitFeeVoteUpdate(address account, uint256 newFee, bool isDefault, uint256 newBalance) private { + emit FeeVoteUpdate(account, newFee, isDefault, newBalance); + } + + function _emitSlippageFeeVoteUpdate(address account, uint256 newSlippageFee, bool isDefault, uint256 newBalance) private { + emit SlippageFeeVoteUpdate(account, newSlippageFee, isDefault, newBalance); + } + + function _emitDecayPeriodVoteUpdate(address account, uint256 newDecayPeriod, bool isDefault, uint256 newBalance) private { + emit DecayPeriodVoteUpdate(account, newDecayPeriod, isDefault, newBalance); + } + + function _beforeTokenTransfer(address from, address to, uint256 amount) internal override { + if (from == to) { + // ignore transfers to self + return; + } + + IMooniswapFactoryGovernance _mooniswapFactoryGovernance = mooniswapFactoryGovernance; + bool updateFrom = !(from == address(0) || _mooniswapFactoryGovernance.isFeeCollector(from)); + bool updateTo = !(to == address(0) || _mooniswapFactoryGovernance.isFeeCollector(to)); + + if (!updateFrom && !updateTo) { + // mint to feeReceiver or burn from feeReceiver + return; + } + + uint256 balanceFrom = (from != address(0)) ? balanceOf(from) : 0; + uint256 balanceTo = (to != address(0)) ? balanceOf(to) : 0; + uint256 newTotalSupply = totalSupply() + .add(from == address(0) ? amount : 0) + .sub(to == address(0) ? amount : 0); + + ParamsHelper memory params = ParamsHelper({ + from: from, + to: to, + updateFrom: updateFrom, + updateTo: updateTo, + amount: amount, + balanceFrom: balanceFrom, + balanceTo: balanceTo, + newTotalSupply: newTotalSupply + }); + + (uint256 defaultFee, uint256 defaultSlippageFee, uint256 defaultDecayPeriod) = _mooniswapFactoryGovernance.defaults(); + + _updateOnTransfer(params, defaultFee, _emitFeeVoteUpdate, _fee); + _updateOnTransfer(params, defaultSlippageFee, _emitSlippageFeeVoteUpdate, _slippageFee); + _updateOnTransfer(params, defaultDecayPeriod, _emitDecayPeriodVoteUpdate, _decayPeriod); + } + + struct ParamsHelper { + address from; + address to; + bool updateFrom; + bool updateTo; + uint256 amount; + uint256 balanceFrom; + uint256 balanceTo; + uint256 newTotalSupply; + } + + function _updateOnTransfer( + ParamsHelper memory params, + uint256 defaultValue, + function(address, uint256, bool, uint256) internal emitEvent, + LiquidVoting.Data storage votingData + ) private { + Vote.Data memory voteFrom = votingData.votes[params.from]; + Vote.Data memory voteTo = votingData.votes[params.to]; + + if (voteFrom.isDefault() && voteTo.isDefault() && params.updateFrom && params.updateTo) { + emitEvent(params.from, voteFrom.get(defaultValue), true, params.balanceFrom.sub(params.amount)); + emitEvent(params.to, voteTo.get(defaultValue), true, params.balanceTo.add(params.amount)); + return; + } + + if (params.updateFrom) { + votingData.updateBalance(params.from, voteFrom, params.balanceFrom, params.balanceFrom.sub(params.amount), params.newTotalSupply, defaultValue, emitEvent); + } + + if (params.updateTo) { + votingData.updateBalance(params.to, voteTo, params.balanceTo, params.balanceTo.add(params.amount), params.newTotalSupply, defaultValue, emitEvent); + } + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IFeeCollector.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IFeeCollector.sol new file mode 100644 index 0000000000..6c6cd12c8a --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IFeeCollector.sol @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + + +interface IFeeCollector { + function updateReward(address receiver, uint256 amount) external; + function updateRewards(address[] calldata receivers, uint256[] calldata amounts) external; +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IGovernanceModule.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IGovernanceModule.sol new file mode 100644 index 0000000000..905da6b8fa --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IGovernanceModule.sol @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + + +interface IGovernanceModule { + function notifyStakeChanged(address account, uint256 newBalance) external; + function notifyStakesChanged(address[] calldata accounts, uint256[] calldata newBalances) external; +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IMooniswapDeployer.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IMooniswapDeployer.sol new file mode 100644 index 0000000000..15ff1e129c --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IMooniswapDeployer.sol @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + +import "../Mooniswap.sol"; + +interface IMooniswapDeployer { + function deploy( + IERC20 token1, + IERC20 token2, + string calldata name, + string calldata symbol, + address poolOwner + ) external returns(Mooniswap pool); +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IMooniswapFactory.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IMooniswapFactory.sol new file mode 100644 index 0000000000..9dbe41a868 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IMooniswapFactory.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + +import "../Mooniswap.sol"; + +interface IMooniswapFactory is IMooniswapFactoryGovernance { + function pools(IERC20 token0, IERC20 token1) external view returns (Mooniswap); + function isPool(Mooniswap mooniswap) external view returns (bool); +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IMooniswapFactoryGovernance.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IMooniswapFactoryGovernance.sol new file mode 100644 index 0000000000..1319eb1675 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/interfaces/IMooniswapFactoryGovernance.sol @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + + +interface IMooniswapFactoryGovernance { + function shareParameters() external view returns(uint256 referralShare, uint256 governanceShare, address governanceWallet, address referralFeeReceiver); + function defaults() external view returns(uint256 defaultFee, uint256 defaultSlippageFee, uint256 defaultDecayPeriod); + + function defaultFee() external view returns(uint256); + function defaultSlippageFee() external view returns(uint256); + function defaultDecayPeriod() external view returns(uint256); + function referralShare() external view returns(uint256); + function governanceShare() external view returns(uint256); + function governanceWallet() external view returns(address); + function feeCollector() external view returns(address); + + function isFeeCollector(address) external view returns(bool); + function isActive() external view returns (bool); +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/ExplicitLiquidVoting.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/ExplicitLiquidVoting.sol new file mode 100644 index 0000000000..3836d47e1d --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/ExplicitLiquidVoting.sol @@ -0,0 +1,101 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.12; + +import "@openzeppelin/contracts/math/SafeMath.sol"; +import "./SafeCast.sol"; +import "./VirtualVote.sol"; +import "./Vote.sol"; + + +library ExplicitLiquidVoting { + using SafeMath for uint256; + using SafeCast for uint256; + using Vote for Vote.Data; + using VirtualVote for VirtualVote.Data; + + struct Data { + VirtualVote.Data data; + uint256 _weightedSum; + uint256 _votedSupply; + mapping(address => Vote.Data) votes; + } + + function updateVote( + ExplicitLiquidVoting.Data storage self, + address user, + Vote.Data memory oldVote, + Vote.Data memory newVote, + uint256 balance, + uint256 defaultVote, + function(address, uint256, bool, uint256) emitEvent + ) internal { + return _update(self, user, oldVote, newVote, balance, balance, defaultVote, emitEvent); + } + + function updateBalance( + ExplicitLiquidVoting.Data storage self, + address user, + Vote.Data memory oldVote, + uint256 oldBalance, + uint256 newBalance, + uint256 defaultVote, + function(address, uint256, bool, uint256) emitEvent + ) internal { + return _update(self, user, oldVote, newBalance == 0 ? Vote.init() : oldVote, oldBalance, newBalance, defaultVote, emitEvent); + } + + function _update( + ExplicitLiquidVoting.Data storage self, + address user, + Vote.Data memory oldVote, + Vote.Data memory newVote, + uint256 oldBalance, + uint256 newBalance, + uint256 defaultVote, + function(address, uint256, bool, uint256) emitEvent + ) private { + uint256 oldWeightedSum = self._weightedSum; + uint256 newWeightedSum = oldWeightedSum; + uint256 oldVotedSupply = self._votedSupply; + uint256 newVotedSupply = oldVotedSupply; + + if (!oldVote.isDefault()) { + newWeightedSum = newWeightedSum.sub(oldBalance.mul(oldVote.get(defaultVote))); + newVotedSupply = newVotedSupply.sub(oldBalance); + } + + if (!newVote.isDefault()) { + newWeightedSum = newWeightedSum.add(newBalance.mul(newVote.get(defaultVote))); + newVotedSupply = newVotedSupply.add(newBalance); + } + + if (newWeightedSum != oldWeightedSum) { + self._weightedSum = newWeightedSum; + } + + if (newVotedSupply != oldVotedSupply) { + self._votedSupply = newVotedSupply; + } + + { + uint256 newResult = newVotedSupply == 0 ? defaultVote : newWeightedSum.div(newVotedSupply); + VirtualVote.Data memory data = self.data; + + if (newResult != data.result) { + VirtualVote.Data storage sdata = self.data; + (sdata.oldResult, sdata.result, sdata.time) = ( + data.current().toUint104(), + newResult.toUint104(), + block.timestamp.toUint48() + ); + } + } + + if (!newVote.eq(oldVote)) { + self.votes[user] = newVote; + } + + emitEvent(user, newVote.get(defaultVote), newVote.isDefault(), newBalance); + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/LiquidVoting.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/LiquidVoting.sol new file mode 100644 index 0000000000..3545d6c228 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/LiquidVoting.sol @@ -0,0 +1,106 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.12; + +import "@openzeppelin/contracts/math/SafeMath.sol"; +import "./SafeCast.sol"; +import "./VirtualVote.sol"; +import "./Vote.sol"; + + +library LiquidVoting { + using SafeMath for uint256; + using SafeCast for uint256; + using Vote for Vote.Data; + using VirtualVote for VirtualVote.Data; + + struct Data { + VirtualVote.Data data; + uint256 _weightedSum; + uint256 _defaultVotes; + mapping(address => Vote.Data) votes; + } + + function updateVote( + LiquidVoting.Data storage self, + address user, + Vote.Data memory oldVote, + Vote.Data memory newVote, + uint256 balance, + uint256 totalSupply, + uint256 defaultVote, + function(address, uint256, bool, uint256) emitEvent + ) internal { + return _update(self, user, oldVote, newVote, balance, balance, totalSupply, defaultVote, emitEvent); + } + + function updateBalance( + LiquidVoting.Data storage self, + address user, + Vote.Data memory oldVote, + uint256 oldBalance, + uint256 newBalance, + uint256 newTotalSupply, + uint256 defaultVote, + function(address, uint256, bool, uint256) emitEvent + ) internal { + return _update(self, user, oldVote, newBalance == 0 ? Vote.init() : oldVote, oldBalance, newBalance, newTotalSupply, defaultVote, emitEvent); + } + + function _update( + LiquidVoting.Data storage self, + address user, + Vote.Data memory oldVote, + Vote.Data memory newVote, + uint256 oldBalance, + uint256 newBalance, + uint256 newTotalSupply, + uint256 defaultVote, + function(address, uint256, bool, uint256) emitEvent + ) private { + uint256 oldWeightedSum = self._weightedSum; + uint256 newWeightedSum = oldWeightedSum; + uint256 oldDefaultVotes = self._defaultVotes; + uint256 newDefaultVotes = oldDefaultVotes; + + if (oldVote.isDefault()) { + newDefaultVotes = newDefaultVotes.sub(oldBalance); + } else { + newWeightedSum = newWeightedSum.sub(oldBalance.mul(oldVote.get(defaultVote))); + } + + if (newVote.isDefault()) { + newDefaultVotes = newDefaultVotes.add(newBalance); + } else { + newWeightedSum = newWeightedSum.add(newBalance.mul(newVote.get(defaultVote))); + } + + if (newWeightedSum != oldWeightedSum) { + self._weightedSum = newWeightedSum; + } + + if (newDefaultVotes != oldDefaultVotes) { + self._defaultVotes = newDefaultVotes; + } + + { + uint256 newResult = newTotalSupply == 0 ? defaultVote : newWeightedSum.add(newDefaultVotes.mul(defaultVote)).div(newTotalSupply); + VirtualVote.Data memory data = self.data; + + if (newResult != data.result) { + VirtualVote.Data storage sdata = self.data; + (sdata.oldResult, sdata.result, sdata.time) = ( + data.current().toUint104(), + newResult.toUint104(), + block.timestamp.toUint48() + ); + } + } + + if (!newVote.eq(oldVote)) { + self.votes[user] = newVote; + } + + emitEvent(user, newVote.get(defaultVote), newVote.isDefault(), newBalance); + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/MooniswapConstants.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/MooniswapConstants.sol new file mode 100644 index 0000000000..ea2d03fe66 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/MooniswapConstants.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + + +library MooniswapConstants { + uint256 internal constant _FEE_DENOMINATOR = 1e18; + + uint256 internal constant _MIN_REFERRAL_SHARE = 0.05e18; // 5% + uint256 internal constant _MIN_DECAY_PERIOD = 1 minutes; + + uint256 internal constant _MAX_FEE = 0.01e18; // 1% + uint256 internal constant _MAX_SLIPPAGE_FEE = 1e18; // 100% + uint256 internal constant _MAX_SHARE = 0.1e18; // 10% + uint256 internal constant _MAX_DECAY_PERIOD = 5 minutes; + + uint256 internal constant _DEFAULT_FEE = 0; + uint256 internal constant _DEFAULT_SLIPPAGE_FEE = 1e18; // 100% + uint256 internal constant _DEFAULT_REFERRAL_SHARE = 0.1e18; // 10% + uint256 internal constant _DEFAULT_GOVERNANCE_SHARE = 0; + uint256 internal constant _DEFAULT_DECAY_PERIOD = 1 minutes; +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/SafeCast.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/SafeCast.sol new file mode 100644 index 0000000000..ce1366e009 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/SafeCast.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + +library SafeCast { + function toUint216(uint256 value) internal pure returns (uint216) { + require(value < 2**216, "value does not fit in 216 bits"); + return uint216(value); + } + + function toUint104(uint256 value) internal pure returns (uint104) { + require(value < 2**104, "value does not fit in 104 bits"); + return uint104(value); + } + + function toUint48(uint256 value) internal pure returns (uint48) { + require(value < 2**48, "value does not fit in 48 bits"); + return uint48(value); + } + + function toUint40(uint256 value) internal pure returns (uint40) { + require(value < 2**40, "value does not fit in 40 bits"); + return uint40(value); + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/Sqrt.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/Sqrt.sol new file mode 100644 index 0000000000..3ead9afa23 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/Sqrt.sol @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + + +library Sqrt { + // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method) + function sqrt(uint256 y) internal pure returns (uint256) { + if (y > 3) { + uint256 z = y; + uint256 x = y / 2 + 1; + while (x < z) { + z = x; + x = (y / x + x) / 2; + } + return z; + } else if (y != 0) { + return 1; + } else { + return 0; + } + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/UniERC20.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/UniERC20.sol new file mode 100644 index 0000000000..e2a0de0468 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/UniERC20.sol @@ -0,0 +1,109 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + +import "@openzeppelin/contracts/math/SafeMath.sol"; +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; + + +library UniERC20 { + using SafeMath for uint256; + using SafeERC20 for IERC20; + + function isETH(IERC20 token) internal pure returns(bool) { + return (address(token) == address(0)); + } + + function uniBalanceOf(IERC20 token, address account) internal view returns (uint256) { + if (isETH(token)) { + return account.balance; + } else { + return token.balanceOf(account); + } + } + + function uniTransfer(IERC20 token, address payable to, uint256 amount) internal { + if (amount > 0) { + if (isETH(token)) { + to.transfer(amount); + } else { + token.safeTransfer(to, amount); + } + } + } + + function uniTransferFrom(IERC20 token, address payable from, address to, uint256 amount) internal { + if (amount > 0) { + if (isETH(token)) { + require(msg.value >= amount, "UniERC20: not enough value"); + require(from == msg.sender, "from is not msg.sender"); + require(to == address(this), "to is not this"); + if (msg.value > amount) { + // Return remainder if exist + from.transfer(msg.value.sub(amount)); + } + } else { + token.safeTransferFrom(from, to, amount); + } + } + } + + function uniSymbol(IERC20 token) internal view returns(string memory) { + if (isETH(token)) { + return "ETH"; + } + + (bool success, bytes memory data) = address(token).staticcall{ gas: 20000 }( + abi.encodeWithSignature("symbol()") + ); + if (!success) { + (success, data) = address(token).staticcall{ gas: 20000 }( + abi.encodeWithSignature("SYMBOL()") + ); + } + + if (success && data.length >= 96) { + (uint256 offset, uint256 len) = abi.decode(data, (uint256, uint256)); + if (offset == 0x20 && len > 0 && len <= 256) { + return string(abi.decode(data, (bytes))); + } + } + + if (success && data.length == 32) { + uint len = 0; + while (len < data.length && data[len] >= 0x20 && data[len] <= 0x7E) { + len++; + } + + if (len > 0) { + bytes memory result = new bytes(len); + for (uint i = 0; i < len; i++) { + result[i] = data[i]; + } + return string(result); + } + } + + return _toHex(address(token)); + } + + function _toHex(address account) private pure returns(string memory) { + return _toHex(abi.encodePacked(account)); + } + + function _toHex(bytes memory data) private pure returns(string memory) { + bytes memory str = new bytes(2 + data.length * 2); + str[0] = "0"; + str[1] = "x"; + uint j = 2; + for (uint i = 0; i < data.length; i++) { + uint a = uint8(data[i]) >> 4; + uint b = uint8(data[i]) & 0x0f; + str[j++] = byte(uint8(a + 48 + (a/10)*39)); + str[j++] = byte(uint8(b + 48 + (b/10)*39)); + } + + return string(str); + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/VirtualBalance.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/VirtualBalance.sol new file mode 100644 index 0000000000..5deba5a4f7 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/VirtualBalance.sol @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.12; + + +import "@openzeppelin/contracts/math/SafeMath.sol"; +import "@openzeppelin/contracts/math/Math.sol"; +import "./SafeCast.sol"; + + +library VirtualBalance { + using SafeMath for uint256; + using SafeCast for uint256; + + struct Data { + uint216 balance; + uint40 time; + } + + function set(VirtualBalance.Data storage self, uint256 balance) internal { + (self.balance, self.time) = ( + balance.toUint216(), + block.timestamp.toUint40() + ); + } + + function update(VirtualBalance.Data storage self, uint256 decayPeriod, uint256 realBalance) internal { + set(self, current(self, decayPeriod, realBalance)); + } + + function scale(VirtualBalance.Data storage self, uint256 decayPeriod, uint256 realBalance, uint256 num, uint256 denom) internal { + set(self, current(self, decayPeriod, realBalance).mul(num).add(denom.sub(1)).div(denom)); + } + + function current(VirtualBalance.Data memory self, uint256 decayPeriod, uint256 realBalance) internal view returns(uint256) { + uint256 timePassed = Math.min(decayPeriod, block.timestamp.sub(self.time)); + uint256 timeRemain = decayPeriod.sub(timePassed); + return uint256(self.balance).mul(timeRemain).add( + realBalance.mul(timePassed) + ).div(decayPeriod); + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/VirtualVote.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/VirtualVote.sol new file mode 100644 index 0000000000..7c39e3869a --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/VirtualVote.sol @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.12; + +import "@openzeppelin/contracts/math/Math.sol"; +import "@openzeppelin/contracts/math/SafeMath.sol"; + + +library VirtualVote { + using SafeMath for uint256; + + uint256 private constant _VOTE_DECAY_PERIOD = 1 days; + + struct Data { + uint104 oldResult; + uint104 result; + uint48 time; + } + + function current(VirtualVote.Data memory self) internal view returns(uint256) { + uint256 timePassed = Math.min(_VOTE_DECAY_PERIOD, block.timestamp.sub(self.time)); + uint256 timeRemain = _VOTE_DECAY_PERIOD.sub(timePassed); + return uint256(self.oldResult).mul(timeRemain).add( + uint256(self.result).mul(timePassed) + ).div(_VOTE_DECAY_PERIOD); + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/Vote.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/Vote.sol new file mode 100644 index 0000000000..2569605ce0 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/libraries/Vote.sol @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.12; + + +library Vote { + struct Data { + uint256 value; + } + + function eq(Vote.Data memory self, Vote.Data memory vote) internal pure returns(bool) { + return self.value == vote.value; + } + + function init() internal pure returns(Vote.Data memory data) { + return Vote.Data({ + value: 0 + }); + } + + function init(uint256 vote) internal pure returns(Vote.Data memory data) { + return Vote.Data({ + value: vote + 1 + }); + } + + function isDefault(Data memory self) internal pure returns(bool) { + return self.value == 0; + } + + function get(Data memory self, uint256 defaultVote) internal pure returns(uint256) { + if (self.value > 0) { + return self.value - 1; + } + return defaultVote; + } + + function get(Data memory self, function() external view returns(uint256) defaultVoteFn) internal view returns(uint256) { + if (self.value > 0) { + return self.value - 1; + } + return defaultVoteFn(); + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/utils/BalanceAccounting.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/utils/BalanceAccounting.sol new file mode 100644 index 0000000000..973fc576dc --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/utils/BalanceAccounting.sol @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.6.0; + +import "@openzeppelin/contracts/math/SafeMath.sol"; + + +contract BalanceAccounting { + using SafeMath for uint256; + + uint256 private _totalSupply; + mapping(address => uint256) private _balances; + + function totalSupply() public view returns (uint256) { + return _totalSupply; + } + + function balanceOf(address account) public view returns (uint256) { + return _balances[account]; + } + + function _mint(address account, uint256 amount) internal virtual { + _totalSupply = _totalSupply.add(amount); + _balances[account] = _balances[account].add(amount); + } + + function _burn(address account, uint256 amount) internal virtual { + _balances[account] = _balances[account].sub(amount, "Burn amount exceeds balance"); + _totalSupply = _totalSupply.sub(amount); + } + + function _set(address account, uint256 amount) internal virtual returns(uint256 oldAmount) { + oldAmount = _balances[account]; + if (oldAmount != amount) { + _balances[account] = amount; + _totalSupply = _totalSupply.add(amount).sub(oldAmount); + } + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/meta.json b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/meta.json new file mode 100644 index 0000000000..9f1b8544ea --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/meta.json @@ -0,0 +1,19 @@ +{ + "language": "Solidity", + "sources": { + "Users/k06a/Projects/mooniswap-v2/contracts/Mooniswap.sol": { + "urls": [ + "Users/k06a/Projects/mooniswap-v2/contracts/Mooniswap.sol" + ] + } + }, + "settings": { + "outputSelection": { + "*": { + "": [ + "ast" + ] + } + } + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/creator-tx-hash.txt b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/creator-tx-hash.txt new file mode 100644 index 0000000000..288647f1eb --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/creator-tx-hash.txt @@ -0,0 +1 @@ +0xd930d4ab1c87c478868f4f564696caba1e0d454ac970aeace8303a27e1963546 \ No newline at end of file diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/metadata.json b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/metadata.json new file mode 100644 index 0000000000..f8a36d6a70 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/metadata.json @@ -0,0 +1 @@ +{"compiler":{"version":"0.8.4+commit.c7e474f2"},"language":"Solidity","output":{"abi":[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DART_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_NFT_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PURCHASABLE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"pack","type":"uint16"}],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"}],"devdoc":{"kind":"dev","methods":{"approve(address,uint256)":{"details":"See {IERC721-approve}."},"balanceOf(address)":{"details":"See {IERC721-balanceOf}."},"burn(uint256)":{"details":"Burns `tokenId`. See {ERC721-_burn}. Requirements: - The caller must own `tokenId` or be an approved operator."},"getApproved(uint256)":{"details":"See {IERC721-getApproved}."},"getRoleAdmin(bytes32)":{"details":"Returns the admin role that controls `role`. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}."},"getRoleMember(bytes32,uint256)":{"details":"Returns one of the accounts that have `role`. `index` must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information."},"getRoleMemberCount(bytes32)":{"details":"Returns the number of accounts that have `role`. Can be used together with {getRoleMember} to enumerate all bearers of a role."},"grantRole(bytes32,address)":{"details":"Overload {grantRole} to track enumerable memberships"},"hasRole(bytes32,address)":{"details":"Returns `true` if `account` has been granted `role`."},"isApprovedForAll(address,address)":{"details":"See {IERC721-isApprovedForAll}."},"mint(address)":{"details":"Creates a new token for `to`. Its token ID will be automatically assigned (and available on the emitted {IERC721-Transfer} event), and the token URI autogenerated based on the base URI passed at construction. See {ERC721-_mint}. Requirements: - the caller must have the `MINTER_ROLE`."},"name()":{"details":"See {IERC721Metadata-name}."},"owner()":{"details":"Returns the address of the current owner."},"ownerOf(uint256)":{"details":"See {IERC721-ownerOf}."},"pause()":{"details":"Pauses all token transfers. See {ERC721Pausable} and {Pausable-_pause}. Requirements: - the caller must have the `PAUSER_ROLE`."},"paused()":{"details":"Returns true if the contract is paused, and false otherwise."},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."},"renounceRole(bytes32,address)":{"details":"Overload {renounceRole} to track enumerable memberships"},"revokeRole(bytes32,address)":{"details":"Overload {revokeRole} to track enumerable memberships"},"safeTransferFrom(address,address,uint256)":{"details":"See {IERC721-safeTransferFrom}."},"safeTransferFrom(address,address,uint256,bytes)":{"details":"See {IERC721-safeTransferFrom}."},"setApprovalForAll(address,bool)":{"details":"See {IERC721-setApprovalForAll}."},"supportsInterface(bytes4)":{"details":"See {IERC165-supportsInterface}."},"symbol()":{"details":"See {IERC721Metadata-symbol}."},"tokenByIndex(uint256)":{"details":"See {IERC721Enumerable-tokenByIndex}."},"tokenOfOwnerByIndex(address,uint256)":{"details":"See {IERC721Enumerable-tokenOfOwnerByIndex}."},"tokenURI(uint256)":{"details":"See {IERC721Metadata-tokenURI}."},"totalSupply()":{"details":"See {IERC721Enumerable-totalSupply}."},"transferFrom(address,address,uint256)":{"details":"See {IERC721-transferFrom}."},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."},"unpause()":{"details":"Unpauses all token transfers. See {ERC721Pausable} and {Pausable-_unpause}. Requirements: - the caller must have the `PAUSER_ROLE`."}},"version":1},"userdoc":{"kind":"user","methods":{},"version":1}},"settings":{"compilationTarget":{"contracts/Darts.sol":"Darts"},"evmVersion":"istanbul","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":false,"runs":200},"remappings":[]},"sources":{"@openzeppelin/contracts/access/AccessControl.sol":{"keccak256":"0x183481af1c40d2efb26b86f63d6fe9e22f24c87e436d60a69f261b38500e7cd6","license":"MIT","urls":["bzz-raw://f562746c399ae045994a88b2218d1238a349de07afbfb305aab0c7fdbc2954cc","dweb:/ipfs/QmYoFrDD2c6fi9CpPz1bjCMAyketjZ3G7ByUSVQMntysms"]},"@openzeppelin/contracts/access/AccessControlEnumerable.sol":{"keccak256":"0x313834fba9dbefee1df7717a5e3063ebf567d276e67bc925a03c7f8423f4c50e","license":"MIT","urls":["bzz-raw://76748567d11b8d92db337c17a705c9348ff4c4f3e0c0cd2f5f0b979de078abb6","dweb:/ipfs/QmZrc4aUrUf7GXzvs1Tsadj8Z89YqdoMN4WEaZKJq2ML3J"]},"@openzeppelin/contracts/access/IAccessControl.sol":{"keccak256":"0xfe0edb09653ed10e8a1bfe03eb9b0ff06775666eee817a95bd3d0799f1ee2b44","license":"MIT","urls":["bzz-raw://fbb9d503857eab98f87465df0f02fef03083f30c1dbec82f319f41aaadae19b4","dweb:/ipfs/QmTxDshRAMtoeM45YrTzQZdpmy4mt4scCNHjfZiWSvdETF"]},"@openzeppelin/contracts/access/IAccessControlEnumerable.sol":{"keccak256":"0x6a9a31f278ee3ed0568ab7e3c09ecb72bf92f922475a274760b4c58f87f9ad0c","license":"MIT","urls":["bzz-raw://e29a0ac0b40b9f11469a0a2a4affe2f059d2530c09bafc08d5433ee25f4c20db","dweb:/ipfs/QmbzCk1qyZxxxosAThz1fJTUjUhx3dj1VVMSQCwGtrXV8U"]},"@openzeppelin/contracts/access/Ownable.sol":{"keccak256":"0x6bb804a310218875e89d12c053e94a13a4607cdf7cc2052f3e52bd32a0dc50a1","license":"MIT","urls":["bzz-raw://b2ebbbe6d0011175bd9e7268b83de3f9c2f9d8d4cbfbaef12aff977d7d727163","dweb:/ipfs/Qmd5c7Vxtis9wzkDNhxwc6A2QT5H9xn9kfjhx7qx44vpro"]},"@openzeppelin/contracts/security/Pausable.sol":{"keccak256":"0xa35b1f2a670cd2a701a52c398032c9fed72df1909fe394d77ceacbf074e8937b","license":"MIT","urls":["bzz-raw://72b957861691ebdaa78c52834465c4f8296480fe4f1a12ba72dc6c0c8ac076dd","dweb:/ipfs/QmVz1sHCwgEivHPRDswdt9tdvky7EnWqFmbuk1wFE55VMG"]},"@openzeppelin/contracts/token/ERC721/ERC721.sol":{"keccak256":"0x7d2b8ba4b256bfcac347991b75242f9bc37f499c5236af50cf09d0b35943dc0c","license":"MIT","urls":["bzz-raw://d8eeaf6afe00229af4c232ca058bb08b7a24cc3886f0b387159ac49ffd8b5312","dweb:/ipfs/QmdnVKmDDWDvdRr6vtrxy3G6WafqA2TAhUZv1UFMsm4B4r"]},"@openzeppelin/contracts/token/ERC721/IERC721.sol":{"keccak256":"0xf101e8720213560fab41104d53b3cc7ba0456ef3a98455aa7f022391783144a0","license":"MIT","urls":["bzz-raw://3e7820bcf567e6892d937c3cb10db263a4042e446799bca602535868d822384e","dweb:/ipfs/QmPG2oeDjKncqsEeyYGjAN7CwAJmMgHterXGGnpzhha4z7"]},"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol":{"keccak256":"0xd9517254724276e2e8de3769183c1f738f445f0095c26fd9b86d3c6687e887b9","license":"MIT","urls":["bzz-raw://0e604bcdcd5e5b2fb299ad09769cde6db19d5aa1929d1b5e939234a0f10d7eb8","dweb:/ipfs/Qmd8hXE3GZfBHuWx3RNiYgFW2ci7KvHtib8DiwzJ2dgo9V"]},"@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol":{"keccak256":"0x7481c284b0ff5983d3f1784f0ceae1ec397f8c8938bc60552b19889cc057aee8","license":"MIT","urls":["bzz-raw://c834984a08e9fcb78657f3e6bc1209463581c4660fb7a0d7b785b1aec52490bc","dweb:/ipfs/Qman8u5hNWrE34xNinnSgNqMXcsyPsHh5992b4G7iM2xFX"]},"@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol":{"keccak256":"0x41dc7bf7f69c668eb98aa078c5140a4d3c3b097124ee4b6058a649ca99688300","license":"MIT","urls":["bzz-raw://621b0e2f8b95aa04707f3106f48a8c7cfab2d6fbe2dd8253e70b0b024daee683","dweb:/ipfs/QmTptvu7MJ6QcogPJUxkDEkdKm97KGTC28bhsZKu4sex4M"]},"@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol":{"keccak256":"0xe8f81ba5ba258c2a3ad5cf4c0bf6263c78e60f320bd0bc150c9de2445958c47b","license":"MIT","urls":["bzz-raw://0c64c6df28d5884d784d0b83ca067dd012dfda8c93e76e29c77c8906ab05894e","dweb:/ipfs/QmRoCfuwBaDRii84xeBFNGL1EWYX1AaAkYGVUe2y8JWP3a"]},"@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol":{"keccak256":"0xa69205e5009601cf13be78b1e2f500e1e3b1d8012f22d966e63975273f602038","license":"MIT","urls":["bzz-raw://d919a0061e43f9878f6171b7f853cb92093805cd1160858c1884195a639b40a0","dweb:/ipfs/QmRZsS3EYuLp75nBym1QQ4y6aQXGew75wSbv1uwqkvouUK"]},"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol":{"keccak256":"0xd32fb7f530a914b1083d10a6bed3a586f2451952fec04fe542bcc670a82f7ba5","license":"MIT","urls":["bzz-raw://af63ab940a34687c45f0ad84960b048fc5f49330c92ccb422db7822a444733b9","dweb:/ipfs/QmUShaQEu8HS1GjDnsMJQ8jkZEBrecn6NuDZ3pfjY1gVck"]},"@openzeppelin/contracts/token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol":{"keccak256":"0xe8d33b91c7eedd75d2bf76b67c63e0989e8e98ab08641af7026c55db7f853d95","license":"MIT","urls":["bzz-raw://33fab95215ec544ef44e47c45a954375d4d1929c8a5f99c7cb98626d7f1a0c92","dweb:/ipfs/Qmdpmua9Y4UQhUwR6EeyZwVYJJ1n4iAG1giFDgb9EXuyqd"]},"@openzeppelin/contracts/utils/Address.sol":{"keccak256":"0x3336baae5cf23e94274d75336e2d412193be508504aee185e61dc7d58cd05c8a","license":"MIT","urls":["bzz-raw://39a05eec7083dfa0cc7e0cbfe6cd1bd085a340af1ede93fdff3ad047c5fb3d8e","dweb:/ipfs/QmVApz5fCUq2QC8gKTsNNdCmcedJ3ETHp68zR5N3WUKS4r"]},"@openzeppelin/contracts/utils/Context.sol":{"keccak256":"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f","license":"MIT","urls":["bzz-raw://26e8b38a7ac8e7b4463af00cf7fff1bf48ae9875765bf4f7751e100124d0bc8c","dweb:/ipfs/QmWcsmkVr24xmmjfnBQZoemFniXjj3vwT78Cz6uqZW1Hux"]},"@openzeppelin/contracts/utils/Counters.sol":{"keccak256":"0x78450f4e3b722cce467b21e285f72ce5eaf361e9ba9dd2241a413926246773cd","license":"MIT","urls":["bzz-raw://f103065051300cd995fd4599ba91188d4071b92175b52f26110e02db091617c0","dweb:/ipfs/QmSyDz67R2HCypDE8Pacn3voVwxw9x17NM66q47YgBnGqc"]},"@openzeppelin/contracts/utils/Strings.sol":{"keccak256":"0x391d3ba97ab6856a16b225d6ee29617ad15ff00db70f3b4df1ab5ea33aa47c9d","license":"MIT","urls":["bzz-raw://d636ba90bbbeed04a1ea7fe9ec2466757e30fd38ba2ca173636dbf69a518735e","dweb:/ipfs/QmQwCB2BHnEuYR22PYt9HkpbgeFDhq4rHmaYqAZbX3WRC7"]},"@openzeppelin/contracts/utils/introspection/ERC165.sol":{"keccak256":"0x5718c5df9bd67ac68a796961df938821bb5dc0cd4c6118d77e9145afb187409b","license":"MIT","urls":["bzz-raw://d10e1d9b26042424789246603906ad06143bf9a928f4e99de8b5e3bdc662f549","dweb:/ipfs/Qmejonoaj5MLekPus229rJQHcC6E9dz2xorjHJR84fMfmn"]},"@openzeppelin/contracts/utils/introspection/IERC165.sol":{"keccak256":"0xa28007762d9da9db878dd421960c8cb9a10471f47ab5c1b3309bfe48e9e79ff4","license":"MIT","urls":["bzz-raw://796ab6e88af7bf0e78def0f059310c903af6a312b565344e0ff524a0f26e81c6","dweb:/ipfs/QmcsVgLgzWdor3UnAztUkXKNGcysm1MPneWksF72AvnwBx"]},"@openzeppelin/contracts/utils/structs/EnumerableSet.sol":{"keccak256":"0x3778dc944f4a696335878bad8beca60f38b7c79b7a0bd8ddbeb618bd502a95ae","license":"MIT","urls":["bzz-raw://12961fd593c79b60088c8829fd760db4149790b1c702411919fac76769e8c39a","dweb:/ipfs/QmXN79ZS3btSrPhiMBWtWmdwaWKjYTaAYpVMt5QHvwwKMw"]},"contracts/Darts.sol":{"keccak256":"0x5fd64f3a8ba17890111b3d5f624d9a96f578cf8172ed48c8c8f80fa8c5444ff3","license":"MIT","urls":["bzz-raw://787a4df6950de072a76df7bea98bfe8ecbb1db03023e56b2336c9c7e91247f4e","dweb:/ipfs/Qmb87nRD2yaQU6GA9KDd5CztuSxH4u5zJDjvgfnJFp4Er5"]},"hardhat/console.sol":{"keccak256":"0x72b6a1d297cd3b033d7c2e4a7e7864934bb767db6453623f1c3082c6534547f4","license":"MIT","urls":["bzz-raw://a8cb8681076e765c214e0d51cac989325f6b98e315eaae06ee0cbd5a9f084763","dweb:/ipfs/QmNWGHi4zmjxQTYN3NMGnJd49jBT5dE4bxTdWEaDuJrC6N"]}},"version":1} \ No newline at end of file diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/access/AccessControl.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/access/AccessControl.sol new file mode 100644 index 0000000000..08ab65f687 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/access/AccessControl.sol @@ -0,0 +1,210 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +import "./IAccessControl.sol"; +import "../utils/Context.sol"; +import "../utils/Strings.sol"; +import "../utils/introspection/ERC165.sol"; + +/** + * @dev Contract module that allows children to implement role-based access + * control mechanisms. This is a lightweight version that doesn't allow enumerating role + * members except through off-chain means by accessing the contract event logs. Some + * applications may benefit from on-chain enumerability, for those cases see + * {AccessControlEnumerable}. + * + * Roles are referred to by their `bytes32` identifier. These should be exposed + * in the external API and be unique. The best way to achieve this is by + * using `public constant` hash digests: + * + * ``` + * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); + * ``` + * + * Roles can be used to represent a set of permissions. To restrict access to a + * function call, use {hasRole}: + * + * ``` + * function foo() public { + * require(hasRole(MY_ROLE, msg.sender)); + * ... + * } + * ``` + * + * Roles can be granted and revoked dynamically via the {grantRole} and + * {revokeRole} functions. Each role has an associated admin role, and only + * accounts that have a role's admin role can call {grantRole} and {revokeRole}. + * + * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means + * that only accounts with this role will be able to grant or revoke other + * roles. More complex role relationships can be created by using + * {_setRoleAdmin}. + * + * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to + * grant and revoke this role. Extra precautions should be taken to secure + * accounts that have been granted it. + */ +abstract contract AccessControl is Context, IAccessControl, ERC165 { + struct RoleData { + mapping(address => bool) members; + bytes32 adminRole; + } + + mapping(bytes32 => RoleData) private _roles; + + bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; + + /** + * @dev Modifier that checks that an account has a specific role. Reverts + * with a standardized message including the required role. + * + * The format of the revert reason is given by the following regular expression: + * + * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ + * + * _Available since v4.1._ + */ + modifier onlyRole(bytes32 role) { + _checkRole(role, _msgSender()); + _; + } + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { + return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); + } + + /** + * @dev Returns `true` if `account` has been granted `role`. + */ + function hasRole(bytes32 role, address account) public view override returns (bool) { + return _roles[role].members[account]; + } + + /** + * @dev Revert with a standard message if `account` is missing `role`. + * + * The format of the revert reason is given by the following regular expression: + * + * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ + */ + function _checkRole(bytes32 role, address account) internal view { + if (!hasRole(role, account)) { + revert( + string( + abi.encodePacked( + "AccessControl: account ", + Strings.toHexString(uint160(account), 20), + " is missing role ", + Strings.toHexString(uint256(role), 32) + ) + ) + ); + } + } + + /** + * @dev Returns the admin role that controls `role`. See {grantRole} and + * {revokeRole}. + * + * To change a role's admin, use {_setRoleAdmin}. + */ + function getRoleAdmin(bytes32 role) public view override returns (bytes32) { + return _roles[role].adminRole; + } + + /** + * @dev Grants `role` to `account`. + * + * If `account` had not been already granted `role`, emits a {RoleGranted} + * event. + * + * Requirements: + * + * - the caller must have ``role``'s admin role. + */ + function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { + _grantRole(role, account); + } + + /** + * @dev Revokes `role` from `account`. + * + * If `account` had been granted `role`, emits a {RoleRevoked} event. + * + * Requirements: + * + * - the caller must have ``role``'s admin role. + */ + function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { + _revokeRole(role, account); + } + + /** + * @dev Revokes `role` from the calling account. + * + * Roles are often managed via {grantRole} and {revokeRole}: this function's + * purpose is to provide a mechanism for accounts to lose their privileges + * if they are compromised (such as when a trusted device is misplaced). + * + * If the calling account had been granted `role`, emits a {RoleRevoked} + * event. + * + * Requirements: + * + * - the caller must be `account`. + */ + function renounceRole(bytes32 role, address account) public virtual override { + require(account == _msgSender(), "AccessControl: can only renounce roles for self"); + + _revokeRole(role, account); + } + + /** + * @dev Grants `role` to `account`. + * + * If `account` had not been already granted `role`, emits a {RoleGranted} + * event. Note that unlike {grantRole}, this function doesn't perform any + * checks on the calling account. + * + * [WARNING] + * ==== + * This function should only be called from the constructor when setting + * up the initial roles for the system. + * + * Using this function in any other way is effectively circumventing the admin + * system imposed by {AccessControl}. + * ==== + */ + function _setupRole(bytes32 role, address account) internal virtual { + _grantRole(role, account); + } + + /** + * @dev Sets `adminRole` as ``role``'s admin role. + * + * Emits a {RoleAdminChanged} event. + */ + function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { + bytes32 previousAdminRole = getRoleAdmin(role); + _roles[role].adminRole = adminRole; + emit RoleAdminChanged(role, previousAdminRole, adminRole); + } + + function _grantRole(bytes32 role, address account) private { + if (!hasRole(role, account)) { + _roles[role].members[account] = true; + emit RoleGranted(role, account, _msgSender()); + } + } + + function _revokeRole(bytes32 role, address account) private { + if (hasRole(role, account)) { + _roles[role].members[account] = false; + emit RoleRevoked(role, account, _msgSender()); + } + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/access/AccessControlEnumerable.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/access/AccessControlEnumerable.sol new file mode 100644 index 0000000000..6635a40499 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/access/AccessControlEnumerable.sol @@ -0,0 +1,79 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +import "./IAccessControlEnumerable.sol"; +import "./AccessControl.sol"; +import "../utils/structs/EnumerableSet.sol"; + +/** + * @dev Extension of {AccessControl} that allows enumerating the members of each role. + */ +abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl { + using EnumerableSet for EnumerableSet.AddressSet; + + mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers; + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { + return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); + } + + /** + * @dev Returns one of the accounts that have `role`. `index` must be a + * value between 0 and {getRoleMemberCount}, non-inclusive. + * + * Role bearers are not sorted in any particular way, and their ordering may + * change at any point. + * + * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure + * you perform all queries on the same block. See the following + * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] + * for more information. + */ + function getRoleMember(bytes32 role, uint256 index) public view override returns (address) { + return _roleMembers[role].at(index); + } + + /** + * @dev Returns the number of accounts that have `role`. Can be used + * together with {getRoleMember} to enumerate all bearers of a role. + */ + function getRoleMemberCount(bytes32 role) public view override returns (uint256) { + return _roleMembers[role].length(); + } + + /** + * @dev Overload {grantRole} to track enumerable memberships + */ + function grantRole(bytes32 role, address account) public virtual override(AccessControl, IAccessControl) { + super.grantRole(role, account); + _roleMembers[role].add(account); + } + + /** + * @dev Overload {revokeRole} to track enumerable memberships + */ + function revokeRole(bytes32 role, address account) public virtual override(AccessControl, IAccessControl) { + super.revokeRole(role, account); + _roleMembers[role].remove(account); + } + + /** + * @dev Overload {renounceRole} to track enumerable memberships + */ + function renounceRole(bytes32 role, address account) public virtual override(AccessControl, IAccessControl) { + super.renounceRole(role, account); + _roleMembers[role].remove(account); + } + + /** + * @dev Overload {_setupRole} to track enumerable memberships + */ + function _setupRole(bytes32 role, address account) internal virtual override { + super._setupRole(role, account); + _roleMembers[role].add(account); + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/access/IAccessControl.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/access/IAccessControl.sol new file mode 100644 index 0000000000..4614792436 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/access/IAccessControl.sol @@ -0,0 +1,87 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +/** + * @dev External interface of AccessControl declared to support ERC165 detection. + */ +interface IAccessControl { + /** + * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` + * + * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite + * {RoleAdminChanged} not being emitted signaling this. + * + * _Available since v3.1._ + */ + event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); + + /** + * @dev Emitted when `account` is granted `role`. + * + * `sender` is the account that originated the contract call, an admin role + * bearer except when using {AccessControl-_setupRole}. + */ + event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); + + /** + * @dev Emitted when `account` is revoked `role`. + * + * `sender` is the account that originated the contract call: + * - if using `revokeRole`, it is the admin role bearer + * - if using `renounceRole`, it is the role bearer (i.e. `account`) + */ + event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); + + /** + * @dev Returns `true` if `account` has been granted `role`. + */ + function hasRole(bytes32 role, address account) external view returns (bool); + + /** + * @dev Returns the admin role that controls `role`. See {grantRole} and + * {revokeRole}. + * + * To change a role's admin, use {AccessControl-_setRoleAdmin}. + */ + function getRoleAdmin(bytes32 role) external view returns (bytes32); + + /** + * @dev Grants `role` to `account`. + * + * If `account` had not been already granted `role`, emits a {RoleGranted} + * event. + * + * Requirements: + * + * - the caller must have ``role``'s admin role. + */ + function grantRole(bytes32 role, address account) external; + + /** + * @dev Revokes `role` from `account`. + * + * If `account` had been granted `role`, emits a {RoleRevoked} event. + * + * Requirements: + * + * - the caller must have ``role``'s admin role. + */ + function revokeRole(bytes32 role, address account) external; + + /** + * @dev Revokes `role` from the calling account. + * + * Roles are often managed via {grantRole} and {revokeRole}: this function's + * purpose is to provide a mechanism for accounts to lose their privileges + * if they are compromised (such as when a trusted device is misplaced). + * + * If the calling account had been granted `role`, emits a {RoleRevoked} + * event. + * + * Requirements: + * + * - the caller must be `account`. + */ + function renounceRole(bytes32 role, address account) external; +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/access/IAccessControlEnumerable.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/access/IAccessControlEnumerable.sol new file mode 100644 index 0000000000..e4a8e9fba0 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/access/IAccessControlEnumerable.sol @@ -0,0 +1,30 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +import "./IAccessControl.sol"; + +/** + * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. + */ +interface IAccessControlEnumerable is IAccessControl { + /** + * @dev Returns one of the accounts that have `role`. `index` must be a + * value between 0 and {getRoleMemberCount}, non-inclusive. + * + * Role bearers are not sorted in any particular way, and their ordering may + * change at any point. + * + * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure + * you perform all queries on the same block. See the following + * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] + * for more information. + */ + function getRoleMember(bytes32 role, uint256 index) external view returns (address); + + /** + * @dev Returns the number of accounts that have `role`. Can be used + * together with {getRoleMember} to enumerate all bearers of a role. + */ + function getRoleMemberCount(bytes32 role) external view returns (uint256); +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/access/Ownable.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/access/Ownable.sol new file mode 100644 index 0000000000..16469d5a6b --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/access/Ownable.sol @@ -0,0 +1,71 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +import "../utils/Context.sol"; + +/** + * @dev Contract module which provides a basic access control mechanism, where + * there is an account (an owner) that can be granted exclusive access to + * specific functions. + * + * By default, the owner account will be the one that deploys the contract. This + * can later be changed with {transferOwnership}. + * + * This module is used through inheritance. It will make available the modifier + * `onlyOwner`, which can be applied to your functions to restrict their use to + * the owner. + */ +abstract contract Ownable is Context { + address private _owner; + + event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); + + /** + * @dev Initializes the contract setting the deployer as the initial owner. + */ + constructor() { + _setOwner(_msgSender()); + } + + /** + * @dev Returns the address of the current owner. + */ + function owner() public view virtual returns (address) { + return _owner; + } + + /** + * @dev Throws if called by any account other than the owner. + */ + modifier onlyOwner() { + require(owner() == _msgSender(), "Ownable: caller is not the owner"); + _; + } + + /** + * @dev Leaves the contract without owner. It will not be possible to call + * `onlyOwner` functions anymore. Can only be called by the current owner. + * + * NOTE: Renouncing ownership will leave the contract without an owner, + * thereby removing any functionality that is only available to the owner. + */ + function renounceOwnership() public virtual onlyOwner { + _setOwner(address(0)); + } + + /** + * @dev Transfers ownership of the contract to a new account (`newOwner`). + * Can only be called by the current owner. + */ + function transferOwnership(address newOwner) public virtual onlyOwner { + require(newOwner != address(0), "Ownable: new owner is the zero address"); + _setOwner(newOwner); + } + + function _setOwner(address newOwner) private { + address oldOwner = _owner; + _owner = newOwner; + emit OwnershipTransferred(oldOwner, newOwner); + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/security/Pausable.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/security/Pausable.sol new file mode 100644 index 0000000000..3c943ce4e4 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/security/Pausable.sol @@ -0,0 +1,90 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +import "../utils/Context.sol"; + +/** + * @dev Contract module which allows children to implement an emergency stop + * mechanism that can be triggered by an authorized account. + * + * This module is used through inheritance. It will make available the + * modifiers `whenNotPaused` and `whenPaused`, which can be applied to + * the functions of your contract. Note that they will not be pausable by + * simply including this module, only once the modifiers are put in place. + */ +abstract contract Pausable is Context { + /** + * @dev Emitted when the pause is triggered by `account`. + */ + event Paused(address account); + + /** + * @dev Emitted when the pause is lifted by `account`. + */ + event Unpaused(address account); + + bool private _paused; + + /** + * @dev Initializes the contract in unpaused state. + */ + constructor() { + _paused = false; + } + + /** + * @dev Returns true if the contract is paused, and false otherwise. + */ + function paused() public view virtual returns (bool) { + return _paused; + } + + /** + * @dev Modifier to make a function callable only when the contract is not paused. + * + * Requirements: + * + * - The contract must not be paused. + */ + modifier whenNotPaused() { + require(!paused(), "Pausable: paused"); + _; + } + + /** + * @dev Modifier to make a function callable only when the contract is paused. + * + * Requirements: + * + * - The contract must be paused. + */ + modifier whenPaused() { + require(paused(), "Pausable: not paused"); + _; + } + + /** + * @dev Triggers stopped state. + * + * Requirements: + * + * - The contract must not be paused. + */ + function _pause() internal virtual whenNotPaused { + _paused = true; + emit Paused(_msgSender()); + } + + /** + * @dev Returns to normal state. + * + * Requirements: + * + * - The contract must be paused. + */ + function _unpause() internal virtual whenPaused { + _paused = false; + emit Unpaused(_msgSender()); + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/ERC721.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/ERC721.sol new file mode 100644 index 0000000000..0b37218ec2 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/ERC721.sol @@ -0,0 +1,411 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +import "./IERC721.sol"; +import "./IERC721Receiver.sol"; +import "./extensions/IERC721Metadata.sol"; +import "../../utils/Address.sol"; +import "../../utils/Context.sol"; +import "../../utils/Strings.sol"; +import "../../utils/introspection/ERC165.sol"; + +/** + * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including + * the Metadata extension, but not including the Enumerable extension, which is available separately as + * {ERC721Enumerable}. + */ +contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { + using Address for address; + using Strings for uint256; + + // Token name + string private _name; + + // Token symbol + string private _symbol; + + // Mapping from token ID to owner address + mapping(uint256 => address) private _owners; + + // Mapping owner address to token count + mapping(address => uint256) private _balances; + + // Mapping from token ID to approved address + mapping(uint256 => address) private _tokenApprovals; + + // Mapping from owner to operator approvals + mapping(address => mapping(address => bool)) private _operatorApprovals; + + /** + * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. + */ + constructor(string memory name_, string memory symbol_) { + _name = name_; + _symbol = symbol_; + } + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { + return + interfaceId == type(IERC721).interfaceId || + interfaceId == type(IERC721Metadata).interfaceId || + super.supportsInterface(interfaceId); + } + + /** + * @dev See {IERC721-balanceOf}. + */ + function balanceOf(address owner) public view virtual override returns (uint256) { + require(owner != address(0), "ERC721: balance query for the zero address"); + return _balances[owner]; + } + + /** + * @dev See {IERC721-ownerOf}. + */ + function ownerOf(uint256 tokenId) public view virtual override returns (address) { + address owner = _owners[tokenId]; + require(owner != address(0), "ERC721: owner query for nonexistent token"); + return owner; + } + + /** + * @dev See {IERC721Metadata-name}. + */ + function name() public view virtual override returns (string memory) { + return _name; + } + + /** + * @dev See {IERC721Metadata-symbol}. + */ + function symbol() public view virtual override returns (string memory) { + return _symbol; + } + + /** + * @dev See {IERC721Metadata-tokenURI}. + */ + function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { + require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); + + string memory baseURI = _baseURI(); + return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; + } + + /** + * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each + * token will be the concatenation of the `baseURI` and the `tokenId`. Empty + * by default, can be overriden in child contracts. + */ + function _baseURI() internal view virtual returns (string memory) { + return ""; + } + + /** + * @dev See {IERC721-approve}. + */ + function approve(address to, uint256 tokenId) public virtual override { + address owner = ERC721.ownerOf(tokenId); + require(to != owner, "ERC721: approval to current owner"); + + require( + _msgSender() == owner || isApprovedForAll(owner, _msgSender()), + "ERC721: approve caller is not owner nor approved for all" + ); + + _approve(to, tokenId); + } + + /** + * @dev See {IERC721-getApproved}. + */ + function getApproved(uint256 tokenId) public view virtual override returns (address) { + require(_exists(tokenId), "ERC721: approved query for nonexistent token"); + + return _tokenApprovals[tokenId]; + } + + /** + * @dev See {IERC721-setApprovalForAll}. + */ + function setApprovalForAll(address operator, bool approved) public virtual override { + require(operator != _msgSender(), "ERC721: approve to caller"); + + _operatorApprovals[_msgSender()][operator] = approved; + emit ApprovalForAll(_msgSender(), operator, approved); + } + + /** + * @dev See {IERC721-isApprovedForAll}. + */ + function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { + return _operatorApprovals[owner][operator]; + } + + /** + * @dev See {IERC721-transferFrom}. + */ + function transferFrom( + address from, + address to, + uint256 tokenId + ) public virtual override { + //solhint-disable-next-line max-line-length + require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); + + _transfer(from, to, tokenId); + } + + /** + * @dev See {IERC721-safeTransferFrom}. + */ + function safeTransferFrom( + address from, + address to, + uint256 tokenId + ) public virtual override { + safeTransferFrom(from, to, tokenId, ""); + } + + /** + * @dev See {IERC721-safeTransferFrom}. + */ + function safeTransferFrom( + address from, + address to, + uint256 tokenId, + bytes memory _data + ) public virtual override { + require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); + _safeTransfer(from, to, tokenId, _data); + } + + /** + * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients + * are aware of the ERC721 protocol to prevent tokens from being forever locked. + * + * `_data` is additional data, it has no specified format and it is sent in call to `to`. + * + * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. + * implement alternative mechanisms to perform token transfer, such as signature-based. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must exist and be owned by `from`. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function _safeTransfer( + address from, + address to, + uint256 tokenId, + bytes memory _data + ) internal virtual { + _transfer(from, to, tokenId); + require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); + } + + /** + * @dev Returns whether `tokenId` exists. + * + * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. + * + * Tokens start existing when they are minted (`_mint`), + * and stop existing when they are burned (`_burn`). + */ + function _exists(uint256 tokenId) internal view virtual returns (bool) { + return _owners[tokenId] != address(0); + } + + /** + * @dev Returns whether `spender` is allowed to manage `tokenId`. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { + require(_exists(tokenId), "ERC721: operator query for nonexistent token"); + address owner = ERC721.ownerOf(tokenId); + return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); + } + + /** + * @dev Safely mints `tokenId` and transfers it to `to`. + * + * Requirements: + * + * - `tokenId` must not exist. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function _safeMint(address to, uint256 tokenId) internal virtual { + _safeMint(to, tokenId, ""); + } + + /** + * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is + * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. + */ + function _safeMint( + address to, + uint256 tokenId, + bytes memory _data + ) internal virtual { + _mint(to, tokenId); + require( + _checkOnERC721Received(address(0), to, tokenId, _data), + "ERC721: transfer to non ERC721Receiver implementer" + ); + } + + /** + * @dev Mints `tokenId` and transfers it to `to`. + * + * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible + * + * Requirements: + * + * - `tokenId` must not exist. + * - `to` cannot be the zero address. + * + * Emits a {Transfer} event. + */ + function _mint(address to, uint256 tokenId) internal virtual { + require(to != address(0), "ERC721: mint to the zero address"); + require(!_exists(tokenId), "ERC721: token already minted"); + + _beforeTokenTransfer(address(0), to, tokenId); + + _balances[to] += 1; + _owners[tokenId] = to; + + emit Transfer(address(0), to, tokenId); + } + + /** + * @dev Destroys `tokenId`. + * The approval is cleared when the token is burned. + * + * Requirements: + * + * - `tokenId` must exist. + * + * Emits a {Transfer} event. + */ + function _burn(uint256 tokenId) internal virtual { + address owner = ERC721.ownerOf(tokenId); + + _beforeTokenTransfer(owner, address(0), tokenId); + + // Clear approvals + _approve(address(0), tokenId); + + _balances[owner] -= 1; + delete _owners[tokenId]; + + emit Transfer(owner, address(0), tokenId); + } + + /** + * @dev Transfers `tokenId` from `from` to `to`. + * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. + * + * Requirements: + * + * - `to` cannot be the zero address. + * - `tokenId` token must be owned by `from`. + * + * Emits a {Transfer} event. + */ + function _transfer( + address from, + address to, + uint256 tokenId + ) internal virtual { + require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); + require(to != address(0), "ERC721: transfer to the zero address"); + + _beforeTokenTransfer(from, to, tokenId); + + // Clear approvals from the previous owner + _approve(address(0), tokenId); + + _balances[from] -= 1; + _balances[to] += 1; + _owners[tokenId] = to; + + emit Transfer(from, to, tokenId); + } + + /** + * @dev Approve `to` to operate on `tokenId` + * + * Emits a {Approval} event. + */ + function _approve(address to, uint256 tokenId) internal virtual { + _tokenApprovals[tokenId] = to; + emit Approval(ERC721.ownerOf(tokenId), to, tokenId); + } + + /** + * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. + * The call is not executed if the target address is not a contract. + * + * @param from address representing the previous owner of the given token ID + * @param to target address that will receive the tokens + * @param tokenId uint256 ID of the token to be transferred + * @param _data bytes optional data to send along with the call + * @return bool whether the call correctly returned the expected magic value + */ + function _checkOnERC721Received( + address from, + address to, + uint256 tokenId, + bytes memory _data + ) private returns (bool) { + if (to.isContract()) { + try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { + return retval == IERC721Receiver.onERC721Received.selector; + } catch (bytes memory reason) { + if (reason.length == 0) { + revert("ERC721: transfer to non ERC721Receiver implementer"); + } else { + assembly { + revert(add(32, reason), mload(reason)) + } + } + } + } else { + return true; + } + } + + /** + * @dev Hook that is called before any token transfer. This includes minting + * and burning. + * + * Calling conditions: + * + * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be + * transferred to `to`. + * - When `from` is zero, `tokenId` will be minted for `to`. + * - When `to` is zero, ``from``'s `tokenId` will be burned. + * - `from` and `to` are never both zero. + * + * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. + */ + function _beforeTokenTransfer( + address from, + address to, + uint256 tokenId + ) internal virtual {} +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/IERC721.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/IERC721.sol new file mode 100644 index 0000000000..873ec6794b --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/IERC721.sol @@ -0,0 +1,142 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +import "../../utils/introspection/IERC165.sol"; + +/** + * @dev Required interface of an ERC721 compliant contract. + */ +interface IERC721 is IERC165 { + /** + * @dev Emitted when `tokenId` token is transferred from `from` to `to`. + */ + event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); + + /** + * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. + */ + event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); + + /** + * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. + */ + event ApprovalForAll(address indexed owner, address indexed operator, bool approved); + + /** + * @dev Returns the number of tokens in ``owner``'s account. + */ + function balanceOf(address owner) external view returns (uint256 balance); + + /** + * @dev Returns the owner of the `tokenId` token. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function ownerOf(uint256 tokenId) external view returns (address owner); + + /** + * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients + * are aware of the ERC721 protocol to prevent tokens from being forever locked. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must exist and be owned by `from`. + * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function safeTransferFrom( + address from, + address to, + uint256 tokenId + ) external; + + /** + * @dev Transfers `tokenId` token from `from` to `to`. + * + * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must be owned by `from`. + * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. + * + * Emits a {Transfer} event. + */ + function transferFrom( + address from, + address to, + uint256 tokenId + ) external; + + /** + * @dev Gives permission to `to` to transfer `tokenId` token to another account. + * The approval is cleared when the token is transferred. + * + * Only a single account can be approved at a time, so approving the zero address clears previous approvals. + * + * Requirements: + * + * - The caller must own the token or be an approved operator. + * - `tokenId` must exist. + * + * Emits an {Approval} event. + */ + function approve(address to, uint256 tokenId) external; + + /** + * @dev Returns the account approved for `tokenId` token. + * + * Requirements: + * + * - `tokenId` must exist. + */ + function getApproved(uint256 tokenId) external view returns (address operator); + + /** + * @dev Approve or remove `operator` as an operator for the caller. + * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. + * + * Requirements: + * + * - The `operator` cannot be the caller. + * + * Emits an {ApprovalForAll} event. + */ + function setApprovalForAll(address operator, bool _approved) external; + + /** + * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. + * + * See {setApprovalForAll} + */ + function isApprovedForAll(address owner, address operator) external view returns (bool); + + /** + * @dev Safely transfers `tokenId` token from `from` to `to`. + * + * Requirements: + * + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * - `tokenId` token must exist and be owned by `from`. + * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. + * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. + * + * Emits a {Transfer} event. + */ + function safeTransferFrom( + address from, + address to, + uint256 tokenId, + bytes calldata data + ) external; +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol new file mode 100644 index 0000000000..9683f4a047 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +/** + * @title ERC721 token receiver interface + * @dev Interface for any contract that wants to support safeTransfers + * from ERC721 asset contracts. + */ +interface IERC721Receiver { + /** + * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} + * by `operator` from `from`, this function is called. + * + * It must return its Solidity selector to confirm the token transfer. + * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. + * + * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. + */ + function onERC721Received( + address operator, + address from, + uint256 tokenId, + bytes calldata data + ) external returns (bytes4); +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol new file mode 100644 index 0000000000..b0512f0481 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +import "../ERC721.sol"; +import "../../../utils/Context.sol"; + +/** + * @title ERC721 Burnable Token + * @dev ERC721 Token that can be irreversibly burned (destroyed). + */ +abstract contract ERC721Burnable is Context, ERC721 { + /** + * @dev Burns `tokenId`. See {ERC721-_burn}. + * + * Requirements: + * + * - The caller must own `tokenId` or be an approved operator. + */ + function burn(uint256 tokenId) public virtual { + //solhint-disable-next-line max-line-length + require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved"); + _burn(tokenId); + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol new file mode 100644 index 0000000000..d064bdd65c --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol @@ -0,0 +1,162 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +import "../ERC721.sol"; +import "./IERC721Enumerable.sol"; + +/** + * @dev This implements an optional extension of {ERC721} defined in the EIP that adds + * enumerability of all the token ids in the contract as well as all token ids owned by each + * account. + */ +abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { + // Mapping from owner to list of owned token IDs + mapping(address => mapping(uint256 => uint256)) private _ownedTokens; + + // Mapping from token ID to index of the owner tokens list + mapping(uint256 => uint256) private _ownedTokensIndex; + + // Array with all token ids, used for enumeration + uint256[] private _allTokens; + + // Mapping from token id to position in the allTokens array + mapping(uint256 => uint256) private _allTokensIndex; + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { + return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); + } + + /** + * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. + */ + function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { + require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); + return _ownedTokens[owner][index]; + } + + /** + * @dev See {IERC721Enumerable-totalSupply}. + */ + function totalSupply() public view virtual override returns (uint256) { + return _allTokens.length; + } + + /** + * @dev See {IERC721Enumerable-tokenByIndex}. + */ + function tokenByIndex(uint256 index) public view virtual override returns (uint256) { + require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); + return _allTokens[index]; + } + + /** + * @dev Hook that is called before any token transfer. This includes minting + * and burning. + * + * Calling conditions: + * + * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be + * transferred to `to`. + * - When `from` is zero, `tokenId` will be minted for `to`. + * - When `to` is zero, ``from``'s `tokenId` will be burned. + * - `from` cannot be the zero address. + * - `to` cannot be the zero address. + * + * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. + */ + function _beforeTokenTransfer( + address from, + address to, + uint256 tokenId + ) internal virtual override { + super._beforeTokenTransfer(from, to, tokenId); + + if (from == address(0)) { + _addTokenToAllTokensEnumeration(tokenId); + } else if (from != to) { + _removeTokenFromOwnerEnumeration(from, tokenId); + } + if (to == address(0)) { + _removeTokenFromAllTokensEnumeration(tokenId); + } else if (to != from) { + _addTokenToOwnerEnumeration(to, tokenId); + } + } + + /** + * @dev Private function to add a token to this extension's ownership-tracking data structures. + * @param to address representing the new owner of the given token ID + * @param tokenId uint256 ID of the token to be added to the tokens list of the given address + */ + function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { + uint256 length = ERC721.balanceOf(to); + _ownedTokens[to][length] = tokenId; + _ownedTokensIndex[tokenId] = length; + } + + /** + * @dev Private function to add a token to this extension's token tracking data structures. + * @param tokenId uint256 ID of the token to be added to the tokens list + */ + function _addTokenToAllTokensEnumeration(uint256 tokenId) private { + _allTokensIndex[tokenId] = _allTokens.length; + _allTokens.push(tokenId); + } + + /** + * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that + * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for + * gas optimizations e.g. when performing a transfer operation (avoiding double writes). + * This has O(1) time complexity, but alters the order of the _ownedTokens array. + * @param from address representing the previous owner of the given token ID + * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address + */ + function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { + // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and + // then delete the last slot (swap and pop). + + uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; + uint256 tokenIndex = _ownedTokensIndex[tokenId]; + + // When the token to delete is the last token, the swap operation is unnecessary + if (tokenIndex != lastTokenIndex) { + uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; + + _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token + _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index + } + + // This also deletes the contents at the last position of the array + delete _ownedTokensIndex[tokenId]; + delete _ownedTokens[from][lastTokenIndex]; + } + + /** + * @dev Private function to remove a token from this extension's token tracking data structures. + * This has O(1) time complexity, but alters the order of the _allTokens array. + * @param tokenId uint256 ID of the token to be removed from the tokens list + */ + function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { + // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and + // then delete the last slot (swap and pop). + + uint256 lastTokenIndex = _allTokens.length - 1; + uint256 tokenIndex = _allTokensIndex[tokenId]; + + // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so + // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding + // an 'if' statement (like in _removeTokenFromOwnerEnumeration) + uint256 lastTokenId = _allTokens[lastTokenIndex]; + + _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token + _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index + + // This also deletes the contents at the last position of the array + delete _allTokensIndex[tokenId]; + _allTokens.pop(); + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol new file mode 100644 index 0000000000..2949b3cac1 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +import "../ERC721.sol"; +import "../../../security/Pausable.sol"; + +/** + * @dev ERC721 token with pausable token transfers, minting and burning. + * + * Useful for scenarios such as preventing trades until the end of an evaluation + * period, or having an emergency switch for freezing all token transfers in the + * event of a large bug. + */ +abstract contract ERC721Pausable is ERC721, Pausable { + /** + * @dev See {ERC721-_beforeTokenTransfer}. + * + * Requirements: + * + * - the contract must not be paused. + */ + function _beforeTokenTransfer( + address from, + address to, + uint256 tokenId + ) internal virtual override { + super._beforeTokenTransfer(from, to, tokenId); + + require(!paused(), "ERC721Pausable: token transfer while paused"); + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol new file mode 100644 index 0000000000..c04295ba10 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +import "../IERC721.sol"; + +/** + * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension + * @dev See https://eips.ethereum.org/EIPS/eip-721 + */ +interface IERC721Enumerable is IERC721 { + /** + * @dev Returns the total amount of tokens stored by the contract. + */ + function totalSupply() external view returns (uint256); + + /** + * @dev Returns a token ID owned by `owner` at a given `index` of its token list. + * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. + */ + function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); + + /** + * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. + * Use along with {totalSupply} to enumerate all tokens. + */ + function tokenByIndex(uint256 index) external view returns (uint256); +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol new file mode 100644 index 0000000000..cb9af00334 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +import "../IERC721.sol"; + +/** + * @title ERC-721 Non-Fungible Token Standard, optional metadata extension + * @dev See https://eips.ethereum.org/EIPS/eip-721 + */ +interface IERC721Metadata is IERC721 { + /** + * @dev Returns the token collection name. + */ + function name() external view returns (string memory); + + /** + * @dev Returns the token collection symbol. + */ + function symbol() external view returns (string memory); + + /** + * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. + */ + function tokenURI(uint256 tokenId) external view returns (string memory); +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol new file mode 100644 index 0000000000..c231765354 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol @@ -0,0 +1,136 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +import "../ERC721.sol"; +import "../extensions/ERC721Enumerable.sol"; +import "../extensions/ERC721Burnable.sol"; +import "../extensions/ERC721Pausable.sol"; +import "../../../access/AccessControlEnumerable.sol"; +import "../../../utils/Context.sol"; +import "../../../utils/Counters.sol"; + +/** + * @dev {ERC721} token, including: + * + * - ability for holders to burn (destroy) their tokens + * - a minter role that allows for token minting (creation) + * - a pauser role that allows to stop all token transfers + * - token ID and URI autogeneration + * + * This contract uses {AccessControl} to lock permissioned functions using the + * different roles - head to its documentation for details. + * + * The account that deploys the contract will be granted the minter and pauser + * roles, as well as the default admin role, which will let it grant both minter + * and pauser roles to other accounts. + */ +contract ERC721PresetMinterPauserAutoId is + Context, + AccessControlEnumerable, + ERC721Enumerable, + ERC721Burnable, + ERC721Pausable +{ + using Counters for Counters.Counter; + + bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); + bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); + + Counters.Counter private _tokenIdTracker; + + string private _baseTokenURI; + + /** + * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the + * account that deploys the contract. + * + * Token URIs will be autogenerated based on `baseURI` and their token IDs. + * See {ERC721-tokenURI}. + */ + constructor( + string memory name, + string memory symbol, + string memory baseTokenURI + ) ERC721(name, symbol) { + _baseTokenURI = baseTokenURI; + + _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); + + _setupRole(MINTER_ROLE, _msgSender()); + _setupRole(PAUSER_ROLE, _msgSender()); + } + + function _baseURI() internal view virtual override returns (string memory) { + return _baseTokenURI; + } + + /** + * @dev Creates a new token for `to`. Its token ID will be automatically + * assigned (and available on the emitted {IERC721-Transfer} event), and the token + * URI autogenerated based on the base URI passed at construction. + * + * See {ERC721-_mint}. + * + * Requirements: + * + * - the caller must have the `MINTER_ROLE`. + */ + function mint(address to) public virtual { + require(hasRole(MINTER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have minter role to mint"); + + // We cannot just use balanceOf to create the new tokenId because tokens + // can be burned (destroyed), so we need a separate counter. + _mint(to, _tokenIdTracker.current()); + _tokenIdTracker.increment(); + } + + /** + * @dev Pauses all token transfers. + * + * See {ERC721Pausable} and {Pausable-_pause}. + * + * Requirements: + * + * - the caller must have the `PAUSER_ROLE`. + */ + function pause() public virtual { + require(hasRole(PAUSER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have pauser role to pause"); + _pause(); + } + + /** + * @dev Unpauses all token transfers. + * + * See {ERC721Pausable} and {Pausable-_unpause}. + * + * Requirements: + * + * - the caller must have the `PAUSER_ROLE`. + */ + function unpause() public virtual { + require(hasRole(PAUSER_ROLE, _msgSender()), "ERC721PresetMinterPauserAutoId: must have pauser role to unpause"); + _unpause(); + } + + function _beforeTokenTransfer( + address from, + address to, + uint256 tokenId + ) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) { + super._beforeTokenTransfer(from, to, tokenId); + } + + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) + public + view + virtual + override(AccessControlEnumerable, ERC721, ERC721Enumerable) + returns (bool) + { + return super.supportsInterface(interfaceId); + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/utils/Address.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/utils/Address.sol new file mode 100644 index 0000000000..0bb4a55e22 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/utils/Address.sol @@ -0,0 +1,216 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +/** + * @dev Collection of functions related to the address type + */ +library Address { + /** + * @dev Returns true if `account` is a contract. + * + * [IMPORTANT] + * ==== + * It is unsafe to assume that an address for which this function returns + * false is an externally-owned account (EOA) and not a contract. + * + * Among others, `isContract` will return false for the following + * types of addresses: + * + * - an externally-owned account + * - a contract in construction + * - an address where a contract will be created + * - an address where a contract lived, but was destroyed + * ==== + */ + function isContract(address account) internal view returns (bool) { + // This method relies on extcodesize, which returns 0 for contracts in + // construction, since the code is only stored at the end of the + // constructor execution. + + uint256 size; + assembly { + size := extcodesize(account) + } + return size > 0; + } + + /** + * @dev Replacement for Solidity's `transfer`: sends `amount` wei to + * `recipient`, forwarding all available gas and reverting on errors. + * + * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost + * of certain opcodes, possibly making contracts go over the 2300 gas limit + * imposed by `transfer`, making them unable to receive funds via + * `transfer`. {sendValue} removes this limitation. + * + * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. + * + * IMPORTANT: because control is transferred to `recipient`, care must be + * taken to not create reentrancy vulnerabilities. Consider using + * {ReentrancyGuard} or the + * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. + */ + function sendValue(address payable recipient, uint256 amount) internal { + require(address(this).balance >= amount, "Address: insufficient balance"); + + (bool success, ) = recipient.call{value: amount}(""); + require(success, "Address: unable to send value, recipient may have reverted"); + } + + /** + * @dev Performs a Solidity function call using a low level `call`. A + * plain `call` is an unsafe replacement for a function call: use this + * function instead. + * + * If `target` reverts with a revert reason, it is bubbled up by this + * function (like regular Solidity function calls). + * + * Returns the raw returned data. To convert to the expected return value, + * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. + * + * Requirements: + * + * - `target` must be a contract. + * - calling `target` with `data` must not revert. + * + * _Available since v3.1._ + */ + function functionCall(address target, bytes memory data) internal returns (bytes memory) { + return functionCall(target, data, "Address: low-level call failed"); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with + * `errorMessage` as a fallback revert reason when `target` reverts. + * + * _Available since v3.1._ + */ + function functionCall( + address target, + bytes memory data, + string memory errorMessage + ) internal returns (bytes memory) { + return functionCallWithValue(target, data, 0, errorMessage); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but also transferring `value` wei to `target`. + * + * Requirements: + * + * - the calling contract must have an ETH balance of at least `value`. + * - the called Solidity function must be `payable`. + * + * _Available since v3.1._ + */ + function functionCallWithValue( + address target, + bytes memory data, + uint256 value + ) internal returns (bytes memory) { + return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); + } + + /** + * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but + * with `errorMessage` as a fallback revert reason when `target` reverts. + * + * _Available since v3.1._ + */ + function functionCallWithValue( + address target, + bytes memory data, + uint256 value, + string memory errorMessage + ) internal returns (bytes memory) { + require(address(this).balance >= value, "Address: insufficient balance for call"); + require(isContract(target), "Address: call to non-contract"); + + (bool success, bytes memory returndata) = target.call{value: value}(data); + return verifyCallResult(success, returndata, errorMessage); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but performing a static call. + * + * _Available since v3.3._ + */ + function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { + return functionStaticCall(target, data, "Address: low-level static call failed"); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], + * but performing a static call. + * + * _Available since v3.3._ + */ + function functionStaticCall( + address target, + bytes memory data, + string memory errorMessage + ) internal view returns (bytes memory) { + require(isContract(target), "Address: static call to non-contract"); + + (bool success, bytes memory returndata) = target.staticcall(data); + return verifyCallResult(success, returndata, errorMessage); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], + * but performing a delegate call. + * + * _Available since v3.4._ + */ + function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { + return functionDelegateCall(target, data, "Address: low-level delegate call failed"); + } + + /** + * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], + * but performing a delegate call. + * + * _Available since v3.4._ + */ + function functionDelegateCall( + address target, + bytes memory data, + string memory errorMessage + ) internal returns (bytes memory) { + require(isContract(target), "Address: delegate call to non-contract"); + + (bool success, bytes memory returndata) = target.delegatecall(data); + return verifyCallResult(success, returndata, errorMessage); + } + + /** + * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the + * revert reason using the provided one. + * + * _Available since v4.3._ + */ + function verifyCallResult( + bool success, + bytes memory returndata, + string memory errorMessage + ) internal pure returns (bytes memory) { + if (success) { + return returndata; + } else { + // Look for revert reason and bubble it up if present + if (returndata.length > 0) { + // The easiest way to bubble the revert reason is using memory via assembly + + assembly { + let returndata_size := mload(returndata) + revert(add(32, returndata), returndata_size) + } + } else { + revert(errorMessage); + } + } + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/utils/Context.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/utils/Context.sol new file mode 100644 index 0000000000..d03dc5f456 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/utils/Context.sol @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +/** + * @dev Provides information about the current execution context, including the + * sender of the transaction and its data. While these are generally available + * via msg.sender and msg.data, they should not be accessed in such a direct + * manner, since when dealing with meta-transactions the account sending and + * paying for execution may not be the actual sender (as far as an application + * is concerned). + * + * This contract is only required for intermediate, library-like contracts. + */ +abstract contract Context { + function _msgSender() internal view virtual returns (address) { + return msg.sender; + } + + function _msgData() internal view virtual returns (bytes calldata) { + return msg.data; + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/utils/Counters.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/utils/Counters.sol new file mode 100644 index 0000000000..624055ce40 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/utils/Counters.sol @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +/** + * @title Counters + * @author Matt Condon (@shrugs) + * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number + * of elements in a mapping, issuing ERC721 ids, or counting request ids. + * + * Include with `using Counters for Counters.Counter;` + */ +library Counters { + struct Counter { + // This variable should never be directly accessed by users of the library: interactions must be restricted to + // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add + // this feature: see https://github.com/ethereum/solidity/issues/4637 + uint256 _value; // default: 0 + } + + function current(Counter storage counter) internal view returns (uint256) { + return counter._value; + } + + function increment(Counter storage counter) internal { + unchecked { + counter._value += 1; + } + } + + function decrement(Counter storage counter) internal { + uint256 value = counter._value; + require(value > 0, "Counter: decrement overflow"); + unchecked { + counter._value = value - 1; + } + } + + function reset(Counter storage counter) internal { + counter._value = 0; + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/utils/Strings.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/utils/Strings.sol new file mode 100644 index 0000000000..8f3d41e7c9 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/utils/Strings.sol @@ -0,0 +1,66 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +/** + * @dev String operations. + */ +library Strings { + bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; + + /** + * @dev Converts a `uint256` to its ASCII `string` decimal representation. + */ + function toString(uint256 value) internal pure returns (string memory) { + // Inspired by OraclizeAPI's implementation - MIT licence + // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol + + if (value == 0) { + return "0"; + } + uint256 temp = value; + uint256 digits; + while (temp != 0) { + digits++; + temp /= 10; + } + bytes memory buffer = new bytes(digits); + while (value != 0) { + digits -= 1; + buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); + value /= 10; + } + return string(buffer); + } + + /** + * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. + */ + function toHexString(uint256 value) internal pure returns (string memory) { + if (value == 0) { + return "0x00"; + } + uint256 temp = value; + uint256 length = 0; + while (temp != 0) { + length++; + temp >>= 8; + } + return toHexString(value, length); + } + + /** + * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. + */ + function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { + bytes memory buffer = new bytes(2 * length + 2); + buffer[0] = "0"; + buffer[1] = "x"; + for (uint256 i = 2 * length + 1; i > 1; --i) { + buffer[i] = _HEX_SYMBOLS[value & 0xf]; + value >>= 4; + } + require(value == 0, "Strings: hex length insufficient"); + return string(buffer); + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/utils/introspection/ERC165.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/utils/introspection/ERC165.sol new file mode 100644 index 0000000000..fc9b52f1f7 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/utils/introspection/ERC165.sol @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +import "./IERC165.sol"; + +/** + * @dev Implementation of the {IERC165} interface. + * + * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check + * for the additional interface id that will be supported. For example: + * + * ```solidity + * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { + * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); + * } + * ``` + * + * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. + */ +abstract contract ERC165 is IERC165 { + /** + * @dev See {IERC165-supportsInterface}. + */ + function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { + return interfaceId == type(IERC165).interfaceId; + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/utils/introspection/IERC165.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/utils/introspection/IERC165.sol new file mode 100644 index 0000000000..01c9c08649 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/utils/introspection/IERC165.sol @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +/** + * @dev Interface of the ERC165 standard, as defined in the + * https://eips.ethereum.org/EIPS/eip-165[EIP]. + * + * Implementers can declare support of contract interfaces, which can then be + * queried by others ({ERC165Checker}). + * + * For an implementation, see {ERC165}. + */ +interface IERC165 { + /** + * @dev Returns true if this contract implements the interface defined by + * `interfaceId`. See the corresponding + * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] + * to learn more about how these ids are created. + * + * This function call must use less than 30 000 gas. + */ + function supportsInterface(bytes4 interfaceId) external view returns (bool); +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/utils/structs/EnumerableSet.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/utils/structs/EnumerableSet.sol new file mode 100644 index 0000000000..e3cf13f12e --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/@openzeppelin/contracts/utils/structs/EnumerableSet.sol @@ -0,0 +1,356 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +/** + * @dev Library for managing + * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive + * types. + * + * Sets have the following properties: + * + * - Elements are added, removed, and checked for existence in constant time + * (O(1)). + * - Elements are enumerated in O(n). No guarantees are made on the ordering. + * + * ``` + * contract Example { + * // Add the library methods + * using EnumerableSet for EnumerableSet.AddressSet; + * + * // Declare a set state variable + * EnumerableSet.AddressSet private mySet; + * } + * ``` + * + * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) + * and `uint256` (`UintSet`) are supported. + */ +library EnumerableSet { + // To implement this library for multiple types with as little code + // repetition as possible, we write it in terms of a generic Set type with + // bytes32 values. + // The Set implementation uses private functions, and user-facing + // implementations (such as AddressSet) are just wrappers around the + // underlying Set. + // This means that we can only create new EnumerableSets for types that fit + // in bytes32. + + struct Set { + // Storage of set values + bytes32[] _values; + // Position of the value in the `values` array, plus 1 because index 0 + // means a value is not in the set. + mapping(bytes32 => uint256) _indexes; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function _add(Set storage set, bytes32 value) private returns (bool) { + if (!_contains(set, value)) { + set._values.push(value); + // The value is stored at length-1, but we add 1 to all indexes + // and use 0 as a sentinel value + set._indexes[value] = set._values.length; + return true; + } else { + return false; + } + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function _remove(Set storage set, bytes32 value) private returns (bool) { + // We read and store the value's index to prevent multiple reads from the same storage slot + uint256 valueIndex = set._indexes[value]; + + if (valueIndex != 0) { + // Equivalent to contains(set, value) + // To delete an element from the _values array in O(1), we swap the element to delete with the last one in + // the array, and then remove the last element (sometimes called as 'swap and pop'). + // This modifies the order of the array, as noted in {at}. + + uint256 toDeleteIndex = valueIndex - 1; + uint256 lastIndex = set._values.length - 1; + + if (lastIndex != toDeleteIndex) { + bytes32 lastvalue = set._values[lastIndex]; + + // Move the last value to the index where the value to delete is + set._values[toDeleteIndex] = lastvalue; + // Update the index for the moved value + set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex + } + + // Delete the slot where the moved value was stored + set._values.pop(); + + // Delete the index for the deleted slot + delete set._indexes[value]; + + return true; + } else { + return false; + } + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function _contains(Set storage set, bytes32 value) private view returns (bool) { + return set._indexes[value] != 0; + } + + /** + * @dev Returns the number of values on the set. O(1). + */ + function _length(Set storage set) private view returns (uint256) { + return set._values.length; + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function _at(Set storage set, uint256 index) private view returns (bytes32) { + return set._values[index]; + } + + /** + * @dev Return the entire set in an array + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function _values(Set storage set) private view returns (bytes32[] memory) { + return set._values; + } + + // Bytes32Set + + struct Bytes32Set { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { + return _add(set._inner, value); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { + return _remove(set._inner, value); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { + return _contains(set._inner, value); + } + + /** + * @dev Returns the number of values in the set. O(1). + */ + function length(Bytes32Set storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { + return _at(set._inner, index); + } + + /** + * @dev Return the entire set in an array + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { + return _values(set._inner); + } + + // AddressSet + + struct AddressSet { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(AddressSet storage set, address value) internal returns (bool) { + return _add(set._inner, bytes32(uint256(uint160(value)))); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(AddressSet storage set, address value) internal returns (bool) { + return _remove(set._inner, bytes32(uint256(uint160(value)))); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(AddressSet storage set, address value) internal view returns (bool) { + return _contains(set._inner, bytes32(uint256(uint160(value)))); + } + + /** + * @dev Returns the number of values in the set. O(1). + */ + function length(AddressSet storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(AddressSet storage set, uint256 index) internal view returns (address) { + return address(uint160(uint256(_at(set._inner, index)))); + } + + /** + * @dev Return the entire set in an array + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function values(AddressSet storage set) internal view returns (address[] memory) { + bytes32[] memory store = _values(set._inner); + address[] memory result; + + assembly { + result := store + } + + return result; + } + + // UintSet + + struct UintSet { + Set _inner; + } + + /** + * @dev Add a value to a set. O(1). + * + * Returns true if the value was added to the set, that is if it was not + * already present. + */ + function add(UintSet storage set, uint256 value) internal returns (bool) { + return _add(set._inner, bytes32(value)); + } + + /** + * @dev Removes a value from a set. O(1). + * + * Returns true if the value was removed from the set, that is if it was + * present. + */ + function remove(UintSet storage set, uint256 value) internal returns (bool) { + return _remove(set._inner, bytes32(value)); + } + + /** + * @dev Returns true if the value is in the set. O(1). + */ + function contains(UintSet storage set, uint256 value) internal view returns (bool) { + return _contains(set._inner, bytes32(value)); + } + + /** + * @dev Returns the number of values on the set. O(1). + */ + function length(UintSet storage set) internal view returns (uint256) { + return _length(set._inner); + } + + /** + * @dev Returns the value stored at position `index` in the set. O(1). + * + * Note that there are no guarantees on the ordering of values inside the + * array, and it may change when more values are added or removed. + * + * Requirements: + * + * - `index` must be strictly less than {length}. + */ + function at(UintSet storage set, uint256 index) internal view returns (uint256) { + return uint256(_at(set._inner, index)); + } + + /** + * @dev Return the entire set in an array + * + * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed + * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that + * this function has an unbounded cost, and using it as part of a state-changing function may render the function + * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. + */ + function values(UintSet storage set) internal view returns (uint256[] memory) { + bytes32[] memory store = _values(set._inner); + uint256[] memory result; + + assembly { + result := store + } + + return result; + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/contracts/Darts.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/contracts/Darts.sol new file mode 100644 index 0000000000..ef53e5ee3a --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/contracts/Darts.sol @@ -0,0 +1,77 @@ +//SPDX-License-Identifier: MIT +// _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ _____ +// /\ \ /\ \ /\ \ /\ \ /\ \ /\ \ /\ \ /\ \ /\ \ /\ \ /\ \ /\ \ /\ \ /\ \ /\ \ +// /::\ \ /::\ \ /::\ \ /::\ \ /::\ \ /::\ \ /::\ \ /::\ \ /::\ \ /::\ \ /::\ \ /::\ \ /::\ \ /::\ \ /::\ \ +// /::::\ \ /::::\ \ /::::\ \ \:::\ \ /::::\ \ /::::\ \ \:::\ \ /::::\ \ /::::\ \ /::::\ \ \:::\ \ /::::\ \ /::::\ \ /::::\ \ \:::\ \ +// /::::::\ \ /::::::\ \ /::::::\ \ \:::\ \ /::::::\ \ /::::::\ \ \:::\ \ /::::::\ \ /::::::\ \ /::::::\ \ \:::\ \ /::::::\ \ /::::::\ \ /::::::\ \ \:::\ \ +// /:::/\:::\ \ /:::/\:::\ \ /:::/\:::\ \ \:::\ \ /:::/\:::\ \ /:::/\:::\ \ \:::\ \ /:::/\:::\ \ /:::/\:::\ \ /:::/\:::\ \ \:::\ \ /:::/\:::\ \ /:::/\:::\ \ /:::/\:::\ \ \:::\ \ +// /:::/ \:::\ \ /:::/__\:::\ \ /:::/__\:::\ \ \:::\ \ /:::/__\:::\ \ /:::/__\:::\ \ \:::\ \ /:::/__\:::\ \ /:::/__\:::\ \ /:::/__\:::\ \ \:::\ \ /:::/__\:::\ \ /:::/__\:::\ \ /:::/ \:::\ \ \:::\ \ +// /:::/ \:::\ \ /::::\ \:::\ \ /::::\ \:::\ \ /::::\ \ /::::\ \:::\ \ /::::\ \:::\ \ /::::\ \ /::::\ \:::\ \ /::::\ \:::\ \ \:::\ \:::\ \ /::::\ \ /::::\ \:::\ \ /::::\ \:::\ \ /:::/ \:::\ \ /::::\ \ +// /:::/ / \:::\ \ /::::::\ \:::\ \ /::::::\ \:::\ \ /::::::\ \ /::::::\ \:::\ \ /::::::\ \:::\ \ /::::::\ \ /::::::\ \:::\ \ /::::::\ \:::\ \ ___\:::\ \:::\ \ /::::::\ \ /::::::\ \:::\ \ /::::::\ \:::\ \ /:::/ / \:::\ \ /::::::\ \ +// /:::/ / \:::\ ___\ /:::/\:::\ \:::\ \ /:::/\:::\ \:::\____\ /:::/\:::\ \ /:::/\:::\ \:::\ \ /:::/\:::\ \:::\____\ /:::/\:::\ \ /:::/\:::\ \:::\ \ /:::/\:::\ \:::\ ___\ /\ \:::\ \:::\ \ /:::/\:::\ \ /:::/\:::\ \:::\____\ /:::/\:::\ \:::\ \ /:::/ / \:::\ \ /:::/\:::\ \ +// /:::/____/ \:::| |/:::/ \:::\ \:::\____\/:::/ \:::\ \:::| | /:::/ \:::\____\ /:::/ \:::\ \:::\____\/:::/ \:::\ \:::| | /:::/ \:::\____\ /:::/ \:::\ \:::\____\/:::/__\:::\ \:::| |/::\ \:::\ \:::\____\ /:::/ \:::\____\/:::/ \:::\ \:::| |/:::/ \:::\ \:::\____\/:::/____/ \:::\____\ /:::/ \:::\____\ +// \:::\ \ /:::|____|\::/ \:::\ /:::/ /\::/ |::::\ /:::|____| /:::/ \::/ / \::/ \:::\ /:::/ /\::/ |::::\ /:::|____| /:::/ \::/ / \::/ \:::\ /:::/ /\:::\ \:::\ /:::|____|\:::\ \:::\ \::/ / /:::/ \::/ /\::/ |::::\ /:::|____|\::/ \:::\ /:::/ /\:::\ \ \::/ / /:::/ \::/ / +// \:::\ \ /:::/ / \/____/ \:::\/:::/ / \/____|:::::\/:::/ / /:::/ / \/____/ \/____/ \:::\/:::/ / \/____|:::::\/:::/ / /:::/ / \/____/ \/____/ \:::\/:::/ / \:::\ \:::\/:::/ / \:::\ \:::\ \/____/ /:::/ / \/____/ \/____|:::::\/:::/ / \/____/ \:::\/:::/ / \:::\ \ \/____/ /:::/ / \/____/ +// \:::\ \ /:::/ / \::::::/ / |:::::::::/ / /:::/ / \::::::/ / |:::::::::/ / /:::/ / \::::::/ / \:::\ \::::::/ / \:::\ \:::\ \ /:::/ / |:::::::::/ / \::::::/ / \:::\ \ /:::/ / +// \:::\ /:::/ / \::::/ / |::|\::::/ / /:::/ / \::::/ / |::|\::::/ / /:::/ / \::::/ / \:::\ \::::/ / \:::\ \:::\____\ /:::/ / |::|\::::/ / \::::/ / \:::\ \ /:::/ / +// \:::\ /:::/ / /:::/ / |::| \::/____/ \::/ / /:::/ / |::| \::/____/ \::/ / /:::/ / \:::\ /:::/ / \:::\ /:::/ / \::/ / |::| \::/____/ /:::/ / \:::\ \ \::/ / +// \:::\/:::/ / /:::/ / |::| ~| \/____/ /:::/ / |::| ~| \/____/ /:::/ / \:::\/:::/ / \:::\/:::/ / \/____/ |::| ~| /:::/ / \:::\ \ \/____/ +// \::::::/ / /:::/ / |::| | /:::/ / |::| | /:::/ / \::::::/ / \::::::/ / |::| | /:::/ / \:::\ \ +// \::::/ / /:::/ / \::| | /:::/ / \::| | /:::/ / \::::/ / \::::/ / \::| | /:::/ / \:::\____\ +// \::/____/ \::/ / \:| | \::/ / \:| | \::/ / \::/____/ \::/ / \:| | \::/ / \::/ / +// ~~ \/____/ \|___| \/____/ \|___| \/____/ ~~ \/____/ \|___| \/____/ \/____/ + + +pragma solidity ^0.8.0; + +import "hardhat/console.sol"; +import "@openzeppelin/contracts/token/ERC721/presets/ERC721PresetMinterPauserAutoId.sol"; +import "@openzeppelin/contracts/utils/Counters.sol"; +import "@openzeppelin/contracts/access/Ownable.sol"; + +contract Darts is ERC721PresetMinterPauserAutoId, Ownable { + using Strings for uint256; + uint256 public DART_PRICE = 111000000000000000; + uint public constant MAX_PURCHASABLE = 3; + uint256 public constant MAX_NFT_SUPPLY = 1111; + string UIRoot = "https://gateway.pinata.cloud/ipfs/QmSS6xiqnxsxAqGXtPjST5S5j6Z1UZk4i8qWoEJfJmPVdL/"; + + using Counters for Counters.Counter; + Counters.Counter private _tokenIds; + + constructor() ERC721PresetMinterPauserAutoId("Dart Art Abstract", "DARTS", UIRoot) { + _tokenIds.increment(); + } + + function buy(uint16 pack) payable external { + + uint256 totalMinted = totalSupply(); + require(totalMinted < MAX_NFT_SUPPLY, "Sold out."); + + + uint256 p = (DART_PRICE*pack); + + + require(msg.value >= p, "Not enough ETH."); + mintNFT(pack); + } + + function mintNFT(uint16 amount) + private + { + for (uint i = 0; i < amount; i++) { + _mint(msg.sender, _tokenIds.current()); + _tokenIds.increment(); + } + } + + function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { + require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); + string memory baseURI = _baseURI(); + return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString(), ".json")) : ""; + } + + function withdraw() public payable onlyOwner { + require(payable(msg.sender).send(address(this).balance)); + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/hardhat/console.sol b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/hardhat/console.sol new file mode 100644 index 0000000000..d65e3b412e --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/hardhat/console.sol @@ -0,0 +1,1532 @@ +// SPDX-License-Identifier: MIT +pragma solidity >= 0.4.22 <0.9.0; + +library console { + address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67); + + function _sendLogPayload(bytes memory payload) private view { + uint256 payloadLength = payload.length; + address consoleAddress = CONSOLE_ADDRESS; + assembly { + let payloadStart := add(payload, 32) + let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0) + } + } + + function log() internal view { + _sendLogPayload(abi.encodeWithSignature("log()")); + } + + function logInt(int p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(int)", p0)); + } + + function logUint(uint p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint)", p0)); + } + + function logString(string memory p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); + } + + function logBool(bool p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); + } + + function logAddress(address p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); + } + + function logBytes(bytes memory p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes)", p0)); + } + + function logBytes1(bytes1 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0)); + } + + function logBytes2(bytes2 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0)); + } + + function logBytes3(bytes3 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0)); + } + + function logBytes4(bytes4 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0)); + } + + function logBytes5(bytes5 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0)); + } + + function logBytes6(bytes6 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0)); + } + + function logBytes7(bytes7 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0)); + } + + function logBytes8(bytes8 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0)); + } + + function logBytes9(bytes9 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0)); + } + + function logBytes10(bytes10 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0)); + } + + function logBytes11(bytes11 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0)); + } + + function logBytes12(bytes12 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0)); + } + + function logBytes13(bytes13 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0)); + } + + function logBytes14(bytes14 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0)); + } + + function logBytes15(bytes15 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0)); + } + + function logBytes16(bytes16 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0)); + } + + function logBytes17(bytes17 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0)); + } + + function logBytes18(bytes18 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0)); + } + + function logBytes19(bytes19 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0)); + } + + function logBytes20(bytes20 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0)); + } + + function logBytes21(bytes21 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0)); + } + + function logBytes22(bytes22 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0)); + } + + function logBytes23(bytes23 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0)); + } + + function logBytes24(bytes24 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0)); + } + + function logBytes25(bytes25 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0)); + } + + function logBytes26(bytes26 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0)); + } + + function logBytes27(bytes27 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0)); + } + + function logBytes28(bytes28 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0)); + } + + function logBytes29(bytes29 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0)); + } + + function logBytes30(bytes30 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0)); + } + + function logBytes31(bytes31 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0)); + } + + function logBytes32(bytes32 p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0)); + } + + function log(uint p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint)", p0)); + } + + function log(string memory p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string)", p0)); + } + + function log(bool p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool)", p0)); + } + + function log(address p0) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address)", p0)); + } + + function log(uint p0, uint p1) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,uint)", p0, p1)); + } + + function log(uint p0, string memory p1) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,string)", p0, p1)); + } + + function log(uint p0, bool p1) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,bool)", p0, p1)); + } + + function log(uint p0, address p1) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,address)", p0, p1)); + } + + function log(string memory p0, uint p1) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,uint)", p0, p1)); + } + + function log(string memory p0, string memory p1) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1)); + } + + function log(string memory p0, bool p1) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1)); + } + + function log(string memory p0, address p1) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1)); + } + + function log(bool p0, uint p1) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint)", p0, p1)); + } + + function log(bool p0, string memory p1) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1)); + } + + function log(bool p0, bool p1) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1)); + } + + function log(bool p0, address p1) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1)); + } + + function log(address p0, uint p1) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,uint)", p0, p1)); + } + + function log(address p0, string memory p1) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1)); + } + + function log(address p0, bool p1) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1)); + } + + function log(address p0, address p1) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1)); + } + + function log(uint p0, uint p1, uint p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint)", p0, p1, p2)); + } + + function log(uint p0, uint p1, string memory p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string)", p0, p1, p2)); + } + + function log(uint p0, uint p1, bool p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool)", p0, p1, p2)); + } + + function log(uint p0, uint p1, address p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address)", p0, p1, p2)); + } + + function log(uint p0, string memory p1, uint p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint)", p0, p1, p2)); + } + + function log(uint p0, string memory p1, string memory p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,string,string)", p0, p1, p2)); + } + + function log(uint p0, string memory p1, bool p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool)", p0, p1, p2)); + } + + function log(uint p0, string memory p1, address p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,string,address)", p0, p1, p2)); + } + + function log(uint p0, bool p1, uint p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint)", p0, p1, p2)); + } + + function log(uint p0, bool p1, string memory p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string)", p0, p1, p2)); + } + + function log(uint p0, bool p1, bool p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool)", p0, p1, p2)); + } + + function log(uint p0, bool p1, address p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address)", p0, p1, p2)); + } + + function log(uint p0, address p1, uint p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint)", p0, p1, p2)); + } + + function log(uint p0, address p1, string memory p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,address,string)", p0, p1, p2)); + } + + function log(uint p0, address p1, bool p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool)", p0, p1, p2)); + } + + function log(uint p0, address p1, address p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,address,address)", p0, p1, p2)); + } + + function log(string memory p0, uint p1, uint p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint)", p0, p1, p2)); + } + + function log(string memory p0, uint p1, string memory p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,uint,string)", p0, p1, p2)); + } + + function log(string memory p0, uint p1, bool p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool)", p0, p1, p2)); + } + + function log(string memory p0, uint p1, address p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,uint,address)", p0, p1, p2)); + } + + function log(string memory p0, string memory p1, uint p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,string,uint)", p0, p1, p2)); + } + + function log(string memory p0, string memory p1, string memory p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2)); + } + + function log(string memory p0, string memory p1, bool p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2)); + } + + function log(string memory p0, string memory p1, address p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2)); + } + + function log(string memory p0, bool p1, uint p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint)", p0, p1, p2)); + } + + function log(string memory p0, bool p1, string memory p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2)); + } + + function log(string memory p0, bool p1, bool p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2)); + } + + function log(string memory p0, bool p1, address p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2)); + } + + function log(string memory p0, address p1, uint p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,address,uint)", p0, p1, p2)); + } + + function log(string memory p0, address p1, string memory p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2)); + } + + function log(string memory p0, address p1, bool p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2)); + } + + function log(string memory p0, address p1, address p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2)); + } + + function log(bool p0, uint p1, uint p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint)", p0, p1, p2)); + } + + function log(bool p0, uint p1, string memory p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string)", p0, p1, p2)); + } + + function log(bool p0, uint p1, bool p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool)", p0, p1, p2)); + } + + function log(bool p0, uint p1, address p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address)", p0, p1, p2)); + } + + function log(bool p0, string memory p1, uint p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint)", p0, p1, p2)); + } + + function log(bool p0, string memory p1, string memory p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2)); + } + + function log(bool p0, string memory p1, bool p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2)); + } + + function log(bool p0, string memory p1, address p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2)); + } + + function log(bool p0, bool p1, uint p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint)", p0, p1, p2)); + } + + function log(bool p0, bool p1, string memory p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2)); + } + + function log(bool p0, bool p1, bool p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2)); + } + + function log(bool p0, bool p1, address p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2)); + } + + function log(bool p0, address p1, uint p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint)", p0, p1, p2)); + } + + function log(bool p0, address p1, string memory p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2)); + } + + function log(bool p0, address p1, bool p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2)); + } + + function log(bool p0, address p1, address p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2)); + } + + function log(address p0, uint p1, uint p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint)", p0, p1, p2)); + } + + function log(address p0, uint p1, string memory p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,uint,string)", p0, p1, p2)); + } + + function log(address p0, uint p1, bool p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool)", p0, p1, p2)); + } + + function log(address p0, uint p1, address p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,uint,address)", p0, p1, p2)); + } + + function log(address p0, string memory p1, uint p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,string,uint)", p0, p1, p2)); + } + + function log(address p0, string memory p1, string memory p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2)); + } + + function log(address p0, string memory p1, bool p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2)); + } + + function log(address p0, string memory p1, address p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2)); + } + + function log(address p0, bool p1, uint p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint)", p0, p1, p2)); + } + + function log(address p0, bool p1, string memory p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2)); + } + + function log(address p0, bool p1, bool p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2)); + } + + function log(address p0, bool p1, address p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2)); + } + + function log(address p0, address p1, uint p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,address,uint)", p0, p1, p2)); + } + + function log(address p0, address p1, string memory p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2)); + } + + function log(address p0, address p1, bool p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2)); + } + + function log(address p0, address p1, address p2) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2)); + } + + function log(uint p0, uint p1, uint p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,uint)", p0, p1, p2, p3)); + } + + function log(uint p0, uint p1, uint p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,string)", p0, p1, p2, p3)); + } + + function log(uint p0, uint p1, uint p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,bool)", p0, p1, p2, p3)); + } + + function log(uint p0, uint p1, uint p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,address)", p0, p1, p2, p3)); + } + + function log(uint p0, uint p1, string memory p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,uint)", p0, p1, p2, p3)); + } + + function log(uint p0, uint p1, string memory p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,string)", p0, p1, p2, p3)); + } + + function log(uint p0, uint p1, string memory p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,bool)", p0, p1, p2, p3)); + } + + function log(uint p0, uint p1, string memory p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,address)", p0, p1, p2, p3)); + } + + function log(uint p0, uint p1, bool p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,uint)", p0, p1, p2, p3)); + } + + function log(uint p0, uint p1, bool p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,string)", p0, p1, p2, p3)); + } + + function log(uint p0, uint p1, bool p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,bool)", p0, p1, p2, p3)); + } + + function log(uint p0, uint p1, bool p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,address)", p0, p1, p2, p3)); + } + + function log(uint p0, uint p1, address p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,uint)", p0, p1, p2, p3)); + } + + function log(uint p0, uint p1, address p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,string)", p0, p1, p2, p3)); + } + + function log(uint p0, uint p1, address p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,bool)", p0, p1, p2, p3)); + } + + function log(uint p0, uint p1, address p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,address)", p0, p1, p2, p3)); + } + + function log(uint p0, string memory p1, uint p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,uint)", p0, p1, p2, p3)); + } + + function log(uint p0, string memory p1, uint p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,string)", p0, p1, p2, p3)); + } + + function log(uint p0, string memory p1, uint p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,bool)", p0, p1, p2, p3)); + } + + function log(uint p0, string memory p1, uint p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,address)", p0, p1, p2, p3)); + } + + function log(uint p0, string memory p1, string memory p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,uint)", p0, p1, p2, p3)); + } + + function log(uint p0, string memory p1, string memory p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,string)", p0, p1, p2, p3)); + } + + function log(uint p0, string memory p1, string memory p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,bool)", p0, p1, p2, p3)); + } + + function log(uint p0, string memory p1, string memory p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,string,string,address)", p0, p1, p2, p3)); + } + + function log(uint p0, string memory p1, bool p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,uint)", p0, p1, p2, p3)); + } + + function log(uint p0, string memory p1, bool p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,string)", p0, p1, p2, p3)); + } + + function log(uint p0, string memory p1, bool p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,bool)", p0, p1, p2, p3)); + } + + function log(uint p0, string memory p1, bool p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,address)", p0, p1, p2, p3)); + } + + function log(uint p0, string memory p1, address p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,uint)", p0, p1, p2, p3)); + } + + function log(uint p0, string memory p1, address p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,string)", p0, p1, p2, p3)); + } + + function log(uint p0, string memory p1, address p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,bool)", p0, p1, p2, p3)); + } + + function log(uint p0, string memory p1, address p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,string,address,address)", p0, p1, p2, p3)); + } + + function log(uint p0, bool p1, uint p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,uint)", p0, p1, p2, p3)); + } + + function log(uint p0, bool p1, uint p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,string)", p0, p1, p2, p3)); + } + + function log(uint p0, bool p1, uint p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,bool)", p0, p1, p2, p3)); + } + + function log(uint p0, bool p1, uint p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,address)", p0, p1, p2, p3)); + } + + function log(uint p0, bool p1, string memory p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,uint)", p0, p1, p2, p3)); + } + + function log(uint p0, bool p1, string memory p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,string)", p0, p1, p2, p3)); + } + + function log(uint p0, bool p1, string memory p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,bool)", p0, p1, p2, p3)); + } + + function log(uint p0, bool p1, string memory p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,address)", p0, p1, p2, p3)); + } + + function log(uint p0, bool p1, bool p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,uint)", p0, p1, p2, p3)); + } + + function log(uint p0, bool p1, bool p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,string)", p0, p1, p2, p3)); + } + + function log(uint p0, bool p1, bool p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,bool)", p0, p1, p2, p3)); + } + + function log(uint p0, bool p1, bool p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,address)", p0, p1, p2, p3)); + } + + function log(uint p0, bool p1, address p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,uint)", p0, p1, p2, p3)); + } + + function log(uint p0, bool p1, address p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,string)", p0, p1, p2, p3)); + } + + function log(uint p0, bool p1, address p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,bool)", p0, p1, p2, p3)); + } + + function log(uint p0, bool p1, address p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,address)", p0, p1, p2, p3)); + } + + function log(uint p0, address p1, uint p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,uint)", p0, p1, p2, p3)); + } + + function log(uint p0, address p1, uint p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,string)", p0, p1, p2, p3)); + } + + function log(uint p0, address p1, uint p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,bool)", p0, p1, p2, p3)); + } + + function log(uint p0, address p1, uint p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,address)", p0, p1, p2, p3)); + } + + function log(uint p0, address p1, string memory p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,uint)", p0, p1, p2, p3)); + } + + function log(uint p0, address p1, string memory p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,string)", p0, p1, p2, p3)); + } + + function log(uint p0, address p1, string memory p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,bool)", p0, p1, p2, p3)); + } + + function log(uint p0, address p1, string memory p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,address,string,address)", p0, p1, p2, p3)); + } + + function log(uint p0, address p1, bool p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,uint)", p0, p1, p2, p3)); + } + + function log(uint p0, address p1, bool p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,string)", p0, p1, p2, p3)); + } + + function log(uint p0, address p1, bool p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,bool)", p0, p1, p2, p3)); + } + + function log(uint p0, address p1, bool p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,address)", p0, p1, p2, p3)); + } + + function log(uint p0, address p1, address p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,uint)", p0, p1, p2, p3)); + } + + function log(uint p0, address p1, address p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,string)", p0, p1, p2, p3)); + } + + function log(uint p0, address p1, address p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,bool)", p0, p1, p2, p3)); + } + + function log(uint p0, address p1, address p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(uint,address,address,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint p1, uint p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,uint)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint p1, uint p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint p1, uint p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint p1, uint p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint p1, string memory p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,uint)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint p1, string memory p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint p1, string memory p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint p1, string memory p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,uint,string,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint p1, bool p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,uint)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint p1, bool p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint p1, bool p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint p1, bool p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint p1, address p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,uint)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint p1, address p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint p1, address p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, uint p1, address p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,uint,address,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, uint p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,uint)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, uint p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, uint p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, uint p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,string,uint,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, string memory p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, string memory p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, string memory p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, bool p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, bool p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, bool p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, bool p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, address p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, address p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, address p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, string memory p1, address p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, uint p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,uint)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, uint p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, uint p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, uint p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, string memory p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, string memory p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, string memory p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, string memory p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, bool p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, bool p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, bool p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, bool p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, address p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, address p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, address p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, bool p1, address p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, uint p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,uint)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, uint p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, uint p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, uint p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,address,uint,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, string memory p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, string memory p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, string memory p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, string memory p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, bool p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, bool p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, bool p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, bool p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, address p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, address p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, address p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3)); + } + + function log(string memory p0, address p1, address p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3)); + } + + function log(bool p0, uint p1, uint p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,uint)", p0, p1, p2, p3)); + } + + function log(bool p0, uint p1, uint p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,string)", p0, p1, p2, p3)); + } + + function log(bool p0, uint p1, uint p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, uint p1, uint p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,address)", p0, p1, p2, p3)); + } + + function log(bool p0, uint p1, string memory p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,uint)", p0, p1, p2, p3)); + } + + function log(bool p0, uint p1, string memory p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,string)", p0, p1, p2, p3)); + } + + function log(bool p0, uint p1, string memory p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, uint p1, string memory p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,address)", p0, p1, p2, p3)); + } + + function log(bool p0, uint p1, bool p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,uint)", p0, p1, p2, p3)); + } + + function log(bool p0, uint p1, bool p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,string)", p0, p1, p2, p3)); + } + + function log(bool p0, uint p1, bool p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, uint p1, bool p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,address)", p0, p1, p2, p3)); + } + + function log(bool p0, uint p1, address p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,uint)", p0, p1, p2, p3)); + } + + function log(bool p0, uint p1, address p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,string)", p0, p1, p2, p3)); + } + + function log(bool p0, uint p1, address p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, uint p1, address p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,address)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, uint p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,uint)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, uint p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,string)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, uint p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, uint p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,address)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, string memory p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, string memory p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, string memory p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, string memory p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, bool p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, bool p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, bool p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, bool p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, address p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, address p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, address p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, string memory p1, address p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, uint p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,uint)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, uint p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,string)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, uint p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, uint p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,address)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, string memory p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, string memory p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, string memory p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, string memory p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, bool p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, bool p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, bool p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, bool p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, address p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, address p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, address p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, bool p1, address p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, uint p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,uint)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, uint p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,string)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, uint p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, uint p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,address)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, string memory p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, string memory p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, string memory p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, string memory p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, bool p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, bool p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, bool p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, bool p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, address p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, address p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, address p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3)); + } + + function log(bool p0, address p1, address p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3)); + } + + function log(address p0, uint p1, uint p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,uint)", p0, p1, p2, p3)); + } + + function log(address p0, uint p1, uint p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,string)", p0, p1, p2, p3)); + } + + function log(address p0, uint p1, uint p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,bool)", p0, p1, p2, p3)); + } + + function log(address p0, uint p1, uint p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,address)", p0, p1, p2, p3)); + } + + function log(address p0, uint p1, string memory p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,uint)", p0, p1, p2, p3)); + } + + function log(address p0, uint p1, string memory p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,string)", p0, p1, p2, p3)); + } + + function log(address p0, uint p1, string memory p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,bool)", p0, p1, p2, p3)); + } + + function log(address p0, uint p1, string memory p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,uint,string,address)", p0, p1, p2, p3)); + } + + function log(address p0, uint p1, bool p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,uint)", p0, p1, p2, p3)); + } + + function log(address p0, uint p1, bool p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,string)", p0, p1, p2, p3)); + } + + function log(address p0, uint p1, bool p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,bool)", p0, p1, p2, p3)); + } + + function log(address p0, uint p1, bool p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,address)", p0, p1, p2, p3)); + } + + function log(address p0, uint p1, address p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,uint)", p0, p1, p2, p3)); + } + + function log(address p0, uint p1, address p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,string)", p0, p1, p2, p3)); + } + + function log(address p0, uint p1, address p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,bool)", p0, p1, p2, p3)); + } + + function log(address p0, uint p1, address p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,uint,address,address)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, uint p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,uint)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, uint p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,string)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, uint p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,bool)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, uint p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,string,uint,address)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, string memory p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, string memory p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, string memory p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, string memory p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, bool p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, bool p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, bool p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, bool p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, address p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, address p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, address p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3)); + } + + function log(address p0, string memory p1, address p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, uint p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,uint)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, uint p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,string)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, uint p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,bool)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, uint p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,address)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, string memory p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, string memory p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, string memory p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, string memory p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, bool p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, bool p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, bool p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, bool p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, address p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, address p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, address p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3)); + } + + function log(address p0, bool p1, address p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, uint p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,uint)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, uint p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,string)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, uint p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,bool)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, uint p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,address,uint,address)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, string memory p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, string memory p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, string memory p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, string memory p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, bool p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, bool p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, bool p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, bool p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, address p2, uint p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, address p2, string memory p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, address p2, bool p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3)); + } + + function log(address p0, address p1, address p2, address p3) internal view { + _sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3)); + } + +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/meta.json b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/meta.json new file mode 100644 index 0000000000..9617a647eb --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/meta.json @@ -0,0 +1,19 @@ +{ + "language": "Solidity", + "sources": { + "contracts/Darts.sol": { + "urls": [ + "contracts/Darts.sol" + ] + } + }, + "settings": { + "outputSelection": { + "*": { + "": [ + "ast" + ] + } + } + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01abc00E86C7e258823b9a055Fd62cA6CF61a163.zip b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01abc00E86C7e258823b9a055Fd62cA6CF61a163.zip deleted file mode 100644 index d4077eddc3d611fc5c3698349f5623d7311fbf0c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 88066 zcmbTdV~{9I)TZ0EZQHhO+qUi9wr$(CZQHipyLWfreZILrPt2K_s;K%`ks0wmYh|rm zZz@OwgP;IF{Jm*Jy)^;;|7#E&000F52f*0g&e_Gu)!4<}iPq4`+?meB!$nmE5&)QG zOU(SA$JGNG01)J#um0zClPn#J!3ZHzXYzE$fsw_0{BFpUbd3|!$*x(v9F=-a&VUk) ze^iKy>^Id~LttbMeS*Pd(KJpa(e<#m7_9!D{+Jl&&U1_$ncgK)<8iaj4cS|(Ljvu+8k$9TO0@TTVdzo8ts2VAzcq1BY_8f}zXes~m{2>y=)d z9RC~|;Oe<}gdf87&=@0mt3#|0f7Ak5Ww|m3IgYxfv;e5dq|#* zN@^tRub6`sVMFl#&?dqcwyrT$hLM^4cN10}w`hOZon#`#*B!D1#SEwO)7gZ;Oh@gO= z0J1-Q(#0%vGtIyHD>Gwl%C_p}(P^u9w~xOzZ%fp4&#%s&f9+<_*7Mg6JG~&{%q6oC zgVLe6h!B=(H0NA2(=3Oqm|^H-Y&016qy!c|CNojGp_j@2(#9q^@SfczTZTXeLgVN6 zv+}2<`$4@#!Br(dTqLsj`{F!Zu=&Nlf)EZ8fSzcOF#iE9#NG5jL#Kvc?vYG#QEo$* zP9VY@CoO@79<6YATKPc%ueryMhAkgQ^I2lBLrenwd~Oxl;EZ^$fTvx({Sdxw-F%LA zVQV z(BR1?nS*imWg#*e9qqw**-RG_8r{zR_*#YCLA?WJuvn?Kw}S;M@xyS^=>57bR<4H{ z@5kU{2zMjQVH>mRNDUBy0I007v(D%zU57@8Qm z82+bn*E*KU*b|Lk)VSO5bI$nEchGzN5DZ}0L11ybjE<^R%VL+S&qRa}KW}N8JyHllSV^7+spQX)-vEbD& zHZXQNJZvw2eXqbIj;s+$-EF|irbZ_XnJ+nReHC$FCK!59zl$Tjf@@lrm%a=Mx2Q3b z9tji9iVlh-AK=l#H7_z4Czc%=V?20x#gmf=3-MSJWJ*&aF_1@pXc4P&>&KzU6BC^K zn*C{k)D~lMOf~QCB6LE0h#oZ&JFjo?TjyKf$~JW@BqN!(V2gAnC?^?Gv6+2JiNYRW zcPj|{ed;-CTg$7&g*Jas(O?yXFaAp?^n(fPk80aGc3cuhCTq+vNO%*Nz?5u3!(#j@4lTkIQP2NuX_8+fhQK*1gc7D zOG!7a+p}U=b?On6qMt2||Afgr;4_$HlhXrSw3VU)#6u)T zsttcyzLzvl*%=as3Y}0sU7EG6EunAZVtvB?1Y~mB%jd!#f;6rlJ4R)Sc-4;aKH<$h ztg_w7vJgs2pve1m3kM38k$inbd$kp#cy89aF*Y^3d14;zrUAYq2HiqVu^%Z@TkDF; zq>>L^p_=A|yALfeM|HW$zTOMa2P4wlo*|Y;k+)rber)t49-1>&b0ug>_M^wz>n*PN z`Ai~+@ykxmW2ojj^BRpGLaH;nxwgIlOBJsI8I4D(M^Wun40n(V97(mHnOdX>*}KZ^ zUS$a+^1+QP4jPp>4>z8AygnQtFeM&Z82`d(x;h&{cSxl%dvM4YN= zU8C*ih6*M@u>1DVk#s%?k(RA{ay5&oB!4zfW+RZnTE-vTF!3A=n z4^ni^D~zxPF1W9v@n`4_W3g-&SN}S_(y!)n3`d1E)WlINH0{HKC%a~13ws{F-eex=fuW+3uRKNpG&(XKv(J!H%5pk_u@*Pd2Ei#MpT1Al>5Bb( za#VD%utmKiVIxn35-m1F%os6}m=@J2387}T1%)0K&j7vXun`oD0e%(At z^EE1`jlD8)#b`)ycDA)k>5l7ews+`XO7 zJN1EeqGeCx^SR}c1IKdt{4x!LH=6Y&H*M_xgFg)E>rDk!8F)?-#~plg*DILc&T3~6 z!^-}TcEWHwfJPM8Fh#FIN#v-Cja!~58hw|!}5Fu>#}v|0@6!QCh13A^RStA6$1&@qjY?EGp+>^QzBu$0iO%) z@3Hz{m#Q+fGnmMMK@*!>(MLGZo;3)cO zwl=*noN>x5A$oz5V4Pog6#yhKUsd^8XbBkzq5y$ke8W8~nPe7W!bhFSpsdjEfih!I z=jGJFg!*Z+MT-faDGf=Hd~gX4FKXGw8y!2lnwG#toH}O?7h-|5j*D;|!d%E@mUN1_ zOTXz~uzTfUky=bUQ;j!sF)eWGxkNqgDx*s4GQG^@7Rvo%&R3RhmFLS(SR{U(Wb{17 zl;mPHz1)sh9nK_pZr;&rfmUy ziGq)_M43tgDWx@}Z=tC6QWI{WJ5x}1KmPCmMg^!;WIR@E{?zU@Qm;dZhcMi$V>$aeETx6afELJs-oIf2^0E(*33zo zP=vD+b#z~6IFo>_7vB#qM&-@-#K$9_WWc$sg&@rz!L{I~2BDNSa#zyJ}sY255PCA(17^s}QIuAS-J zE%&SXRfz}9(5rR;5F<>m0_fQw4`M5^jAY1qvd}?6es@qwh%)GAIdp%g^A#d$*tf`P zvt;oNaLz%rPz{;9B6C47D`>%KrK|RWUdg?$wo>z!zE>`xs%oVa-h2yPNwgT5p|09p zofa0rsjNe?R>*W&Fd>~lD>MKBezT&fV?WEp0E}8JgFK2r7{3`(5#KzW(FsWqW;3s$ zLj>s1*~&L74C<XL(g5*bSkfU?!)n0CF;R{sB>MrSG=vbrY~8I3%j{oHmAJ=- zT1tz74i0LJ?V**WW(#Z-Aqf~RQ}_J!<<#XR#X~4cEvC|<+AuN`Tc{2lI8=4^vWUC@ zuMB}Cn^e zmol%KCB8atYO#RIir8yGQ-pGI4f-t%@*&OHfn<_iUotB7jkjvF&GQ@}>V>+1V@@?N z5)7|Ybw@tfvYaoqpGkG#OU1&Y?mtFP)jur&=;SNP6-M0c-Py?2Chq;nw0Jz&KH2;m4s?sKNQSAzweEk zKzcl5;X;5E(UzRav3DZpMOABeQ12paR>ru16VX=G2ck^R;0^F7Utypr;`pG7OB@ldX%|G*DE_OkO^e9HZMpOb9b7m#HoTc2BKnInMqJ2vo=2?pOq4n9#stP@HsLS$fyjp#s~o_|LW`+ydsfU2xSL_v&QxVf%2;*$IF*mn$% zX_s23|5Wr;$r_z?w}_B^f#Q5c#tTnO5n6*_5@ z8`M#XddI5{uOWn99gT!Mmv99tcGt2)5X~`+I`>^(d6QS(l&e&e_pSi@KG@ zfKXO~Yhe!tY|>!QvKcaFfIS9~M_UPk=ooX1Mpts#Dn_LdI0G--7is{3ujHz4a%J^@ z(nfz%=$Y!}Q`8Enqi(gfEFmmrQ!!P*?vOJepQ7xeZ#16lx5SJ(yN)X1?y^@(PcqZA zRCL(}sPdq*9~q7dX>=Cy)Zg=8wgU}8bJR}$>|@?qwI#%d+NH1hnRmXZdQPHSU85by zUD~{9Bi0gm8YWeSJZ$Uf&VCW?w2|mup*=ScFM5NI7jT{VA25z60jH?r$?I5W3({Eb zSkvSJt)OGnFh`(K>YoY~MNe+(zK~zs7{9!(%m{laoEEV=0uV zkc<}K36g_TCVXJRh(1PwYf#o8v+^;Bp+xm^RyHpt;_;^SlLRG+Hz3ekE6m-Uh7%VB z`t^ZcOFxTDw)m0K|A#vSpoIH9ttP!2eM7tfpi-u`y(W z`c^)d!2V}DzpYJMAx3DjSlO&&v4v*L#iks}$A~+W_)kAM9x_}@@rhO}9J2TJ{wRXBrR~wxI_b%=78ycDWL`C+=97;#;u6dEEm^Iaj;$ zR=V`NiT;ymh;t&1zF*_l@P=O5w@(4?8=O5ow@jR{hgV;JPVZkBk82FiUYD-=YN{wa zL8{rS6r`Q}gCXrM(bzMlBJAG-(9;L+qy0HT?WKrp$sGt3!DM``v_b*)d9=#}1-4%n zoP2^1)>=aBqxu&x71F#~#Y?KPO7Fa~JJFnNA^SjMkC66CVwVFZa|dKj@4c6a?8=-? zbG{vgV(ra~wrF_1yvbhe#Bo2T^nUd%LDndq>vPE9C63K^R$qocLtPR0EE#f|l%ljs z!$x^cmnC*A8pfhBuv|=#!Ck)tX^5*p#a``SMvH|N|(LW4gp41n=Gtt zSeXlnAfPv3@Z^4X+c<9Sh?+_pq{w1 z?}>|>v38{=KlT!a;r^RoO&zt|AcJIvsR!-*!9?*mhs^LY?uZR@ zOBee?VM9v<-qtd^H|~44TexRW3w(K#--?TQ>5o&6zw&%;-F8Ey5wHbKo18Ir4Gw`J zFPxHT_LyD8-zZ!&>_2dng8Bo(X-NT9;dyGIcS=Mg3ZbP1tfkus9FTbDBXA|meUnMv z7f9+w)4mj+<&b_^smlBF>~}EtA*VNs`nkLzw_L?&}MEe)HL~$o0*FY2rW?M{g`p2no@5yD7;q32xXYFUh6HP$^gZvuHK)()u1gwpBJ>oPBQTr?19C9|0*CBHz;Oo7J0NA5?Qggx*PyLr zA+1Z{&5?3bNL>ZPohgJ@a`jRCSwr%i9h~clrl+~rg{}s7o&@_GK2K@6F=KW%uDsI6 zdk07o1vJq%BObINhD}O2p0uDMW=P6TV8D?;oAirV@@;=<;AUl^-$D^E26z5%@!SmH zNmNPD63c=;glvqyqz*P)EiwI0yi2Yf7nlG%?+x`4^R~#3u4x=F*%SB0;)DUfj*SGo z4juk1yT`e`5VIdCM{;q>N7r`>okY%Ed5Ht&PeWxt7uVgHOInQ-f09a_JwQl?Nl_IE zcDWKm2?PMYerwXk-PKSh)1+1DFi~CA&+c0PvVNo7zOqYgE1Ge6T)(5aCGS|#>pNTh zK`W~s-&+esk};}h96BDO9l?b|2GBo#GT1n_AtOJ%gEldeLfrRmfmz3njCe+;K2)aRGG+1q5$; zPy^2{2YEPoAjU1}0i;9>o)L`RFf7&d(Pz;Td~wfhUhr3}8d+q$-; z&fPtp1~nue7CpH#Y)f+Yn3BGpFR4O7sgo94jy;}s;Xek70toD|G~v);k7_8Y`brX^A=XQhL73naLqXvr8QM)j9z4V|iUlNw zS@9tYqXyuI6z1!##V1VtvsPWKT=F&_>T4_(bXBRo?w6<3uU@ns+H1FIwPd&Yx^C6F zp6XPv4qtyQT9A3c*a!Bbu+(l~kPet&yw(Q~liZIZRCAm6S08AJ`ScSoeT=2HIfYDGNjF*Th{b>^VrngnXPQS zdUjWL4H-GG>O#7Sb4SJM$*)`P`8vpcIxPK;<-?bE@0KVwm{2z4tcK{XPAA+Tx1ORU zk&s^;ifI`TA@mU6w>>Ck?YENZW$#zO7Tl3zZ+!D&pRPbGw>v*qJqQsBCcMKIux{3*FGi z9@&#F>BCoghwue3H`PBT_8KMB-7lR0sgF3vDJDYc6d>iK%+GBQA~wQM;4h>B+kj`H z$>t422Qf(#pdiIf!g$(-hW-+qf?#L|q#G*USH&RMAX9&&+eA!xRja6<_3pR>Tvz(? zFlz3yoo$Od+l|s?v&(%=60_Z$n-Sme(CgD3{8GD2=bEzp@ELb~g{WJHn$VkkCZD0XdkI@Lg zbO?`vN)%?g4LJ~?M_LKU7EPTclgYc#E;B?o_A^C%!#iB{>AI4ul8g5#{G_3H<+nBO zN-a0a8UUoRy7INMHTo%D7YAyDGn4`%=4i`A>^%|fc#=RCKg-Yv5H6Pt73hWOj!HA( za7Ox@zU zB(x*XrlTRVaF1jxI_Yn7D|$pj82Qki@sdQ)@}s!u$GIgQlyj3^;v37g|4}OdltgF8 z1e1mlfCPpEOQ~O{V4ReXNU^9ler6EV@~!GfE~d+SwOhG|1!Z?;_Mz5kCAW=@?FNf^ z$&d54wyVjCwzq0^WMOPf?pCl9LJxy~{OKJvqy((J#&IM<%(UDArDOysFtuTvEc`T? zltE`U`Nts2WcaEE;7l59BYT1;sYTP+@Nef9A_!!|>g#Q0ogAe>=E262s>Uo(6ouI&1cFom zoa~fXVKjxHegOkU8@~RnjUf?V`zDhh27sc+X#M4l(qs8DaO?1F`@7Bz!1NIIla6B3 zdI7pdn$ic}95K&A6{p2J+RJt-^emk-a$Vjh)VM7%Hg4K=C1;z@4VHIPfNE>Mge&^^ z0Y88{Xo5r-;2Bzq7DPe**eED-rskMZn0B!+@%5thfG|@LMxIk}3%7 zNJn*`0l%ArI7vOEnt#OHk%Se^ld26SC&0z)i17c&KN|6QZe+}b+rFQ-==`%>2+NFH zEo9qVGtD(La^A41i*tV4Af#^dRHBntgg(QVJOiaX?uTQKzi&5%RD<)2U_=Vz7XpNB zhQ~{%8|-$;bU>wAeV&I}EJem~FmtU3Nx`^`4v``#y%5ExG%6)YUxNk;$iWNKvKf`G?W;*+UBsDImOIT;s1yuu-(VFKt+P^wC7 zQGJbDN46vZ1(%3BG?70!z=m%qGf8ba(PE+vaX^vcGsT#143}Q|noZ)ZmNs8+ zvKF(yGL4K3)H5|L<~W5pXH&mosY-+;1RxUNOllBB{C3EfynLZ^kib!@S??9j>#b$1 zqv>yX$1XKqxd9C0-;0)Zna{L$`c|)38v}3n9tF8hgiiOVz*qs*0Ar8&(5M+4GY0eq z_3;U^_t@_TC=Nth#X&^*KY27{JYrD@%L5WooPmTwo-`n_!hy-X&y+MY1iefIVGC5? za^)(ML6daOBvl3KVKoUGd^u$V8&|kh>|Rf=?b%^eLG-aaj24 z>KoA#(fGL?L0wx+7o0p%NlK#mc>Rh_UOTr z`n@>ko|?C+S4W)~H>bB|wBZZBznXV`{>Rwi&}{tFjSm3uPvigJEdk@u000bsEdkE< zu1u9AQiZ@ zQ?0}c&l|Pp(eUl<(i*rt0lXD$*tj%#aFmVkF+ZcRYlI|v7LbURR#wmZiSKg`+8=F< z%{804Fm~k9;FW{4XVTb>K5^>o%o>0!E!Z%Ac)0Us4m{hj_2k46`*SkU90TkTc%XWT zkd&T>sMJz@24r4BWJwVsV;7&2QLqQg2pC1~{9=y{f-rsNLXnJmV?k=3fNFjab^v)O zoBlkciEZ1mZC*7sx#m(+ML_=%a)6>4#Sc-k$lD|dBD7)7FfrVhFfD}eI%wX-85ow2QR5yTaYhi9<4!@64q=h$uZT|h z<*1(&96H{ns#6I2We4RLpEe5~U?g{MRUd4uwa^T{VK5ynrK=(SDINF{C~CUObl~GC zPopcUKDA{ymOhFu8{FqDkasd$sf9Z_^I78BtEO#v3K^MZFx;eWg zboHU!_Dhh$SrAw^xs`zht))LN7R=L#N5t09(}@?IY(s>5IjI?ytT|Om$wa>ZTZvur zNy)RLZuKU6EPDdJE=x5y5-bUK)?PLwZumHmtAyV=bpUc4%1+&lg^@%zB$s>eR?X_8 zgd|j}%U%Tq3zDJqQ^G7%TW&IAls;e#x-q(EsqkG_Os#S0j#oyW6wp@Xv{?zy4fy0I5-VnQvf zMI~x8-g&HUVip0)rW&njcxq<5@kj%`6?7k?JIXQGllsfmp3dAAewv4rtQYXJ&$Sy`!X%-{xlZD!2nbkdR`dkDU% zqyBRC`dW{9VwpQ|3!J=Y$E$T-xOUv!vP}bjZr4$cwVFuJ*OJEHnjO%Q=&ZY$c@P?8EMql<1quN0Pv-sioa{{Yf0C1h3~dbm+V7l1ot*5Qoc}8)w`f|sZ;oSr z-|92&_=QU{g4vA4F5OhX4631%#FAWlcx#FF18`B3P(dQQ$$xw2xr?#mkRRQIBn^Yj zJn7}VF&#fAa~^$DWBE`Cfg=@ zWV~C4>Z3!R(Zrx{%*wyBZjEWPJrSqgd&ZkdGVGXTgJM1veOPAKyYj%Jc_#+VwJv0n z(`Y+_ZCoXfKtG(WX4h-uJq*KdcyPl8VNS&u^QkP6UqsGrsEiX1``b7;VXqT}8t_9O zmQQ&2pFw&bN=Ck2SI;Lv+cau$xL%u^cn%)I9$+!J&jn9`HoHD2KBdGtqlpMTQtkHV zp@Iw!=^}*MOm489MA@#BAaYFO!Mx38w#zW%Zv>fbWnS?4^&i-v9#Q@}R8pzm4F)6` zsv3@KPFxcLOA1j3SvmH<0q=1w1GaeIpKFCaUTsL*Ens`?B1wC78m-%5SuzEiBmfW zu@ns&byz*2l>UCEnrd4sFYn%^YmI69x4XgvTN3~LOwVAR^gh)BKN>Q?BOvp=VW-== zi65Nv?tm(?0l9c6FC06!+skWYzoCEjCt@SqI+Ni-h7jOa#<06aMTR z$M2mIBPa<%1f~C3o=5Vq7=7-e46UiqAuh~0xA7*_l+pX=n-};~Lbr3r<`5*?;$Y`u z!3cXs0{sc;yUsTL{>Tz1th%{iqLrc3`yn<33M-#8@qP<&2pSCkr+{aNfYIc@(e?Mx zLRy;dS6=%w@2_COJ$8Ig&wcxQH_Rld@tiy2U%1nM;-3d7T*4Q{D#^1me^Z{LPH`bP zg_zC+@((XFM7z77W$S)!xE5T`#IXH2vM-_4-$j9UI|nHQ3#O3r8Asok7|olj7?-%O zce{? zWVlODfgQm=C7~g8R`wYU4ZO6k&Z6RyF#Q86R@2smN+YM7YWD{d{fwDPwQnBVmXO+!zqHZzfweT;WpRSKg;FaouQVJ0=}sDjHG2{8;4s^Yx1#tsXInq8358HF&MR8$ znk}9-$*O~Z+z*YEIGk)Lp6!J34`oZ~cVLrj`WVXr2Tb?*ZX@B{A<0IP)-Nf0^@mtQ z>edQ)rs|**C_7p-9M0n!)2JFwu5&#Sw9~T!+OJg6gep7`$;i>RBbvi-wB@ zQW&T^hK->MyDsgx=kc*(r$ z$4xY4-m1N4V-s{`%-2Vr^n_KVF6Tr}O7xQu^o)j(W%5ajN?V+wB#`}Yw#8GRON=6d zX0B}0K`Go5y;mxWCPs!XK&cA|sX!Ir(cOyhc#T z?Ke{VS5fWf11E{E#oZoi1z*D+rqiHp_4KbeMD5{I5!K9!X_7L=TM|euG0ej$c4a@9 z!iU#KjP*qtYZFqteUCJCCH8DDxF}L<2aP>8QFN*vH_+%mD8EoomQl*;GCcuVupWbE zyUZpw!Suq0tHZ~L7Yvyb05N}4+}RSGQwbnlP+;+~Dp+MQxP}b?xHgyH4bP|1DnF|} ziX^H<=B}aEF|L>AM8;@N&kPab|6ZSaBFq#1{?5icnF;v*`?GCNn{98>E{Ny^|Pd2WY;B0 zHfcmFl!vW9H7+PCC5Ng`#u(oqP`%bJS$Jw;s-Zv|_|viXEr&9_Hk%D?|6Qg2Hjmxb z+++ZIgEe5z*T;8GO0TgL!kQK{R6(znXg1@mMd8s-PyxjLOK_eOWaV?f@Z_=?2s8>f zqXOqX&9nO)$gSRnglCJ4LXA^xw(~IiTBAi;C|=!mLoyHkwL5zXD^*keJ+O7j`IS6T z=j(|$)TqmezE8N>Qtg!SM`$gBA)SnGl|qry(lrg^V?*kX-Zs~L5P1TADs!CWSFicb z)vJL8uK+Gx*dG6#jNRoKcO54`<0ol;6;L$UP-h_X%155-*5mKdo&$_j$o>u}|E65S z&Q4n^VJx-ECwyM(L$B5Tu7>?^;Bju$;|J>T5-6tDn(yK>KhSO^K-eceY%E{-AC6X; z9hU&lpM!D(e?&uJH3^Seq-`b2ob*`JF0Z{JdJ{ZQv58=$BQ5@mQk7zpAj4S09R+s# z9d3IQ4&s@c9mw;ma6*@er!!RroMwXLeX`ggl@YO_>g$_IVCF@>)j8@Qp|c!t+iO^t z9qcPNc+6!xS3tEisOV2L4NN@$m<5yLooHP^g;iO3Y&h2~X46fBz%#mSk;s3Hu7Orj;B%4i5sWA%d4APy!HGBy6AbtDmNSjuf) zxWbV`R$c;+L3Z1_9f#eSh$7_bU6_}s&~thNp#Aw1t2#qS5Tuw8f&;Y#Qe^S;o>t(g zv^T_FLk$#qWql1vE}K%$}+wPRla8e z=lC(n9)7BeOu{X6z+YXtPzl2ZR07&up8>U*y_eJHR-#>8GUp2G6%SW~%9os3Imb4K zC+4UkC}+Lk!vkLSPf*F@>kdx=JNXfdk(<6q^lF_&QEq)#U)+F9|LS-cm$!Vt=YcLKqVF3TZJiWUs_;Dqe@_w zYd?|nWX&S_GS*M0^jwlzl8~Ai*^0ftu!WNUaHBjXl1mZsMU{RxlwJ9rF*MJ~i@7m2zzgycJ_;A#?|r!I)aQC;yoq zy7R3X<&ttkL-NX$yout%Oielv>F>In6(4oW|J zV*ws_i*KR>P;sx^s*WoT?pCgu(Mb!a7N(sH;?|XRr?QL5+-lgSF`PPBx5E;no$O4` zdZ&Md^fxgEX_fZrs}Qf-@MQjuLen4!GKMK*R8{|cy!3U5*Le7oukIB*ta4{z^?Knf z#DxWM&vqD{UK9M6i5C2b9o?$HkXtcBVty{E#(`JrMLQeaq(u&~j!-nWwT`61Vp;ne zx^C&W>`;hTBo0gESz~axy0gTX@2e=J6qo8q=sqm%43Ga$ZwQzgL~^1wa?)iUc?NJWv%X70O|^3Ewh&zi5xavQrpNtM_P66_rTl2 zDv~%1=u%Z(N%~HyTby|phUM(8y7t|k%F<@w-gtrY`JMRGIcu%h6E4AN9o;3X@k#B{6$$R+F}HqjVz5AP9|y$VAg&`KDM)b>*Q&m)GH0Vzh{}CEOC+S-6hX%MUK1Uy#=^iBy^r}|j4kAzWBU2Ux0BA-VwZGL6h6ntD0en& zM(uIfoET~Sc*OJ-ueVDQ!L(f~wj4}!hZ$DZ9;@uH5BWYtM|T(r?UULpELq?_D(<8> zCh)@b$z!>@Dg_h6ONe|<-e<6`vy^2VNTTojbHs4CkyOg1@s^#7H+lFQtEV7-tWPMn z20q}AcXx4iU&I~CO~;^kyYco)*HhN9`y=>2fc9aTbddo80Q`gDzXR&@_t+uZe*>y) zX>Moe;_77TtY&Cq`S&1`z0-e{zafc=_L~eSA$uRFX9+|Sood=8ZkeN67R0V7r1i0B zl4QM-G@#s#xEPtQd+xaTzM5^_ByP97-?JUD#wJf)cSYhUNp37sB$jnhqOVwQPh$(F zE__UGD$w$+=wlixlLZZ>%|^iAG&G3Wlz-$jI!AY#$3sF%E3(_HcDw=~5wu1}jf{(_ zUIoM6v}h*=)j?KwInoQYx93vZ$z|1+)7!4JPB;by?-vZmR7o0cU4+J17)->$WMHA8 z>!R@jQGVLi6J5JUPcEX1_7O^%SJ3(5wbRL-a~N;&a!!=3mp`*U)Z>t(+$U2k*X2h7 zuN}%R|5AEYZgFK8zi-4t9u-!00(7(iHFv~au2@VhCqn9)k?LhY0wIoL}{&2+A7CvF0;=p)e>^BwDBFz+0 zi}*31tTU-v9cWAMfv`i(ZK1BfZWv<32D3ZZE@50X7+w+2MQ|sCZS@lxAiOO{nLQGn z>aF;_^vi=I<`PRt>6Ge*F-V@O-_a4wh~4WtE<<2*6&VX}_e80=hZU0iT2nPE8~nyR zCug>Zb+57*Gv)|?Tl1E`eLRd-e#Z|sgOt-gbGh%?ebNn!Pn>C|1AQGu%5o|3zQ%(y>`xfqK4D;xSPR3^G~m{ z&;?b&4E=uBXYXe(H#v+U@~;mz-3XkN5zApkPDKb7=JqJ{rK^3b${7`=Ff)|Uc(p+x zV;4&e*ylEea0Ax^xaoZut{tIS6pZ6RF5<>jLI`k~2L!bPl{ElSTLOsf$bJh z-RHEf7qnZ20z;%jwj`pkA`XM)O>vtLoW|TS;#9q%({jMn%1=g70d_ohK_~8WT7Kc61Dz}tUnp?+wBv)ck#w6;Y5g$CY5CubCIrBQ-4*|(n&Pb9JyD(@tfKTKkYXsG$kS^lIE_*7?^nizO+VfiYy z`LdXk0mGsAl5)lxn#^8~N)Cd|AAYFa@U?alXD25RbO*>|ydsfm>h(Sh$1Noq?3)b4 zCg@G8jWUas3TzfYLLtPCLLz5UzheC5_6GBevqWjL^?7ZlUG_zG;xMp;7T6EYzXbFc zRSQeTpyc^!xaPwDP;xv5f7R`^2NAYB)NkR9jAg7k5*z-U1hc1g>Dxq z=-{J8ma&vSxoT>oSQxPgJsBTV#Dd*>KmSh%oIqr61pN(xe?b5D5DLT&Kx>5gy{*9`w{T3U-->pu^^DrVY+6n0f*zhDEtIJ^^oUwXS7qJDfWS2&W`C>7p z*Ji>WU-1uF=}p#=UO5JuOOLnhr)}I40{@TaA^Y9*G74BP#n8pa?4n-(t&4Tf z-T|6RIRpV62jCJl>X}u6DIMZK#f}}O7<7dyC?zsMd3Rvruhi*3x zlPZ%?ESmsx`mp81RsbOZhhomi|K%AuucV1i^>QD zl-o{(1cK!-rzz*05Kf_SiaeeA!w7Pz_l(&ygOc4i@lCWSH-}*E3O>3}a^uBP%$C+f zcL=wkO;?B^!FNTDDD;v*+aeDp9C<@CUob-Hp-mi}deK9eGU!bgUq0u+(+dki;P>>P zvsrkGh|JB=&`n7_#idw>WK0z6U=Y+8@>4R_Cr*Lz;u=fPN_&i6f9sj1Df|D z%(}uPQfq;-)ES+MKt_6&Haw#g>aFd@Y_zjfK)gR6=mxwTG)Z(U86+un z#p%3>U3e_tdX6#XFtxP=7X!I2EE#l%VGnhyd}o+W2dvRf;Tp5QS}!N((FzcCwt^Xd;|BewJ^0cvq&5qTZlcMJ$Pz+ z$?9=GiCryEzkWJ>h_6RN4mf?$vZLrTkATt~c72J2i)xy2n#1{PsC!NwhEz=r=pU7T zo+kEs?BeQx? z#%;Bu`o7h*?~uz|O$i3IT99cjCq0A|&Njt)vLVaHf> zD5t)P*~dsg@Ux3aHF_Pz4vw!SUquTgBqk&@&X&8Ll2D2h#fWVx6cV>gY{2cBT9Uwa z5acBDfF?J5op)Ja~jv$Z1~z2tF{?8v;U5pq&Vy(JwM6>atYE#pL>X`* zlx{2zF@rm)8VbCkK0vb^B^|ct&DiaSZpy%n1lhKA%*Xb4-XruliLRrpZNeNJXo7)) zaDzXRD<#Ma1r8sjj`Ct zhQK=jt_Kz%@Puc9;Z||aq{vGI&20HuY+}f)iRZqfAVKaqK0UUULW3Mz??iR4AcO)L z)?`c8e5m-{YwRsP+?Y5qBf1&Jek>dEn&@=}ISA9+p;iRFt!l!*Qa>+@ZeMnfoNB-u z8|@wy>Dm$M#01SqhD{BCslLwI@7&rGKQ+)%P8j3V>!OX?N?G0S@(gE);<$y$MZ6(DLxKVyd?pZ?V082fEtjCD2? zmXkySp&M^VE|yIDVJVf^d1phW#L>q+7S4;|f!nGTAF^9z(ZM3Li&z6nLnRP2w@VOH zU*+HMr@Z5rFi9@^29p;cn#o3|A#N+mHDdfoW(A4}LANIz?}7qAghmMshas~VOz{^C z&8t6KI9wPCgozEIMnSD)-t;h{c#E{tHLOJEA<*Lz#_7jRQ>h;@)Sx@_cM&f2gV9gNhvHD{b`iZ z!W78^xM-y`%2kJ3_cfK{9aJBShzpZ5Bj!CaUL3RQA?&z{h9o9%j3CAF=o(|e3S@t9 zg_CH;bqNo1R-le!&jLuEEl^HDhUufr90yUG%OMj^qY^~L6Slrv|2UCo(4eCF<&P&F z5BF zm7jpHjFFCxF;C`<$r890X{;IwtSk|wc*E(Du6q=k+>F9G#5|V|D@%0`M=0A1ZtsOZ z7p>d!snO%IJk|+8G8x`hABP{Px2TNbPjzQS@9xUWSwAWw062Ja4N?l1;8K|x89OV6Af=j&~t z-5tGTR9@5qw+TQ$Nelg%9eAPz?L?>iZJvieF9Egp<&=u0NjJBpJLNw3+tw^QM|tyG6~pHq7m(B!nzPp(6ZTl$}4^2ByugoRlb5DNqzMvo;_Z$mZ&^FgIB?&s4sU_2cSH)6C5i_k00z) zf0-3oniz4Yx0UCbdYM{Z6qDR^u>UAnb;^B%2Ino%$xQ*JdsF8BP`_R?rRoWVTL?JH z>Gf)sW-cf2pENJaE7KRPzsuoFUjbKfO@R-6DkF_2atE7asXRz!>g4W>t9)Ltw%Q++ zNEquBRGO}PKfS%6ip!k8N@Z_rQkheSQy*n{W=fwVY>15Y#2?z-hI~53=Q*#c?83&( zEHRcJ(sEG8LyGi@>~wG3rD7|;e)0<6DwQ*qaVm#32qgx2Ui5>uV%Bz{YDmGgw%w*Hsan77L))Ow6@GyQ zQ*&kSsY;T$2qYY&J`Q`o^Ga5TmBdI+rf`o3e0(pNjTYLH4$KTG@jxd*GAf(PB=I9y z-AWD4$h_syE~J0I0yAtBnkdWgA{RK-F5FSmCKFK5pn+CiY>vr^LWq2c?nCP4!Y(~} zV?M&7x4nVyFuiGqp}2O$2!|qkW3;2Ccj1C<(50A2BAp@nMm(IZz{YH~e%4M*yEWgw zHNEKk+O8iOOoR{nMKCqNF*ieuC28@EUwzm+3D<$(V}{G*mwnNpWrm3bn+j21CG zNs|HdzuIo+63#fv!Fb4Dx89Rp`e^nr>x`{X)znn@4`e0+?Z3RDs;05!~- zkC$jQwuK(+c#kEjwtmwe3wkyTc@J^YT9__ZW5OHPTFbn5Zkico24j z#t{5Z?-Ij)k8O1eC?M%Vaow+l6SmQyQT{eK9C!8b*>6Nd9W^z}47{a@^j+4GBU&IK z_I;g{U3eX>U%qhiz%a5ZOIC@c6t6t-MWSqm#z04dko`?!1GmxB2p40)EF@W;h}%@< zr}@ls2P*l+GKhlKFOry$OR4DPQE!`;><%2*%LyX!12sTw8l%P>X zinz*`QC4UoS>CbQMp~d9sp%2So8qK4< z4fl!%g92kEv+Yo^Ky@)#O2jG$)Cp#>?ok3&q?~2%KJM-?qd=Kl^>4M6SA%kJDQfAy z{BFOVxo$W^A5*?;XVR{>wk_asRs(Eo89-#Sh3S)1ijT>M^CE%eN=MG9tamoWbU(A= z{6L945ro@*-&HSRIN;|pj&APHBfUg^Hi<0`3u1F!|;FZ9~l9XbbTuwG~CG+_M=%@)#D-pSsrorApp8nnXu9XzkTYXb9sD*{S2M2%57*RDuGu-UlVzK)nRS&&O!VbgNtdW3XWEeCy46UE- zliMIFdLgAg&TD9thTRiHO;xu|qwk8a#g;6>-FR{zz#i;uw0LGuvinm9;B)at1JY$& zxyZDxj8ZIhecVmYI@JrGs@s=tRfjhUVy1DYKe-st{H>Zbbm(62WaZ4<_7&fuQpap= zVB_NJ$90D%!->C<>OVUa7{=W5n3ww&*Vj2GbZwo~)cjI8{}^n!9scC9y}-SeH?`gaD6G5L3y36%YhG9zVUBJ64_{a11Rqs(Y-*>AAb zcfTm=wwzCjMN=g#`XI_iG1?hx9@S|zJ214>!HCBW!U&(oDiOI^Sic-S7sQmPf_| zo*h-WE63p9~fP z7xm=Buug)$6a)!$I~UapfW+&LSyM$Iy-jOkf)lRoBS=?@Dj{>5%m6+@r(erV2et^T-^*PCtwY{0C zz3t@<3|G$rL)4|oz zWrSC4y-MD})78fLb969t2GjBF>fq(%v21v$lB)&;iHvd?LN^9a(-=-_NGx}tR=5d= z$bL7Yy9`nYHEcQD^Na3A>{W-KWm;rT-+)mojUj%IA6dpM|JJoy0{+Iczn{#i7G%(q zQ*vSG;^1J(d?_<{!WdaL23VYk{TmYG&!8vA$*z+h?=wH`i%i3c<2E+7?{Gewk&g{a zj0u67?^*QDoo@&sLe7vKGO0BBgNy6!E4=6o-!Ne6@H*Q4DrDa#B zfF{(T#Az>8XfYSq-ic*Bw5Tg5zE_*q?DA;NfFbEOW@CM*F9TG{1Ab_)`2Yk7*Wqa| zpDFv3r2X_}G!&t%GO`);u5tu1!lj$7t?9t2Ph zPF)V^`7>9C2DT&Rei>ff%)}b+Ji8DqdhBdfRJ)?*D>s}Mf~m+pWDf2OX;%qwqs}gz zI4jy5veFwTc+l5_Zy&F1*FrDTv?oR(Ph|~4it}Jw%vX&!0dF4S06-xQ>rr_Q6zq$t ze-MzVFXr7|9p96-RyO^ta;cg1r)~LKafR3ie}L<$Nu-|;lt^Cv$?h&_T2q1;qybx}XTe;G5fFme0@cX2js66+nQ6W=#C87R)mNPWS>|@(DpZKdSKrx#5uXjmAJi`)=yV^l;#}QPob>``^;ppuA^hld>xQjs=RejhE9Y>X-6u_&v`G6%Mv90_ z_z}Agury*4QsPV@c%B5msrfq7-t)G?ym`M4_U<3A52ntB2G;OacIi@F6o4CvDg~!$ ztpt60>cY449!5Li19yXXN!B7WZiy=~Q)?Hn7mZqj##sA)sWHOHr`0ASVzinC9aZ>I z1MvWP`9Iw6kI#F`tBAoK+AAV#lz7=eB64eLdU15Pxw<^v-E&Lv2?r2Hf^mN=9@WOI ztSsr(EYe}NRGwe%dlgq&mb$o}I<4=zoxi1P&Od2}1(g8&mHlWDX%bwtwKo;SBdtTsi6 z4RoSX4frj%yjO2Hb$DrJqR?;Fqo*mdeVoq;da04t6kV++ttXm0PaPIIt;I$=R{jkcSZMjvqt z=w>{91pCTfaQ1+&bidNx*j?Z5Zvrl$=81E7y41AO1n+FRamFrLvfr?(VfGd80L{*# z=AtL&u`pPfMjFwhbLP-8nZ;|&v<7DooUu5f>d;Voo~@jzbG)Ro%Ul5tIY018ty#G4 z{p0JHU3Y1v7nUS_f)OpMVJwa!-vV=e;LZ(>h(CzZvUTNRpZrBl1x{8KWHM|YK@ZO0 z&YykN__rh4FTY_mFrqzeUrSv&I;v`vez&>bY@ZuZ4eSo8;jFhL(0qkfdB(BPI-aYv zmrlP`FJ_i`;ka?d-?4QDx2fI3XzCFl)0bUc0gTqH_d2s3uD76=a%P7?@{Jt+Xk}zu zbY@P`pZ*QwxIvG+!jqiSvl2z+&_7r|>{b^URQ{T`peVbjEGhUWyLLS|E0eCom6bLzcj$`(i|u3^uzhx3 zQ2r)FAxf|^wp;fMQaRu?hu9Vbg&BsUe247VjBH`saOTrZ7ows0S3xM-vfiQ#QQ58m zRk@LeAA_C&=W|}2SRIbK9yxVRI4JT$oRAo*9f-8|ITTP#{W3GXRCOmwR5+I#wjy=9 zM5PF7oiuz9b*&^0bzdzEkvw5bZ@=T#EDF}!4kX)no@2Uxgqoqh0~y%SYg z0NqP?qJ;5uqN?J-5&$PEmMm3;x_@^an2sz`6jvF2J8YyI8@1X4J{VE}PoId55#X{J z9ccLHo$b@z_1<{^)vPtt^AhZPE{)70PU;wz0l}`-;!^21-AYuYYTW>2?H)n|i3cqz zL7}s1T3m4$s%An_9jZz%PV##$o|a^RU$`cuTHiB$o}b_D_>L24O}izPl7+!8;Q0nD z(Bhp1Hq3m|l#nh8fkW<%r*#5bdIJQ(C{d^i9sU{qq0(v)A7%VsQdRpQ#4epO#q$R8RY`Z?Q-e33UqZ+fmVuV)MsQ1;?B}hZ_gC{eMPh-UaqzRJ zuP=U$dAg81O_A5vX(Z{Acc_Xepeuib$-+~@?Fce|7*SLkZ&uN4Qk5&0b*^A^pgoK0 zA>ITLbpy_@7)=3ax1JtsW1p=LcG38xr7bdE3{)xqJ?20I zm@Me4JhYaRjC?R(8O2%1(8$E6`GF}42_bH%9Zr0z_}C<%a0`ILlKDFBh`E{k{Gz$L zvg>XS72M*3UXW+65CG*@&dl8qO3K{m8A?L9(_x*p@|5pWpQ_jj1#pu@942*k31sNe zQjpoG#Sr**cIteuK0VLCOLKXio}9|W=lk*b*ND#bPf6Ei zdn2#`vt5sh(aMAH3U1T#!F!#8(c0sS7c=U#hDmLelX6ofMd5gk%%$;AYRi)Iy7o!R zkC(e$wx|{1p+eK6v&Io>klbOf=SVCQn*2VJZSm8uIKIu5Xj=(!*iiu@dp#?^xO6eV z1hReIJ`q&ti_GXqFK^=At8uAHl7g%pbdoyq(rqfFA357tDo#pa(jx#Gw8|#rsxkuP zPjT=R0|utk0qs;ohtQ@&RrHvUP=i1-=G(|8(FqLMr`a zhsZj)wu5R|Yqu(bC?^FHzju=_c$VvpKZe~iOlNByd@zICeXAmrD}0IjAVG_(c`1VxR!ZC~%4z?AfBu58Vvwb*c${2}Z z3l07@cCfIj@ec_)|E{TPpC2cWNV0^Z`h~8V15C2+`5VK~Rx)$7uOWM2yb+NGexvJl zxw_Kt@nEvQ&`_sZ5PmcK_?2F>^Kq!X_6io*1+sWte?SQ~7!HWu(&SkD^%|=8bLlvHSFFR*!T>9! zie>xu`qf#f9Z9Jj1w@m0PLM3^^C;G^-WB7Xk_4}TfL24gWD__77iY%(4whDY(}hMR^Xnnv7CIzWoC(i7QtKZKXRB$B&wBG~DdH>Bg&lAS*WFU? z&Lmx4sgKV_^DT^LHv@$|vfJ9i}VT%bqned=s4JBg%oXO4IbMM zG63ui2=sN(g)xyO;eF+4Hc7y}Yw}$DxS~({-nW61Tzx7g;HY0`^Wo}`{Wb76fBmS` z95audqK-dO9i9S>!r{+J1aex~B|9jaAqx~v;wH%j&t;fq>1C&ocZm^mlA{ziP#tIp zGea>v8Tx}avsh+56xsBK*_VuxzMKn<8^BM2POP1mD=x3@SKv`2%>(QKgf@>0N;xhQ zTh?pX6V{fj<{HEdeH2!ZaWS->28bL$c=M^N$YsonR*9g6tj=6G z1*mR&yRY*XJrO9a(+U(l5Gb|(eY_ATz0(R9-4ZBio*0d`(h3^Oz6=G>XGfRcPco4N z8nUOo65?e<%$qGzeY09A+b;V|=n8=vm8Hv^yKQKd^AesL+Qpt*-jfyu3P;cOjm%+^ zDIk=&FC%uBULRLgaj|NI&q5ZaDr%LEn;?}ZKWG62&~t~M3|OGQHY>du$8FS#&_$J2 z&@^?r7=nlvg~mo5nDSe_tmY83gDFs8L(LoY$sxa{qX4w1P%i#TGeOQek$VxEugL21 z-Rj5K`CWPUu3c*F96A-<1caYN`NqmuMS&$?g=ly}?{MZh4)l8p1a3dx!K4J@Y0td% zg=l}Y-eP!7c5rBrQ>L@L=`rrz$!&hI#cwXLt=k4tBedoGZU>K>{SQ>Jb)x7y_}}a!716YHy7Vp9f>;N@Ttt z>=em46z;ETU4p@3enrSzlofZ#OTis^PQYKUitcjgb_k98J{X`X%L>VI#v)&zCUm;m z{k~6_$?&)DefYgAMHZ|UqC_B(_wk(F&_I)a=`KG!An1S+q1cetR3ifU;t;0%Ft-rb z51}TTJ*A2#9|S|_TK2xKQ1yjhA@h=Y0qW1d??SSm05k_ZNl0|>IKTR1LPYvi@k7?t zJuirp;L^Z((~YiTlU`l=T0GG_C99I_pjkWMHPsN4X;R)d1OO=+S7jlFQ3a~fM%bd0P6mOa(H)^tSU zvXyU9^d;zJaKZ1-sCbpC+ZJ|_FuSKn&43-BJbot_WlBQMU%{IbkKaJp(GRr4hbZ0ev*Orte+v@2 zs$%#wzA@Lu?TH z7AU+FHy7(t08_2m9seWemOH$T(plLi6MM)9zk&e4E-!HF}~%Z4LB~ko;7D&5D$@#-MAJ>X&K*x!Wucz zoT^I$B8A{M_SI3EjC+q+Dh0!0{*-c zId5AM0kabsKhi~5(#eG&amb<3Ik4W9qd^VQ?KN9NO>^aGe>!Q-Pu(yWajGIygEeUlC)w}NxkfN8 z*?{e)GS+85#D*4ors7s4O%Pm6Eg_ZjbT)6o)zGR;t~lzQhTfjU-=LUNx3LEn#xi1i z@OQ{d{=P`tOj*j^i&)Y-XJ&m*W?alWDXcTq8WrAufpi%Yto`J3^N?x{Ls~SqyDVJt zS1?J)9kMqIkv^~d-`fX^-PzeZ)w1TRUcQ`Igy4qM`CR}L#{laa+@Q6P(*QnKtbmPS z$#^jB8lKz&>p$vy^vTE{j21|weqo<->@zQvM3kTBtB-XAVkwR=zJPpLH}Wex7`apIgd}YS!@#u5>EDBEDkfKWdb(cFxal=gy5e6!3cTo@c&O z!{QHqEPigvzBD#uL_IC8dIDy@n|@#gK32XtA+B^jZhjjse(#8$4J}?dOWmCH@bT(b zOiAJo&Zi&p^Aq0+kmkoweYxG9^!@ygk-S{^fwhbR0Pv4p{O?9GA0z+(;s3v1`QKQ` zT}fL142lQeJWx)%&jC_GW;IHi=V?%KKtc|K6lA&69}&a4eQo<{+CG8}N58;93);sObpz{~MjHqv$^e1hpFN>beYvgD>t@6{ z3GNFZOZ*irwUC~Vmls(@dCa(%+nLOeSSQXdifp=M4z{=(5W(1*L^YoWKP}f!NBhnI zM$(oJR@w@T4@x&Ah%k_e>eoioZsvay;$T~R>KP-gbw6(um(ML54ERWh>>{@0MN_&P z>$Yl;c)WacdZyhsp^7Rp zYm95Zo-+b*sDUWkf7M@bX!$p$ttT`_JOvjQKov{G5J?qIrefx*1j7klT4?#rUrQZd zpzb_z@6;T}kC$6j$H)tU&Erk%fGsoTeCDIHZCVtqf@hu2&P0hP0Vz`1Pn^i_Ym^-; z73A_{8+B}n!OI?Nd*QHBw_!>VHudHw%b5nYq^phJeU17K&XaIunIn{65-U{mz!&t4 z*5fQ?yR@T8CwW|p$0Fq6OT9`HlvZqCVR7pzm)F|GnqxrbXF*XpGP=%>oE%H|M_Tm_ z*CW=oHy0TW!oe>%`U!nY-!A9u7)5; zLeMdr-)KI!$mnAf=05X!)uTLuxn zDY}n}k6&?E;b`paZ7Hz2;A`$0=KC)ho*F4VPi&wfvLbS-NFS;iEq@$Co1XeUeA<3` zvK*|Fu3TKY;5OB6z+h3byauf|SHehSust~OayqpX{ZFqL#<{xxpE_&`IRYGxJLz`5 zr|;;ndYW9Jnl^-bf@|?xlr>7TRqR&O2B6@=MJmiFo!7+iak6a8WO3WTDl!W`i*!27 zaJR|oL?(tLP(mC895TUW(tp`*^;S?M>aK@|w8 zs+|Q7F-7m5kAaLc2apc$#^qBM-&AVHn!{2R!6_8h)QayDP8U{4RlJvMu+agSpvpN@ z(iP~P$SFNi)Iy~asKtGIej5j-_FinkE*WY3c*X%Q5y{!~lU|0n0G28q&vMJD-1VZ} z%g0wkd!g`I8Hx&v@;szUtonKlPK&gc@gCb3K(Dc0O1=nVzU@Bj1R^r0!}7&ufz<(l z-4>R7GPNp0m~yqc;^A_yX(CCqLOwM;F+%`@8HY~6668ft9eQhM*&AlT2G=3oFn3I7 zM1mupRkI=x7n&WNoamk`84&;L*0tf+?szy9_PVCc4b1sGBOxCXO3AN@!!P0wTc=2N zI;ga`ao;zoVvb=8ZF?^~sIba%p4VfYNLNSY1RV zX@1E74z0_~J+Itpdxpr0$ILW3)I1?wB#u8i#O#r-6{`eQ4GN{rstm?gl*>gc!ey_a&k2?u(a~jY z;tzDAZG_OwjmbyBh^#qWaoTOpA#*v6&x?=)xs3e?WiwxPF1FxK`3mF}hj!GZ@EbsZj)1iE z5vd-(UXqk5d2z)a5ho&^5Db}&YHz#gfaA(Np5^=D)H_E%S|z=RkL%uEL)pWH!eH}@ zrj!K@LA_IlTq9wf>2@)1(~Z!ud;vDQp=I+}F$DCr5Z*WRz6m;nqJi`*`2cfA>8l2_I$Ex@ zZ{%r}_z$yqmM4JgL+oa-f=(-;`BE|c)MB=N>ej47OLP9Nq7x$IpSz|IIbMc*{ypjM z)%+n?_&Z6BQ`UkrR0|k+tv_Hs^(*ktUfjZ}rj6dh8B^u-9z`Tr&oFlV6LnD!{fb`} z500niZsBE!J}X17{~w?z@5*Pr6r=(L&51o@J=jbkd+b$kzj|s!E^sFv^bqT#aIew# z>AF0x=Q4enXiF}zLhf*P`ux7_hO-^)AlD@#tOwS^oUqn7^;6yrX%z#hFzgg{F zcCaJ=XbTkTICqvd;ZT?F&ItvT+8R!XDLIC>F3U}aD^H-&aO4%l#E@a(wHNdfHG;_U z=*f2V{Lj_74@yk6@4ub+f28H#MW>Jg0D$Vh6deUY2D<;GIahzw9kALEyjN=YSl}o- zTu00Ahl!IE^Qbv0C@#n(I=25L3Hmes4s)#rKp(3Q|KZ+>GJwS`HXMRjPJ`+kPwKsq^8$?&9XMJy^O$$q8e$M*R-@emL>C zWd9JQ`up?vhll_)t2NGT_#T51st>oakT@X?!F-r-E`as6=ptxQibcmCfoI0v%5YFh z2I%^g`|}M_%2*Q;mAo%1)Z_U{=~k+Mu3#t+Lgp<996R*w@jBSS{V9I zZ>1WU8`O`Gn=x_>G-cD|@ugm-f4t;kOxFa8RAvNpu?Vx@~Oo5v?*9J@L@9ojD_8hw$#&+Icg=;*D)|`U_(zK&kCXzN;K=Wi0BkDVmPWk)d^Pmybx6ZXP z2nX5KDv3BRVzGzfd7Hf^c;=FLuw*2Ba|@#P${wchk;~(`-&Eu2y`jB znfvjh+Bzm%R|YL40Z=!|6PJcz&NE3d+Sc^{pvUBQPDUF4&@}PeEqEl0-Qu}H3z^aw zR3u#2LBZ$$Ajoe#P-d`*yw?yeEtH6a-}8$7LPL|!fk0cb@jbn*x<6{3Bd{jhe* zI*w>dR^2?X*tna!7M&FoSyrY}a? zZbk<=7SaCY_K23xfDIqij?M`0Q7LqI#peYnyAJ3Th#6Ow+Uk7j#u7m>K{4%+sEvII zIsq$NQ+~Uh9Ds@me{$57B6@{q?&XY0HacKeb%`*vKnkBWOKRWd(+=C47$5^3Z4?F? zto;lS&3>;rJ_Se2J(NK95H0m_H;9Iuy^D{i2ZI*LAPC=Dr}Mn6#Cx8Z54WCI;6C~Y zS^;KZuA46cd<_Qzf6yDcmn;H_cRd-L4dg2co<`b{4m2V}YGMA?j3D}Ujhl#Lu?#vD z;T(80s0Uy5Kmp;lvNv{)Mb@-dwr3zg^Qr@)kYEa>kciE4Q*Vm@qWz9BMD#NczJA5| z+m6|?q#yW2<|@twoXhiWJeqbT#9m0qvOxTTZ9DhRdgEXT<-kvoqyT)`7!R zI>~ZXE#tZCCO@Hxz7{F8ZP;gklP4eyxGf$sx)w8%HfD8W9}wls7|SA~30hC`8FC}Y zm4GHd;h?>PZvxX}56~T`GgNec*ZCqr=nVE74uknHiS~FPpjJWS*dB;$Ci{9{5D6`u zwv4ABh&4sRY6LL+hyog9PYZ=@2V0`w*aU2MQw(hbkB41vHm^xYf=R`in7$YGegEpX z@{H~*GI}N!h1xDKF``B)YCQnTBu;Es3Tq)y@Z=r8nCh2Nl&&UalaO$pZW6{5;1za= zssM|>_UvcVB2P~%E-w2S23cmXaeRD+fWLEOmdCI!tnwk|21aEp{|;4&a{@4&Fg$1W zmPeqy=?-dHZ}(!VGH1}4m4Mj2*-KBgj^C56b7y>gQX`-XhSxEGcq6p}!b)7KI!**WEB6w;HOi%Ijq zxkoE!xN^@$g;%b{ZjFmq%cxXh4SeseE9;Kt%zwsSn8WF8(k zL*y1)*APbG(miHjSwbWE$IV*glYHx(2Ff>)7_wxvfpRD-x(Hf$cG}gujL20Lc|iwm za&!QcUg37^dQV{O5PoYra)0uFxv=p%56DzUSLIWNSkwpWtdxP83|qxMv53NIK%J!QnOzbqmI(L9GuAc ztn|WCNH{mT8s$Q7`||Yz5P*tLx(ny(FCdXJd(CJyN6Y>-3QPF9pn~aRK5G-XQr6G& z2aSi{CIW)lRf8);~LG5^LY$AFa$awPwJ%83b5dCLLg$ z^nnBf@{4bJB0yF5B-#8l#m@S@Jq;JE$=x$8;9ftNZ4k(LJRK}ks)=16Js`h3gmj( zsb6nKc7*)hgfIWGEV)C22*vkS@k9^_JOk{LYSxv08m& z=ElKrqG@lIq!dTDO(_o7T7wesYAvgGM{$0aQpWESsng$^TV2(X$v6v3hq9-Er$EhK zsSWLDTf|746B>FR&hFk{rlZS6pfD@G&CdHla^+tgxB?ZVvM?a;eOk9IT0tS&^s#Uhn7)5}a&6dV{OHkf@N)l@bVO9p7@egvY&LF4 za%m`TN~iaT-Sk!&yGiAqAVQaR`? zAn@k5O)QaKme_-GXY?7=Vr)b2uZU*oZnPFOy4dd>TWb#Jz_>I`e9$>qn0ik=$WGf{ zZ5f|sU6Xui2UHVL3%belV~HbFOV?HPn@1hXT%D+2&31vFv4M7)@h1Nfgmi(jZMi@^ zv&6h$@m8e=&7B1oOufkpH;GfZ`aEx3jVRESJ{ug~$lHX35520=L9w);-or$ug`sw8 z>9QEg9j*{qKEn{oA1LQEA?jep9feRi1W)WbW<)ckP#RVU-(sT8+wk253ZMlct>C4k z=fu>~)Wi#$0h>qjpM#kVuBMIome`?lI_t{VIrSg`f$*AaLCwG5@I&DcHc$~?K8!hD zIoh_r>G{W7symBJv-=By`KOrw_cFiu*MIFTi3|TXb^esHw9SSHeAk64^sJx}Aqi-c zxZKNpqck9(ljSPMqmr!|_b3?YLc0iwjm)~J1*JB*i z(rgh~_Vd9C=iDw=4)fr8RAce=u2gV77NnAt$SX>y8{jK1SJv)*bDB!}P+0sLv-B^E zc8m`xH8ig6HP`%BUyc z?XzZKR+8@@bT5@pG9{a_lRk#@uqjRMtr8}Ovd_#Nls2B{OR z^+e^R98<5&NXsW4n&yecBwrwnd-F5&CoZtWS!8ju~v=t7ht#xOg?lt zvKUlYefG@cYohbx7QrdNS{AZ#P;8wLky^`N&m>4~G#lzNa6l}z)rqgLP%aZ%&5)n=gss+DJ_Rrk^eRIQO&JkkI zq)=aX|MF{lZ$x&)Fla?*BGqPV0G+AZiPQcNW2>49Iw) zzkGimIp1Ym<54yk<*oHv){uL5u5F>lw30 z{;V01#PZFY6&9Q5iCYi5|M&1U|hL0Ec#NBaAJ`~aen{mJ^j zJKg`JgMUvHZhyDE8UH&!;QuBHIU{>3v;VjX7Nsm5^Ow%>4;*}Uz#T2Q>w-YMu4~as zvzL$6!qtlmo(P3H+KK?NEItv(W$$NORN~$QNC-_saC$O>)kY)$uuE#^C+o9_VL3V> z%fO2JUdSloMx zDf^4QvxIy@z-_+?Kd*#O{EtuhiGf6tqffl%d7}p3No~Jz&Y*B^w(2J(X*k`5Q ztx;U76$%YS5=TCH_ClasOX|mPNRc?B;`#4kW|SeIK#@GH5eU|><3ru;oq2sUhUC)U zbQtEs3@0E!!TYg#brEXmt6uM3qU)~pnK%7jw~4qwqS>xF&-oFoI%*5+hw)Yyvh%eI ztUQKGnrOa@h;Cgd>tT}t?zNB!I;zo$7V}>k6S`W47`&+&Zn1em2fUg7&XAZKlOC?#R!s z87^9A{}{;U#oB+A8I(Gz2 zkB9hq&ai?Wy!aU=->Ai-aQb_xC_b{xpA)>zzXS2i7%Y0I1wMh6u7tjDDeGdo)R|u9 zdocSqexdFwju(Pl(!Au$n;i_S3T(Jask}@<`%+pN8q}FNp8^>LdUX$%-nj8yEN!N3 zQ4?$CaRvoG7Ud?;6i(bzCpbVIRc!C6T$V|p4NEFm!e>-9M2~e^4ad3J3B-8LbH9wS zNEw7I(H@sN`y528$8*73D(xpFvqLa=EFFpJsj!E?m6VxPEHw+-g4aX_gJB=er*DPE zXxXTIU+KxpH!B!U+()|?PW}{aH9X^n4Vgr>ta32NY!!R7@b8BEi&PCSO!d z#vtRN{rP%WFumW)Nx5@m!kWr4*}7TYHic`t;r#g@5Zyyy>gx92)bdXP`S;Yq0R8{t zeEmQDEd`^$cL(hMg09^}o%HMt|C8w$rLtlDw;1tSQI&d7;EW|-;nVmn;>!^x4s+Eu*@#`9;{ zvOwG7x#l$G=*n{0z3J}(Y!k;S16dy&G+xw^l7=+vKPQA;WZ^@}(i1#X+hhfnL*JVo zCxU*Aw7RWovsfstBqrq6Y1J4sT+kmmoJST6?T_OxjnCD26UkRMo6VMuMdM+5C^ zVV8agIC}*ZspCBMN9M)3ymt87-gZvr%K zZMm2v&CIFb01E-p8oxwrn&%!Hhe+8zro$Q6$@GwV%P#lfExwpm*Y=MlFuDqJ%)3ik z1d~hcoJccUDB=@|e6iTn{Km**Lf2Ab39=y2_z-K0K;du@RA`3I#q(5tTSGIS(}X;& zad4&&((ZE`>EteU&5I-jyOcF6)fcXuY7UWW-4p5sPm}6)QhsWPCJP?^0e~xp_&W-#Id8<`^U4 z+z5J`F~;;-*@bl-%P;&uQ29HX;>7BBYIixI0|*=ZKrLoSK5#44|o}DCFGwv1Qi)W^|v zwi92ew+m?ov%UvsZYM`nIvlF7@0Cq#YfUOB%Mqk<&_1Y2OB@b)Gs9(?F4}ai3VHj_ePWklAVEQ zavs-~c;kzIg2(|Tv;)^4j$n{iEmLJM2@#gDocQOLw+#F#66xSc@?t`3JR*?!;uKZ8 zhp)#ot%UXme!6N|Cy_2atq+zWF$Ca3zmt`6vS&F8F@a(5D1FN~_I!>!QXpcj^3oQ* z(B~CAXKR@UjgxozZc=acmb*&BZM9fY5v8#nMpcnny%kxne=|{@=GHNc_ddO^45kcc64~^y%omHtid*A|KSN`m#{ebrDLC-TXCP|Rb6qC_-FWeJ9RlG z*!bR-(o$rRYS8wg zV}kEQURkAl#Saza2~XSV@HO+y74lbe?U(5JLDO@zRV>TJkH<@^3|cfd+nqV^&(@6L z`apc1XQ=&}Nx!NCt9pUC)$7dE5tfPf}daWW3fXlA;jdRDRRXY6?f)&@zE*kY-Zk&7?b^!7|T8eTVtUuAOH2@2*|g50w^fHd*|x zSByy+7dURHieK;f-W#cA>dTO~;?|^5#*3UGBD?pQAqZ}V{)+PafqaP){ANax>`WlM zqMGGD^e@A%D`htvCDko*>7wYY64iovrKcZlTk1-GS3V{0zkE%mF2&Np19qnPr0H^f zG}W4n_u@_Uc`hR)uglX5Fyylb4GH5D0*7=8gLqbIk@NB^1S$sC3Xt^FPb;M(bFnM} zt3zu=U)T(6fk!5K)cs0EADjH$H{9b$Q2L>}Pq97Ji$mKTazd6Dl;J+|W0^s`)Hl1d ze$s;a+;CVS?#yGvzY{+DW8Gdo_Op`X_CH1}KB+LfYfda*LQI|neb1vN)pe}Qj#-jG zo>cJ4pYi1NFt`ZJu8Zac7GjHovBS8cIAyc@%yE3z6v;{#v?2S>O^)|eg1QFZ;U5Y{ zx{x$DWr1i4F$Z}xy0bBb$u)vCtJ#)PT4ByE{HZx!2UQF|{6o5gb3wN<9XE?oX*Rf$ z3Uh3Gm5>}IU87>u`dReuz*3|}GKI#*^S1BV2&cb+i{U5fI7>hmRh%)DGwEKo&m-=#whQs`QW#`oJKRPpgMZIIP_lioR`x^_^uz2o*esbLPtX$dkY zwCewYL9@HO%N-P;8|NQ63P&CA*hM)$8UDr5j3QdPKW=XbMd4Zo&xeQMc>xhwzgbwW&1ZZ z2X@sHsz22%V6{VEUgMy#GJipyAYMu^3aCAY8iIN#rBEWnZ-3}AnLlcyoqh>u%C192 zE{mubQ?ZRr(LJhJH@I>SMiyj#4LYVIMRJ6vSmeYClf?@()anuy=F#jV23|m3BMMQfO|ym%I~AH5xk;N~^5;kjDXE->P}T9r z*Sfw#I5nHtx1^cr)?dihopRENX4qd^8Oj&7ECzHkLp6-vkJGuFoLv9*wE$u_(cB+W zT=|sqMEqq+VHag6w3*rJ@p{6ng}<^{k4%aZ%t5ycvsj{R?CTP(vTu?Af&(-_pAWoV z$S%v=Lc6`DM=@W1K7D+=K3`aS9T-}&iG68_u9@)rgLs{|!)fR}j!d3o0A)Q=2dn=S z62haH^sq|v=LKW}%-3qoIB+1hZMZV`N|VUN&oHd9!PL>I(_)J6o*<{a|A9bBKxFwI z<1yE>p*uSCIehw*!qp`+sehwY!YV0HjMV{w^=@vdUC!s{aDYPyrIma&{_qI@ITHVV zSo*R4Z?#@~J3DJ9y8k^wNdD(d+0M%3zn$zhrD5f?(Tw!L1ec-B08~)EY}%mDV1lgMWfBnV+ETiX9`2W>XbnjCB2=FhbZU0r87Qs8c889eb0BSR z8`rr@h!A@ZrXR4k8NH)iO~*9A`%2*VQtblJFGbi$OW+p}_l#qRz*8j=b^PcJwlwAN zRUo`$V*!RXToY(v(cXi*^Swa}BI4aSY8NE3R0Co2YZSt2Onk)sSf}FsmaAvSHtVT^ zqM@NmoL@xsUvPVa0h59OQP62K^rSsFjk+yxF)z>bn%d;6c1`wuML0+-c6$4KG+FJw z+Bn11BEGZiC4iCZw4#rvyK~4NqpBsi3|$A$dU&`d$S>=3de?nYuM!NX@~!#}9)9_e z8bObQ83GYI2FEVT7GWZ3itIW9NX8+4FU0uqp;?y+;nLtruP74?;oM!a z1uR8HWaM)$$Zu(Lp9B!EidgeU!un%FIEd}0jTGV(c@1qv0<)cwuSf(E>GFx~T1ZCw zXphfT=~W9P40=r1(xf!8p*H1GF{Jsfdd&+>_1@06xsP;NdEQpIU$^HUg*Uo*Uo*RI z%%thpUjZUYQQ`G|-R8ZD8^V0lkE88@GYb|KEZOIp!cZ9EZH4VZ`gBkM%xF+j;<9Dz z=-kYnu4VJznSW+H@-h+8C^y%Y?4C3w7<^7q2f+OI#MMSa)@W+hDUcQSq>F#eck){_ zpX2KhciPXd#_x(~9=w8eMcm36cm(ITJ0VTMe7aDZS9YD;LFoN1&lAdh&^P`=)JNY4 z$f|^;9|qxjO`!j%K(tsKKg?wi&-wlhPW%UVP!Nakft)%_-xx{WV*5hFuGVx-5S|dM ztd^wjwbJQamvf6Ct9LJRQZx*^kH&KF1vD8+cKaxE5gPg+T)?-}YKTXano49d20Dqo z5L-<cGd${w!v=Fw@7(YY&Ewe%EdBVH8L3 zPjTeaO!t^OAo7`{2$65XYF6A)G`F<)P!O6N#rytP>EMd|#YfrQ@3SS3WkctDP~jpQ zN+XGJ=y>;tNKLfqxP6a$MwSJkSgcwT{j`wwoV!L-nQgw!8nezNK8yC*C&OU}4&(b| zc({hkvwS+x=V>$U1tRX;2wsbj`;mGCDuN(MmxW4gAKcd?wAVm)T7pn#qD9W%0EE#>j&~ z7n__Y*!Ejf8WLcr1-a%3C{&GczjxlBU!vcS?B-lG}!t)e{mbT_Xf#%%jUXU37JDM;x z0Bv*a$pK2MWw>~b$G^4I(J|HL-sYEOiot6}d3f~qDt;D+2-_Qm8bmv-46E)*xv}>l zEcG~gTL@BSjq&jLspmafkQ7D)C5SYxzPjODx1*}(Q2y* zG)uyqvR=jSrIt%JHm>NWn>osoZw!UQlN(DCI8T*$E7nM7fk56hZk)#qRzEHyRKmFT z6jAvJG=eWCrY2x&8tNV|kPo4AiLG-0J}#XXYi?)0$E>+0{jS#)!*G4+xWCY$%?XVa zrdC)I6P1aQ!gFEo`{1 z@6){)IWNs=E`{LL{09g+6ugw9Bd2&N8;#DgK0V|q zXO){zEMh7Pq7n=z7mv}0$P0{ zQUry4DX?R~WbNFyF`~rO4*t4EFpBJ19uGc0$Jle~C9`ST%!uVpvW0{aLL}KPIbHzzC8KIF6@R zjnpvZfPj`3?Vhhyjt^rC3N%WOY6a`q^;?w!rgZhC{a~{nBUz#LH(-?#h6r}(y*0;V zfX3~c+?$Pot~bzL1we=LPe+w>^@Gk@soh`S^>tUsQ2=n|=O|sDOgO?+mi&O5-GpUN zov6~a%6-tnBSM%bpi_?crba;E(T*hc#|WLgWtZXv@sHeNP3y$il+Ih}3EbE=U%ZgJ zmUXDpA=ypDLygwoN_X z1V%8~mKTQ|$RIqy>4cbedp@iLltJ8tOMi9{4}H0Wth-0IrmJm|yZFQ>A@J8u%#et-``U9B&7sAAMY$G$U^xNmg~ju!V@Dvu!Y_<(FG`78Su>ls0=c)KZmn#38(<1UVSm&=e`u7&RK0qv}h|O`ih;XxRO9h_B!9^F-P_SsCEmH75R&X?W|0j!l;tpn#}tCG;;hGVGng`uU}o0$4K%UwzMeff?3RGR zjJa|RRLn~`bEyg1)RQ+=tu<6^|u zOX!FzHfD^?2xS!!3`M(G=el3RTGE_#?Te7V5*jG;w)Z&AF)IqPn&!692Chm{=`O9U znH!W`owmKc{M{V-NMos+i+w^20>yKNe43}XlG z>=|?BuW&hZVUVFH_mwb2t;U$MT&Y{U=Q79IzGuLzt8Js#K%8$j8c=kx?&T3Zvj&VB zk}f*o5IkK)TO@#X(#ThkMH>t6nCZO~Us%v_73=_Caj#;6L84T-R3AbK-Qs3I@iE?s z?5;4v%gM4K8-xC2p`<-z^IObd!E}B8B~Sc}GP=2tpOT1kdNv_RG7r&pOOk@!UEXyHJ2eCpRq}kuV5f$v zgStvMbckjx=`$Hp30I2WQ~7Ppu?X!>Z|PuU`M(r?0!%1Ocwhhk|3sjFk4^4A006}Q zTE_bSW7B^WjCd@ZHbhf)zNmgHB{QDMqqwNcYB;zaF|9x4HyyewQq({I$sigb=-Y>> zmVEBK;CKU?^Cw+hnhqNjn^Na>>|CteT(3l5**N^Zf3?$^Igl?2-sFri)*OCNKYkf% zNIcQ6(l2vj~~jEH26 zHB+Gw(T>26Zf?+~ZXnOm+hf12lq5=zbR+Y^5AE#=GU@*>I^Q$7|Tlr7gl3Kb+E z0|JPaiwKSyj2iC4l|u|w3J!G7=<5~0Fgp_;{k46vuXqglN%PDM!?G)G%v>fQPk7um zs=8_iajFZMQGdx< zaL}Nq54C@Gw>CjmTDpH$v9d3o^)r;3%jfa3^Az_<%8*w1t1hisr+!C4Sr}qe?Y98Q5<<=2Y#ta5^Fqn zYeq+b9M%Ik8|tH*>n8C}K^x|4gDEhe!J9w?CBvbh#8n99Jpz-37ijKz8G{H3HZ+pw z6V*DW=|}QUI?VZRNe(uJ?@^ZN6Z^qn2k{HZll5l#AtQh}013eJa~z@rRBBH1i#3WF zv;hXt_$6rNkwQ$F+!{n;qG>TxGPgUOq_h%!6D6eXH)Ty|_gg0JO6?nHOCw1p)nHJA z0CXFM`S*&{Rq%6~VHELG4fX&i0}?k8{W2MXFuj_#qVL#+=A0U-!N z!_O(@MmZ`=0OHq#lIpq5<+ zS&hyZEKvXzH8)QI$;01kkeHfD zFq`n!h?&4^cb*EZv152Y#kKVglqqOp@2nsdXXB;lMRbtb!2UsqB`##_ zIr`sLl3lfYb|@=r@e-=nk?SpB`Le~Jzd#+o^a^MJ8~N4v7aq_@=w@bgzg7}cOZWW& zgj{7V3VYU;cPjb>Fs^=PQsY1+P;O($&4L2C)G?)dMb5VXQkL4q%1-C5n*?_IR#6HD^ZDe|L1s=!laevtV+#ADqvYt;+CkB<~(3RvQc`Lx<+CbAOLRy6N5zM~0g8lJUvY*lE; zp31ngUADGsF#X76>FCgC2%O5;YN+%A(PiNQP81jXBjXEq4(g1X!D!zxrWPDWVEU5e zN!^PKAOK(n;DYFmY*#0vKtqDzZ4QK~+(QDcDD{0qepX~qOnmP`x4 zS-nV14>d3H_OF160Q5WnBSas4>g1e?^ECpF8O|b14ianPKxWfUo59BxR`X7W!N(U? zbC2i1GdP=d%^TK0k75?<(-P5sr+MCp6-8tIxt%-31o&gGf>Y6gXmqJjqkbusJ`4)3 zD@WvdZZmjDM{mCrq_hjkJb-)mfsR8{mj6>@t$3%ecj*q5*+S<{mRbkoTd>^$^Z0UX zMW=thEpx^3uIvE416q@oe=K-{M0LXC+1YF-aG6k|Ts6}KBv`UR*%H*~Eah1Bu3Ymu zbru4kfU#q7PX6P=0~Ih8KAtcL@ewUE417w%YXMXqPcZewE)Uf20(*LZu{+Qiuv6O* zIr~XqzZR`ZPGAMZ9QjsKYKG=p`3loE!uIrcm zdgp&(88e7n65!3u-Dw+!huivHiqp?MFDXegkshPjYbk)84@QISl+ABnK1e%31f}G{ z?$taEf~YDXp<@<3B)5i%#)j7h5FWVG;1ZIiMT+qg^f47qqt}rS3}D_?5{h!`3{6jF zDI#RFV+11tivdtNVV%Koh6(hFM@4@{hk`7fqDsP^|Inzd3IxGqAlZjYZyOc2K_Fuo zE@wS+@~yD|9rKZ@Mq9>6U@aVN=@;(DX9W~wEr8wIL;Rq>(ts9H!$D5K8VD}&94gz) zfeS$J37bW%=wpRu=Q#3|3$id}`l;Ge?uH7eL%6{&lr_qi9Briih@@|^(Mu1@$V;3& z&ajo`Cye1ZZHT|4l;m)^gW!#^M}AAhF$Qu-XM@v3?M){BG3SSvs;>?cG&Q;VEmT8M5mY6+cQZ`os`hP!NH+de2Tt2`V8CBYFr? zw4D{Q%en>AU9qn=^0KaNa@YLaM*)%YxMdhMAf~V?uD6mx8Yd(I4uA6}Z|H~6#7ZIR z7Ozv;GYqLyMy9wcObhc>oAJr+M1D#3WlV#C$I5o&&UUjt$=;ss$eHeFez3JW;gLJx z+3=`odFU>E=)UUQ*?6liebCu>``H4PI|1H!%WHY~`Ny;Qp-a?E3~175Jh#d0Z-$Q5Lbu7SpS88bZL;fUO)GPo{Q6nlE8QkLzKmS! zbZ^qYe^v+Mo3xir2EL5JAtsFk3F4*bzx!;Q!PK@19yv^V|1i@P@<@G_`20Ai3*e}>%ybTd}qHGMd-d;y!AHy|AL!5DT8&3r8 z)@;Ft5&+99$B3DAWMY<5YGqjY>&xfv}Fo6*PP9 zwqIj?aBQP?P$Y0Bo`vIRR>^$sN?a@lK+bsT8P9>`6-Md;e80FT&0)R?c;2HCwMBW} zGpx*hN7AD;^y!BH0*H9W5Ad;cmpMh8m$ozCz0bg8t=QZh0!!bJZC>oL{Vt6NKwK7e zQS&%80>=W51cz_@%USzwZLWGcH}`NNr<>d3<>LDNFqe5^*4?y{a}2EJk&YOn_wDug z`Fi&@R-raC6N}dY{QAZ#%C`j?QPcq${RO>@#Rh{C{(pg4sb)o)}5OdOUW{-7rW1AtVh%{Lu5RETWFt&L$ z6ig2G!f;uJ2_b_X#kAtk@3Lj_n0u%Qg`(gEOGB+8q&!%Pw9=D`zBD4fQA0j-MpAkd zEGCzQk|z;2qgH>j{LiOYU25-KPiy8}uQZ26UAxBYsiws6X=XrEdA@#FhsD3x7GFi( zmSIU;R)l^;8BdiMzd{CwQl=@24p^QNmBex1(d$CVcz34n5f-MiQgH-qGtSl+!4;h| zb`LKq4t<7%p!aXOrJ2CSLzOFv8ebmm|u=Hgi5&at{&tsH~O3ZDjfLK9K$4l<~Jx+2Z)k6O*wpo!P($YmIBFzHOcof}KZKVed6Q zd=xDE^di!zEF^?D$ct(s)cLoXn7*V;UU{bO7{#~bI*BBSwbTNCb4H*vnbm7q`I1e^ zv%3?Lmj#<+NvlF>Btzj0e->#11GpUZNL?-Ph=xxEs@l~z@Ux&`^Xrc;#WmVm`BV)> z!=Q4$s0pt+xin(1CNq=BeQ$J34D`B#rX)4qfsIJ80m!tCI;k2_`RojExkPbS0>8b5 zTj8QB?S#Gm2D*yu$22nqEDO+HUw~-SUGPw)Ws{dl!(iQEo)x6!^uEU@u6X4+i_d_H zcNo?x`LL1-_IehP$*`Y{eTM9vL{+`I%G=I~B}r!Kto~7`3Q{OTTrh}sN~DvuiDbEf z%q>Rs2!_2_U&kZn+f}uW zHO=$L<=wF5gWO4!rCiQ#rvs4%sVhbU_22YIpcxU?!KK3Tj)&kF^A5OG@Q zQJ^g%%g13nBaXb~x_L}iMQe9xyXo>aM90A5j(5Te42M$rlAf>WbxmM z@4lABv7dJ;R9{vB;XO&;C6anp8MMWAotHJTS45E<*h^6$F-?qlN<8faF$2#K&}TK= z;NH!xozdgX&a2FEc!F(|bK)>d>1x~&X4CunQN{k{^xCN@Y*jNvs{O4i7D|i!13f?W zs>Qdd18ggRgJN!FaI47pE8$@%4ZXL&>;T8Rnd6NkizZ1UY$Gk0$gF8)5j>3S>`tUU z$kUN&0mRtqx!*Lz8#p6g(Lsbnvh_KFC#UK!(e!6}mK##kCAFo6VDu?qm2m!TAMlzc z72Xh-N_arfl00wPw1H{m7~$Cp=4T){wMJF^DP^CxmxF7ftpgk23OQA(tEQxFgbcl! z4@HV(gyPX>!u;N`rjjZ#$}i?qj-sLX9^Q!V(^U2yv;0r~kuUA|OYcxXX-HGc z*zP@N3sFlRk-cN+@*?DFIhH=A9?N1v0JOA8ssi!9PP=}c(g(STYcvh?a~sVWZd|iv zUwu{b^#?t#F_-29K6vqNG_QSc?ln>R{TeF-V^20l74Wu;(F_N~#d)D$xkYaDlLNNj zvdYD*T_13-Ql$?kxI1+6b1l9?ZRYMd$QUWH6}8{$B3Yh|KuGfFGkMDrC-U7K>(3`C zT7)POrv+NvK8R$9*9ufDt()>6FOD+gG)5;jNCr7Ku5h({!cZS~n;BbRZs-e#NiG-2 zC(Re1o5-DT)iq_}d8;AW{oOc{OvX%3{S4@s%keZ`F6XJGN#{sD6lE8C$|cd7pHcB+ z6OhDp5&_RAm+eiW@~b3zIrrFqz7X~=>|p)%*LzY$O|V^Nb5Ay#&E|cwT|qHJv~2_^ z>p}z5e5wtPm8|f3A{_6QRKU(`r|8Q2JeaS=_Bx7Aa-@_3t8$Up5o@>|jHL z?6c1TbwA5~tP1+ubHl{rBhul-6GS`3fvOw8c^j19I~=X7RFZ@GxZ0*3usR#RS0$}) z9~@Bhx;0?eT{?`Uqifr7VLq6)N+rFU$HvBIq~ya)Y6?qV6w~PB7OUt4l%tol4=8ZW zq39|Gr3}odI=YGJZ~QSzlWi2u2;bRo0*<30%r8_-&BEPi?yk&wuLY(Q@c9fRhcwvj7DKIAX)ML5LN%?=q@r98>wO<*zoO2E$y`u}X;digT`6!Fk zPl<3Pa=EPsT6d})wMhbh;kdwOGoGE#!a0NFHWgX%qpX~6Ax)`G)K{ zC0=`GZ@v7y?5uhFCSJR7b?j^veF&Jn1j@AUTwMCpEOjYtNolM(&a!{-kDPT#B5|=) zb5`o2=L&LlHR4Qww=aF0TsXGYIT`0}YIH{r2Qj-7uWybaS16ru6Q8;0Acmj|u+NWo zAZ0?VKaEVjk3))l*$#}(Fzj05aC3a^A9DCPxXtT zcnz^-^qpsGf8PtO-|??o2(7<)iFe?Nci4z`0-@yW%9qTQf6B>UM(bxRiJK}a#lU1vldoAo8+~1 z1xFHsbvB7PTElC?G~%JA4tD;vdce^{7c#S#XwQO87BdGyGaV`B6%Z4urfly$TtBEg z?C@XUp(hZv>HQ&Fmb?2IVop$`F3diWmu>eJMy<9gqzAUhC6FzzLZ1LS_l@C9*P((@ zw@p)0sr00a1MMY{`@lJFdJ580N;wALEy0pcoI7_Flc*+aUW6jnKNV z59C@>ZN5J4v$26Z9PM)1x;>zE`bO6bX{>kQadAN*is^EKmmLb1?c1s!!jf-&MZY#w zx84XImKec)Ql$m|ocUNCS*2puytw417P&3;r}3;1M2=zrbSKN=W`2btTOHLplkeQrAWoeZx5x|J=xZDNBqq+c!7WHX!hBUZlzv*vg80`}C~XZ~ z8?lP9%5+OxEJCVFoY*@(-V{=%0nfKOb_F#G?_N1@1kpec6oE^6O7Mis2V;`gSf|rl z7NV&VP2~lZ7Fjixp3kZz;9nZ~ZGAwx2KIHy`X|+Z7dcx3O_3_Dod-qbB6~3)xwvI> zmSI}q$x&Z_5w=_AjR>XB6*S$3o-7hI7os9uRtvmf@lSg=J$E+!)ScGMpQ+wsZ_wI1oYzhkE5l!&sFu1`+JvMhTZiH0pf1C#Eaiy zgz&_3)-h`sB+7)maa__n4B<&qoZDNhF(5y028?}I*Fd=;y7SaFefS-B>lzKWYKkjOj0RiEsm+X>1p7jOgAt?B|W*#X;+~5gVP4tsJT>CIXvM z9<>8Z=_Vz}(S~{Bl$1ycx`Bk=FU7%efFn4sp0*K}j}e@wtqP&PPXWlq8PzX~B-aT*g$inuXr#j3de$uoJ_oYv zbU%)b#t~5Vb@*TkMQVEh=(7Lz^PQUI%);Zs?~dVsI{ne|C1i+`YH&$Z0;eUrqYhb- zFBid<0T~k3OEF%NKPze67#z;Xe@rJ%Z5k_cctmQ|O;=>^613v;4`zMv?!5nn4jT)b zvp1T#szhHxl*Zp_<(ORlq}YGtIdVQky~IPo3jk%I995HmZiPBOaN$t-?nQw&%;zRLCG zEK(=1#0A`x>z8ha`~y3Qn>GcG@YE6)=}Z~i((L=01`W`IKW~-fJ+5Jxc7;mSNERfa(F`_%Ninv2rB!a(1MN~H+C7kE;%BOQu}T;&U5$^ z_Lm4+Dv(!vRSMH4WKJb^wI^$bpqLxNAE!mGpoJcG&?;Q9K$%%LS9|Yd`dk+hly6%f z8kFyKvn_53L$!SS(P|`Ky@@Zk=&Z#&**G7lzYY|UEsA(6Mr2vif*XC^!xP|YDy7Hj zfJ0v7Tmzr!BLc&fP0e|%Q>P&$&rPfn)_IQ}KEi@l;>*%aeMzN z6N@{5ab`ZUNWys#!=Vfm%4MC~k-2l10#F_y0`xfo2?{POl#+M-q=5w~zMfP6V^{gB zDp9FYuM(*C8=AE=K^sp#xpZtN}Cdjq5Y#*!LFG>YII^ZY_KCv@`=lkDb1A@NrMyROYj0Z#%L>?v^V;Aaz>gv?MIBQd zCz*14AD-E*1i3Z`SkBUfos+b@MR48~3T=Ytg>El*EZ-Gl*p8ZMfz zGLq**2*s*WsYT=BALKPZ2V88r*x>Eb_mGQ?ose>J-A=Q<#a}ZvG3wUW#Dt)2<^-!_ zxPimZOBPlQ__go1oy<#FXQS1z3q7iG^V0I&qQ>2c=;p_Q9Ht<2U# zWD{+^dB#&-X`Rxt3{>%q(?~Q*0Uhh<@xkJSyv%vMzQ1zg%J#H#55Q^t%6+2sw*1Y= zY0iVdXYKvoBJ|3P2t~6zd39Ve`FKu|S0(8v#K;Qr}!0Q@)Vuom~RBi7sLR)}y7>> z;q(uu#a0bf13Olk$%k#8+C^f4#lwSxrmi` z@k?F!z=IUK)q!cXPJNP2uTxeoeTZ#-4eFDt|w4H-HH;WtaqkxL=*ZT*+a)w~vwDwVvt=_E4~eRmN9kgzBKe?&IMuh? zbD6$!u(X#%Q803&FJsh|6MIU_8Y zOf#_+QSGb%Z-oRLdRxuE@!i2=Iw4Ww+c|^sU;zm3$%;!*$u=E{(8%$CM4U|+-`$zE zNy@gI!s z|7Olzcr_Ij%78PA92>f~WG_5(WbI0iMJnKUX>0|54ek?3LzJFuGZI`U|3DLJ+9h>b zucaBWXQFM^A0}T=dAQ%@hDg+`3KU1-TZOPp3`lYK;EBt-ToHr;Z#)A#ELWAoS8EVL92?^R(O_7bhk-puFoVe5=bCK&NZLG|2xM?DUDU!b-Sq^40G*;@VWu9xP zKczB!z|fSWcaYgfs%(XjON`I)=+N4kq{NNca)`;k9 zfq>gVQapB*(YGndP)G}W@dRHNl51)}IM6~bv?qq94bbVj7 zUkFFz2APckW_P5f$#+2ki(7u}MkKnCs8*kwxEP3~1kOTu4Q|^L5|+}yNx*g2z2~Or z$U?MPTlN(bajv`fEwg(#Q>0U|y)K?pEVAeLC*-CY{KFL}jg|IN>o}r)u*@@%*GbM( zw}CR$$;EZ7qCH;VT~sgELjPYe^;Y`M+CpaT0o=D+UU;}*Y--%2+9@5Bw}uD0f3#`6 z#wv_8KSIubFyY_PBI?JbjQc-Ai~ofZY8J*O@&+zWCTbS8#&&N19cVd| zF7hFx))g?33=0N}40qlhcR52W0?$wEu8YeQE}4&(T9rRB5OqrO4*qG<5d186bmVi!)R8L=ffx|j&oh4SSw17Q&N2H2*nBWl6W-I zv4j+|0N#o>eKK%%Z@?ewZF)*$TPI8M@INT~rYJ$ScFD4>F59+k+qP|6UAAr8w$WwV zw$W4P&dk%CHUGV9D906-h7i$nf|@3;69E-w8Cx?Fqf`DcEC$dtrK z)*^N=O41S}#b*_Ha@k}5EiY;(nCSe({y=f~6xmV*6ep zyZ_#clr<0`Lp$amNt(d^cER{g(ShAGdv^m=JvBZE5{Qm@wi-A2?aq`ZOH0dX570v>aG^2^ou^{M-)VLQDIlHV-(U zeC^gyy`>%}3_0LZ7sAqScC1aQ>@=J_**;{MBs!DS8%7MXI@aL9xC!R!Jckt&s5Nl{ zSI4=gzU*f%n;rTZ=$%Orq3n{WUYtBRF7}TFG*l&N;BoY*EpP!O2ckax7S<%Od zotX!(tu~)IL_i{f%!7I$?XE1b)}m-V$z97KU9{s2Tlg!#7$gobTo(i;Sw=$1?X13o zmW9c<;yiTU`8SRFaDsc~g zT9A6g^fax50`1RhVt%cZKGI7*skcIBR1a3BEca6ls;F6mQCs%3#^y!{WwKpWEsrA~ zDicSp-J6VpBsup}_TZk1WW}dyfGWE9I_RGsLJ>wsdbZk;v`?^J=3ae0kRWe$x6AJF zJxhDl%-uEVfPEY=hBO}hFa%k)9OAzu2f*M_01@;~1?P?(!j|@nV%}aNxuTG>3s{h* z1Z>C6=kF7Qp(p0KqSF>@&6%MWBHYTP>_8+g-^|dq6w(T}@?t8<@jdH{Us%eaB0Ja; z501w0H+W{iT1eX{&b!Lo1>p-Gm-c>4?)db(l#o54xWey8b6>YxosEu8O|ZMkT_yEu zTsB6AimUmBbsan_ z)xtFQog-E3f(u1r$o-epk`8=FaD1-(#I%#g?fbtpnb3E{ZlQjpIsU1-|6Y&ZCI0_M zT{ja8GjnGXV>-3}^YY)J)*oqKIBl>Z{k`r5a?&Ft@nlbJA04VUOB#}8PSwQKD$lgi z{6$Crt(LHRXP~ii?ANOU00PMSD1OMyWWv}Y64)6z+~X@HKS@Nc28nlyS=4RRpE10M;NXFi2h{lhCy&F%U}I=ef7di5hE%-mtX?uZ^&uq8xJYj_ z`&jcm2+(DBQXTr-DPo+i0~nLGdB!*XvZZ_s z$s7d410Nj(H<81nNG))1nMAsiQ)Jv9ZX@ELHyS^JY1^RyziHGVMdpbByhNYABTr6G zc2{n~+#9$fPe&Jawj3XJ|E@K`E@h`t1Pc6tKd?!fieRBN=m1g3jVzsBcZilK-RRB8 z0z5saBWq4huC7je<2VUMeB|7b^XK_j=Nw79yPpR`J0}i;`aZZy#*FXn-coqI%Q5Y>KEf>t zwq~?u!6Ht?Ly-u3umh(%0PU;MQwU|iujY}3fibt6Sb#N3DbcPdh6Cu}nDVC}NZ~^S z$W?wMv(deVz>mh-`!Gtb-3Ai>L=q)>F5<@sa4njh9zF9M@EaAd@g&Ew}_c&*z15?)!i z8U9gNdLR(&yOs78BP4ve4e7 zMKPc;tNp(D>iG5R)DebYYwUB1^;2=zIsW!^MKxfJM|0dWz(*AdyN-EFM_)a@qYoiO zD+wmpsfl&>>NmbV!ae_~bRW0{zwu0;kpQM#FvBJ=ZA@cZA>dFk#$*c2!k%JWRG9RS z0*N>vTBRiH)XQ$NREK0dv@Az4!67}|ZzvTed?N~QSVemGH{nwsRikvCgzOm~hH6j3Ie>O(v~LIU6o4GlmUl8`1b zOQWWnA{`05Si|V4-|TW}Z*g_ha(z);M+uhS5d(Inhqre@xFosxCh^w}LEvu*M(j;* z)EsH1@mTnOw~=dVzTo~I)*pWCG70f|nqZ42z-xbDeDjj#_D>!KS+6_4n1l_V7)ton5BpOw&Vo1-(#ZIADc}p$~^E-j`>MrV-Ak>|*YV|FV$#tZts9_|-VIKEe*>A}1 zDe&Frg2gc&wPSj;tzM-V`cRrVB-Z^sMzG){Nkw*CB`TF5%#-|lIXfzfO3fG|LnhM` z_yhb3P#ml-hzq)!F9jWC9Vf>Gl?yQdG?t^RM&xuK38i{)`b)#CIL^T9FvaRn9^vJl zIDm@OR9}AKI*xU?R3fKa0P~>Cs6_2lcL80jd!0n2{w$&g^0Z}Z$-O)+tLqO8 zCjZ4Z1A#QUj?Ibw242mi(o~HkL0)Cp0aIoYfpu>brS}L)ZpC%z44q4#`^RfIALk?k zjHYbIxe*Z_C#$EDbrGRKN-P60ABoTFk{u7d<6rBCukPqsM{7mtX%t@0UU6`;2N04A z)zZz!`T;Y;SMDqv?y3*m++*(8_HqUa9#WJy zXYoKgMQ<>9Pl5fTF+==YhT6D^vK5p=7|VS}XVUoV^=aLU#XB%E)rG%mq;vtemBj1$ zn_FONx@wgPX0CZi1ri1{02Yn&b>#3zH1*VR4d;`BLOV!%+0A0%EbAA|;{7v{P2%L6j%U!X@F98>OLX@FX zdycdxqZ`I@V)SPhMQjEAvbvx)54tYup2qi2e%P;S& zFaM%U*411s5TC|=md+cPOqNmy3uszDq$Mn2nt0&jRwuCO#c^vEF$kE4r6@H5@fAk4 zM59&8q+30uVHUNfC{voqu9Hg0YBDRCm@-8PGZ(+S@~f26xotspHIiV@rb~v;pfM);97px8zI_5p0I6T^r7BXj{uip5L|?TZfA(H z__rFs{$MQc&+gu+UB`wjXJ1-E&1%C&CMvc;%|aEq)nktR-6BV4y_?adtki!vZ0(@? zCF;4sqhqsF5pb(rL`h^P?nfANZ2^O_3{<14_?VQE0CQMu!pi^|q6r-oNO6J=bVt;Lz zqO>{88#_rhxHwk-P@wZ*<(dVhrt7@?O^+U|K-|occ_T$89PEe&gxc)_#SUZ0G-Q{y zqm^BNyFdy19ofQ=$#~?5+W_G%i&$lJAas(vf@7@OCoL|P1MHoSOs!-uDn}{<)P=^^ z_~DbYRU-N+QML-Mm5%e2$~U^U{WY%E`306s?sxMUE>^0sQOvg}scl88Ogy$hH0uG4 zuM0WH!2fSk0s}D?4{gIZ2??(FqOe4 zagHIS9`F;rI2Qm|epN-7YGv8WUGIXd;4v4nE!Zrow;2MkI2&X2k7ua(AXMq9s}DAI zlJe59>uC64$=eBx7l*bCo@E|1*B?FIZW>%p?MltHFIX>g_fS}GM>GmFqNZHQIbr>2 zSQt*mxHtH7uXeS-i@saeNVx!^F>oZ9s?xdjWF9o(<(<)jrP$(zh7r6rTFi911v-g$ zL4CMtw1IXT5t8V(rQF0MTXRXa4wD?#ticT-{f$Z94oO_=7hLbq8z*~cg=f4jJvnL! z{GeQ|)LcS~kpkVgVVjQ=-?cVg8}|tV^gHPA>05%k1@u0RkNV@=8r#ot^EHS6_rV^f zq5G@KfIGmmUg$xzAWV!O0?ba@Lxp{39Xx{?RSZ=S{47q2XY37)c(w+-BKTpqH(=G2 zzx?x_R)9uDZc2#@`Bl+ZNs0iEpBm%k^A-^N4pwv2_tPOqKH@(&HJxXX zZ`SK!W)aw(zE01jHlwBOmPKJDMOHKiu7?ZSoXa4!D9$oo%dB@Af3uDnWBJT?)=@`` zH5$ZrohjkR+5CxYuqyzptH1G&L!$z7GhnJj`R7sZX`D+tDwQKvS3-?vpC6faxnnG&b@6P$0` zJ>DlA#ZIo73qzwFAp+v^H^Pwx`zgazJwbXV)Ovkp=E&z#kU)E1P{o=V1lj>eaw=`- zsE$!2=Udh)JqN>mzs++}!;sEiWu9t}Ji?-F%PCzyR1O`1xMiG7d+-2C@5z(pjvU_( zTT6TFK$iW@IJHNdN!+Y62vJplUVep|H6|Z5`JTOdK@lv1HirvV*#Yp2pg^ufx0aLm z$X%E{baJBvFiTbDV+VAG%(XK7y~_7Axv`6G8<}GHtJ(SBrj@kz!va94w7a=V_VUB( z?G)NKYtrZD7?glV0f<_fa6Ad9@npc$OKL~n9KBft_;uTqjyfibkrldFfPr_=i&DD{kolH!glpDQFCepd`P-FSL!ZjVa7=LMIHDsx!^ zg`MprBAAX3=j(sn0?o00Pfx=G0Q`d%{5y`oq4qz-5&l~=XKX8{gOjOi(f?drsJovSaj z{I+&K;8!D_p6)$CB#74{YYAAKVc}OAv zFG_Ll1io!;o;WsYLrBC5*X7h+7GUA-QE*kuo^f8hXB`!MeNV;Wo1YC)+M0c=@bO3(! zy}&R64Eh8})`z+jpPTQir$L@G-7n#7H#@sdwHLnZzFlXeK_yl*D3sh8LAW>r z70Bp$GkjcvF0S6MYZ~dZo@<@wYrjB}xXA6VrME4d_O>1p9mj?4?i-&M`?YQoHuzSy z6}J-{!E5w{VFZ5QATdSJz9IkOq%c964>E)bfb{`?=^xoo`>?3l07l8syGxJuT?7c& z19R$MkU`L_Ko;GIzxSJDK;mAfiDk@cTUvibikM-WWV2(~g+Ya{exr@0lQ?r1=Q$9- zv)>-(a%CUP%t-j=@=U7_l;#ccgV>*PV~*sR@LgtixdVPiB_@5AFRX?B735vbnRjmR z>CaWSM}8o`0$AkBb{~;ZhtMB(rOPlm(|QtuZxQP)3G6;V%$>ir6)@{IN7)&2IE~u$ zoqcr&l6-)>Rg2FEV}BB;JB%u63S?3nHoz{1#3{i?{DV@5FQ3JpkTO)dKwTV!5XA&4 zLh6)Z|4E?_0;rCEMqyBhi07z}26^ym#A<~_BAo`{$Sw{O8p#ZHElEKd1y&%W+eiRf z+)|ep!wVe<1~EWPn7QYv4uEf5NwVWOWsKSclAKyXGuLR>{9a^xo99}MCT_2~Xi_pdxfDVlskCxDn=M^SK zwj2(YKTZ*Jk^~utJrg%?WDa1#4U!-VvrMf63j1qJ_!fN-vWD)@pW@gkzCgV^!66~p zxjl0wLu1KY|M74>H$kSw4(t`2*wFcB0bTK&k>olCcRJ@j2y_=R5UJ37MZ?oUKs8pA z2~CdIbFzb3|K>hBdh}tyVK{Y!+(HDX;!|LY2&R|tqA-4DWK2?#ybR{UzXkyrolXtc zQCrPsm(@H*epeXaR3Uhz$3F-X~C3-_hU$avX(%N*r+iKy|I|w#$bLf&UTHu*e8*a zK{$fI*35^H00s~Ga72Otv}s<0K!qJW+$Omz@3KI#?ka8(Y8g+6UnoBZDkq3IYJ8{N zS!#aO9yjl+R5hw!(80~}i`^vWaxXc%3Zg|Xj7tzWa&hg>aW-I zvGmc{Sh@$i@TU6rNuJspPBXya30~vpNd4s{QA&bUM>gI-Fxbl_v?m9zVPdhLbj$+U zr(Mo#4-zOfJ{iK;cerc@uBD`+fgd_u9hmbY(B=*J>!Wmwb|q@f}69}c5)KFxo&Z9X1(mT3rZyt(2X@V8%%=Kk`;<~aO#M`M^)3&cnNVC zy`?J~0O)!VUVq!=i9x6g9eL#Hw)vsHlT%?UlZcUk9{MUxVfNc({>IIbipkb2R{ABE-{&w&!(SXw0(0rbIPdv&{>@khJ}nR5B@h2Im|2HP9}yG$@n6cC8g{t}WR!JHVk3rG!%;tia4n^^<;mY9z+tjINm z46aFe&TOFrOw8$jNNPMJ!2@<7MVqWilZP>z{JC)cVC3SH0bOmN96u&M(( zpo<*bt%85aCa|gpIv{`?9HfGe%__jI4LYEJ99;PG!6v}&ivOtyTj-QhL~~U)$D{W= zqugU7(k@qdR&QQi(M4*qeP3kJV4;uH{GBEMLhq)jCF?mK=T~?Jgkh>b8K^TpcMelF zMNi@%$Qw>Q=4WTl@uZcSB1Fq%RzbtaH=*d7#)y>_I+L4%%sR?{n=(~Iu~wU)JIVV-IW(@4;tbd?>9Izq*n?RS3cvI*18 zTu!%~r7Lb)a^*Sl4`s$=BsXZ~2LVuTk=4|~c}4C7Twgoa`w`q%aY!v8pxB5vMjFKv z*?!j^8W&qyn=&;N7uq~wctulh7ezoBFvH5hl^~^7;6h*B>)$qIrXG2EDx-Za*8-j5 z-9DOo4Kx%IPx`GxA^B>!CZV!i9OH*45685rM`^tO>^C*gYN=AEx%j)-@-#Zfg~DHB zjBKH81TGE@D>^WaWPp1hMxJGA6mi>U@I*ZX)rPRk0~(b8x!fWTwRJNlS@mrtf}o>J z%VO1~WF5<8O$3HRdH`4y4H->m_zadcDbNIiX}+IT%%RD_gMN(4I_Xp=Hy<7tI&VJMBb3AHGm&bDaXVe9lEH9^m>f zi-m~Hxd`p#HyI10`c|a-1PP&9dxY7MZ_8%O#*S0R0W8~LlJ+mAZq!rD8BNIp(Y*-F zC&lorHa@<-ukBz_BUDJ4I2j}Fq9llK%spJb)QI8f`Jfi=Z28}L=q_gJ7aE_#4_I%^ zYl>=Ev28@Kcm0ZrURq5?&(Xa5e5Iir*?wo>uA9s_LM*R~@D+t@dCIWw_91*;6?UuW zqscwty2gq5sf*LOYll_yn{E@+t^uXy*O{OxNJvb#E0f~bWM+;d*ARh_D81W!D>Z6d+Q*jaFsV2#S<;BCbEDaP~6&|0)q8@4a`i*2+= z->c1T_*v}D5|g5Ore14Hd(JE4ds}p_c27tAF5zZwin;D>l{<@8w>ctuie3s%LS9M_ zTrU;JqT`*aZBV)`C~Vm0K9#nVyfet9Md57=B zkU~`Pqw8S$hEajNle76ziSB^MhiTXT#n2^kH3nU~4y1>YHbV%StH^3*n}_-Q>V1J- z)Isl!WAVF)T=>a6u!GY4gvh*;2jUsKn`D1Hrho;8qC@}{IZ6sH5$!25J}GkI6THe1 zcwV!>(L)gRyWPBL3XguZiB-l_{vxh=5S0Rv78=Fh8svW9p|YyB3UOz_rtGV{44#gR9#anxA;f~^qc7!-I1`S;;w%>km@04fFc8s2C5H7KP=s@MMpAe(yqx`JL*y2w+ z@|&9n>!gHI&P{Xd{0d733LvTh#m%vq2}ntJvdJ(9x!~P4s$o^%gdR?;MK#uh#jvUp zx|x}mh`ZYPv4kRh7GBchgL)d{Lo(eS@kVsWxS#aShTTbphcd3!4dL|-IW1jM+;dJO zs}F@5PHpKJ`>@ndZaly0yH5?-pyL}Pf%vzcsM>+-(%{m@_0rnWo5tUp75<}_?#jla z4;9$1kD#-h1;{3w*{tB{-dQ?9V>E`lZHvEn5kFHO`Oir8k<2_o4ow-xxKLT0Nabd$l`jcdF` z+RrrriD`*~1csvIVy+f|cy!9x{XUdu9T4i-tbQfzYmvB1GUo|J?>kYPcC?OB+QeHi z7eN(K2x&N6E?gP%aN?b|r&0wF<-m)`Z!7tL#?Isq;-f8lJ(r8J&#=I}+-}!WmQs4| zY5v-^wLd9o`d@z%oY}17FH+9jPuFM`?ymourf;jq{Yt3pnCGl^A@0(gTT<>Ww2nyC zrhkCzH_WHjDUb6DsTy7}P zNNnf*RU!vOsv}Y4J2)eNO4re?*XSibY{rHxu6uj}9Zz?;_=w1T zH;QubPIYSF%;AG41(sET^0J*s4NE7v$#u<^NWAlBKcnlzjCynAz+=!ltt4;b!e@t<;h*Q zm3_L+$yANsQ%+NsOQm4Sf#VkgVaaeE%~e~Qj@y>-;O|>u4WjQ)-1O$MX{nS?h2UtrI@Wh18<(fh2 zCn>^CTr^HzI(}T>ILh~S@QL$tB%C&b_~eJe{S4B$Qe3X=fle$ll7(WYN*JWq-K~oA zGbYF#a_}EI`EBoW)8?%{_LQ>!VxKx4Q$E4~5o=aQ-N)LP@YFGy!8b~3bszXQ?CQNb zU6IUFGFRG5?@9uz7~9;Zs?K$~IvuEdJNz!!WJ18R)s%Sn;%fTw^MtC%Q`ODX(rYNU zk)^R+whrUSdb)4Fhod^YrilS~?WyxRw(@e4Sp)MlAI)~@KIJ8V)!I#jO~d7pdpdu@ z;vy7rIy;|4#rP_JjqpQ@-0AKvRMOTF2_x=&MSBLk#{5%az3bTOB9@RB0(@lPO7(EMZqd=DMWtCKA~9min_ zH9Tk;>BF<2UP@3ceR==sZ3P=Ui$`{%&Lpa3h}*hl3~=n+RpMxtPOQz73}vOlrrzuo;rM(tZWq-hG_tKFe_JA^LZX$IQ0r0Ie#)>)lB=*3SlT-K~KrmTk7>@zAec<)JC9vra%%hcjpC=iz-G@eZ#Aa{Q+tOdTx}U%P*-bpJgC3Va0s#02 zsrq*e%lv0+k^TR(oB03i!u*exndfXb*b%&6)TrN$!BbF*+Ncm(!#X6gpu~~;UC+UW zw~|v-krX0O#3w4`4|h6~idTPcaSiy3TsyLJH5w!I5q5m;Z{4C73(!f+YvwpEp4j7T zxz~Ov$yvzJM|vWF)J?SqC{{{00-Z7~h3hL@T9w>kW2y*D5t~c5)o0XFMfTCqr-Mie z=!i6nUrssiW5+S%6@E2blzCYvEC={3i6J4OtF;BUtu9`fvqQeRDbWP-*sXl?>30c zs7O2=f{3FoYeT3LDT6IYM&W>v3{qm~&v zGpZD)H^IicLFCpP|H8AFd=zp=ro}4*Neh|Ws2m0|b#qD+WX`4=jQq$v!!G#naBgk8 z2ShtH&j)^m4_H_xLShh@Y@^?3z#CH*+WZlF-M~-BBHBS<0;{LY{L3~IK%Z~Cj3zP8 zh4EW6El}ANCX~Eqx|(J-D6htfFEP2+87-V99P*oxv)ELlzw7`+j@{yZw*2o1U-sk0 zYoYKo^tl0{0F=(Sx_QRzII?wc=vFKlHnY#VW+5*o7S>ss||@aMS)V@UOU zmLe~GP`skyat*W2_1q$@$uM#h`djZlqrwxQXPscq(IOvQOYDfGrp$){-zs27iqtiYem3sPcz<)>nb0cyy%5Vmk5F_E9*8EV5S6GTMzV7#3$x!%$_w?tiVS3H|S>ehdi!!2dr@brmNQM_~hJ191~;dlN^e|FnwS zoTy;8PLC3@^Md>UY{vkK{LmGG0cAXh6TP$Rq3omAI)X@g+RJJK)dp{ zDaM~2VWL2V-`R}OVf0F%QRyJj3~Z_oWpxmnK#BFW%*K?*<5OpUGzp9r^_4*8XJE>T zyg542`!OUJrTKfqLGXl3;LvTZRHY*rgo|S?PC4NRCxD$%A( zBlajEX6eKTn&@iwDtOSF=msu`C|k-4YTbjJC~}Sh6B!jONUx%%xI$*L`^Pz&n_`1> z5p-zN zkv7~W<-8iw8h*kXldV`MFl4az8_A}7+j-b^FDq1wT2R>RC7--KB6HuL5g*b`IiYC3 z0~WXJ+?U-fS=Rf7cqh!iJtZSW)-G11=k%Yq#tZmNP;-gJFNpWuVE#!&al9l2^ChR{ zbHG?BOcw#hP>lHTT^Pre0fS8_lD`-1ytU3R4tQUm!K?i4mR#j|kkm(fF~qJ!zmTo1 zuXegAyX>m0<{H$p)!VO9dg9w!YjE1am=1ifX7zR)r!gzYo_lI0jg!08`t$yM!KT+s zQ?Vv!yyVZp9BSOLcA%|mr{#! z@YsYush_KP;K41i{Z#p^LQnB)Ju=WiF+svfomysh%_0+S*U{_-uURze+G5{&x?gH2 zRkAfI+H*1L=IBy)NcnR_+!g2k6zm4vc}{jmTXQVCEe0_iiP(C;4Q`P6P{z2`-dp_l z#kEGpYQ#2`EvBtyd#1sn@D+oA+nwvi((flf!6Ak-^X^H1^7Wsr{P%n%`;pZBcSfeG zfs3^>oxG!+vz^fowaCQ8NyyIH+TI-53_asEEvIg@+m znEP@Yqm<~g(){|m%giT(!IgcaPs0$xBBSPlh z?}rmK`xL5i=YQ3x9e&GQlMhfdnuzG9+!spzKATIzdReqq4)9-)#O%&gxOqqR zIh7&pzE~@z4V;$Tr`oxNksP`Z2f)ywNJ+zqXoax*NPM88KKtTChcnIn1Ed3Ey7G0F zL@SDXKG(*U4m-00>xGQjn;9jx&?Clt)Ix0wcum0W%mnlskWE^c)9M2`v_e4(Ll$Pw>Px-$hQAzg#(t&xwb> zb`wL{A+%nt2XVqPKoReSyZ={>7nl7ok^lKKzDDUWrB@qYLuw$rHPOy^9q%*#S1=K_ z(6d`Ag;GC}sg+T&2}4$WV|9t{Y{7wI0+vyU|5(UB+&#=OyDRF z0_?#@v#Z75O>nXNL`@J%{AlhH=UTr4M69bi>PlThH~JGq_i$6zl9~A5$`$hxSg9r3 zT|Haw5HjO?qR4|s{I9eEs1fyHg|NtR=Z~R60SX;EcgAKBaNej&QdH000S0NBIGSaS z(*Wc^S!mWZ={M$L3|kt}^h5B-TV$vOs&={YsgQ}7qk6))+pqveX z>*~FrPe<0hr)-6@M%>tKv+f#GA46w2v&m=%24kQ1Bo-zW`J-laKOsDa!Ej6y0=DKp zZEg;{xiO|iPYU&X+yiumb}@|b#_2` zsOV>NjAh^)WlVEO_t{yj5go!|YN>>UpWZpWJTUF`hU|;vH}#LLeiKqi9E7+eICd}9 zZZ|XoBYIs4NJGMbl5>1e`;=+7R*`CuXw+w3o*Pm$nd(IsM{!5m&B`l-bkZaU5>vR2 z)o254IULv8=YSd#0eL%X=yBxrVk7$*NbMWXv$puJAha({NRn!IKHv&0+g(bv8U-f( zlCTkbmRHXB2Kz;uvD3%ukG3*tXdCGtF>2Dg1-w5HeumnwmEd(+3Bto~*z-ly#iJNI zhzV3tL+%xdm9b6x<~@v*v`F5E)YFZ;aH)zwYniy%w+PPq;3$ceQV}2NaXqx*oJ+-w z`vh$cpBU9vZ<=5He&}D8}>+N?c z32XK6{?=G9CmOR|XS*?!tM$^XeWf`7mUDu&(DRYPfKc+gGVgJ(ivxF67K=pK)VB9; zfRr`L9@@AgNz+7lSBfP>q{9(&a#|p$cG8e$9>Gg7Wc0zNOkE*TI!dTjmdA(pzdsA|@)cD3q)xX<>qo(nuB>L`=31c|OcE&(;OVafyJn%q&CNBo7rP3c zC$ZHWs&6?;6uU*5(iJ;g-WbhAHAzENmYw6qIdfl@wyugM*OfVbEuH5tB-}_Z?IT>a za)P>T2HZW0*wTCbTQR_!1g}SXTO9mjXS`@y3A!IK#M+k|Ymldq?To>%ZSP#N6&Yg< zvNNa^tp3(p|zpjvC7 zHdzO5xkmBLEE=50l}PAhbQeo|cfJ2FO5QH)Cgk3aDE&Vj^xu1{#1Flf=3i&w|J_?H zY@JOUe^|Uf3|V6lWrN~kQ!5Y!7JfrwJ1QbzKO zY*2SDUtS{A zibKx2#t|p2%qtj8k3`VyH8)HhN*}!p+_T_FONIO~Zcm!gYPaP{d?a>GN0-u4nm9+W zw_iR_pn1!HT-6dQIp@8`O?4j4sFr88T9HJ16paB94MSFQlDL2)bCw1Q8^!|9KnH-P zi^fHgTBNyJ<@8=yau~tdjguxj*M9BWOt28#0X@YnOZ2vm2KPhun^#X*#BsF2JS_)= z2=OXMsZQ4%RjCXG1WG;Qn7qkN;V6!!@{~P!cx2Gq+HI(Xt>`+ym9)ho34l>iHTMH} z^S`Cf+1V~6`O1=M^ah1w9={*GGZaWHN9c?7l=5blEMDtQd|#wC#5UHw}bZ!2ZV520)xRl_5h)m17OmRE=l#6^BFN zTij+_k!aYtIf%A3GGhCEE}(sn=!{9lsud8e)R1(0xIylV7i-)1aPP>U`dEIblZ))D zF1*d!M#9oiB|Imhkihl>=en*w9mMo4xfPbtW8zwqlzBcx;M?z3lXpS$#y)s)+Ucl; z?BZF=q)|*DsmB0iEmoP6DNp`l;CaC4`rPJ>^*Bd(m(HbWd-avk{kHcy`{uYn9!-Eo zWz~H6W+zg-Pac%^Ge^IZC+k>%E&*lZJ+);Sf!ryC$iOI^!7iSuF9pvZ29v_^Oza;| ztD^ghjevUy8fK+TblIj(6{Ei*o54!|C(pQGX3e}>`tBU87pxcXpSiMv%osf6$13rk z2> zUa=BV{JyTPnqCNdL{71?JoId&vm09L%v=>sg5@ z4(GYSqK?ElrJ^R?9fa(FWIQ)Vjbncplg=S!IMUl^bi8KSTM`^o!EuK*Vf=Ce;wXlC z8=05S_(jf}qIHjf1~fCj4nq2x5Q9<2-NtsRy(A8Oc@Amub}?~ut?!txyVld{}ZPF9>AkNh~~dr zYyZE+`~T`M{HOYTrKV%IA&TI=QmcMg+(Mur5ZJ=6jgpMRrLwmgNJGXFfyNn6b%vQx zx{Xr}A@bMDESCFs3i67@pVAQs{fD+zyv9Z@>0UXt!c@MO8Rv=OgKheQ`HOVZk3ik% z8PD0oQXV6(_IqotFW%^1>vQuN?JA&qv*{+JW~RQy)V+Dl<>V?P8Z%7~s&Z7bMLgw< z7g$mu}L;G8V>Rb8wmsp<#a#ab(=Gd;|!3EDrsZ%uR#hV*q9ac~zqm>dTLc?}e zQ{t)p4+GQ+vp{ePdy*#{GU=3~jg&VL(C7;rd#|IB7Ywj7cBfan_m1|wJsiRHdgxt8 zS~WUnhUr%BqAIG%zR`!ngBOXD2Y3!9_RQQ^F?RAm*>IyLWNK>8o(>Ygn6R{?g9jIl z{Up&fbYj2M$ROuXr8KGGZ~@%WJV6kco+VFeXg|PYT*hc->(Bre!pC2$@96HERC0 zJM0S|m1Knx8gzvqmcyDUWA2cIq4a9G_j=FW)T&k*>#F{)fAH1ia`?K5pP8@l$nR^@ zHp5K&d}e-Q_3%WWefvtNrtLEz1`L*+SoAls%fWHw>|0QmlS}x%jjnLa?Hf-Ve7+k? z`?M@hQQKB6cZ(J%^|Swz5ByGWpoN*DKP+9$qDnc*TmjSxC~07OM6lwg>|z@L28Dvq z>tFGx+HW(Y_&%9nDR?r%Rt34bi-!=O7HDNTgaGEY>2EJXs*?^~2ippDm34@}f(-?T zGtHIiO$?aK131P$x#( zsXm{JGa%=$=!?l73n-U%6z6CTU5$ngKq6#RFLl2;S7fnzBbvJJCb$jpY*Qrzo82XQ zn&4w16?U(tJVtNioKaUb51PR;ddk>>Lfd0?Oao$_2gqgTqAJvB*o4qKEQ-2HtBVc~ zZKsIBWmL1XBwu|vZapbsxO>;auK}%F@pz82g3D-8(p_O_lg`qleB(x*Z`Iq>GGop2Bf|n8(y&Tn=Z}_1-PNWkOourst zx|p?6dOe4np%26TDI9G>T&qW3iF5vCmn-EK%!Vww1>qMKc3~61SyU+tg}zn!p~`6z z^ov`e-R*)*?>zHjOtrrU&AxT;A1}Z=u%Hfb2ZPCsi7L(HkFB^T5Gpx37R9Y6Y+$p? z$1Y`FdP>`|JR&7x-i0!U+1gZ1i0&ABV4T+6Kg88lAvc93^@;QqlBq7lcE;($HKYCw zzCfw1AaH%nWn1Ek_&RL794Y`RT2gcfv5hQdbT6ZT;gHopsMcwPUic>yZwDciC*Db! zk6U2K9Hr&h5>1$E!20$GBn1Yy*RSpGrkL7UMDnE;-86AvhDi{%KQ5S&$FQ%Ts`lr=p z5TpT(%ZAza(oNkg(EL=P&bWtHA!uV*-Xp6z{PrY8a~0GrMR>k;icCjx(-qs5u(wP) zUaqsbAsd5LogAYnK}1#l^zARRY=x~pDg^OndVUX+waWZ1SDu|nZZhU!6)&*79cvwK zOtJZdCj%Qk-uC{Z0{|Q1Guz#VmXd7*Jz_WAlaw*g$o=5WM?b}bSC9Iw`x&bqMvrWB zezNWZSAHrwZt(U?+lS(re@M&IL4uWb%pWA#c8Da_llv$!{J}b6eat; zdP9%-s&hI+jN$u&``o+~KbLQ?e;N~DS6Z6Bf$Xww^;XowZV?awdRjpA7aFFGpFl8h~;RSeFW ztdzi~TTOPb?T;z6V#e!xmeVYcEc$@6_ftFDA*5tbH@k?1$B061|Frum7wkJvu~(qR zVm5uS#tdwdW;F|y|F`m|cI$Szu%v`}%rJjJXlT-de> zqX;ak82;se|HS9uv^g9bxdId5fhCDMP&B)~@YQx2wvxIBcB|1Yvosbgy*$ViwORx8 zn1#;Z53+8?Zo`4uM@zo5NYE(T4yMxKBS!27-gD$?_2*6P;R9D`cb@2^qR7_~s0gn0 z=QfQ%8LUy#83zP)(1*LTJ98EvlV+DUL%Lwj+Cg@hRjnxkt191J0ZMjkG1+wfTD(i> z)t#rktC(g^ggeR%+7b}#&f58ZmG%}uc{R)0HWu97-5r9vYmnehaCdhI?(V_e-GjTk z1b26WL-?QU^Y1!uwkGF;f#={G(w4wIs@BSOfc~ zd;-KpU?f{fw;{F9ay72QM}1wB@Kb2`1kc>Ky}_vLwpp{Z$?BRNjyaMki1{Dqg@5!> z3$`n&HLn&!u>3fyt#Pg1NTs=*vYw%{nyPNdkFA(QVW`ds%R4zQIsWj(q#>0!EYCfd zRGw{MFg_#x$xJddAEGSts{5TWJ%M!qU5P<9vZk3?tK3OWafDZB1!^LZKVshC%Mh|u z=qwOT5)TWrM#liNDn*1GYqJe{$+eh2VdpU$YX;eCvZORu)Ki%H{@_+4j+nPqN-?68 z@z@U*1_L>Cp0wn&p?nP*R$jG5BHPqqFY>Uug1Dl znBRr^*Xz8d%}uBTWCT|Vba_EuWUmrGd~xx1^8TCL1Dy8WE;3-M_%rtYbyOMyVwU?i zqw@c7NNS|giZx*72$1Z8z21f)ospOVs}9e#KZXGwM5kPi(uJ-XB5E13PhQgwQ}+Mi zVUm=43NEN2gs^>jn(AOY!6^Bu;pOb+MGUHWXq&E40kcE`G6;`l*JN@)$ z8$`%9r%$Dq_D&uMs>RdL??$~V41u}r35!|8wfxD-LE$%=4dKi1AevdgXuq018kzHsF|FL?ocVAyM!t za*Dg$oz(zRDrk_Uv!iWN&+Zv4I-FK>bzjaT;S@)>sJR2?79`WdG^gVkxY|{O=YilPY(DE2FBG8xYZsimt z)*2DO5G!w^iw|Gffel_-gyL*+9L=nU^|XaD^-z=;(af16 zYM0XVdQC#ar!%n7FX|Bm#`(P4h(*3As9c+4%_LT=gkcyIlL65@(_4T^H0V;i#@&j zQZ&AAFG}JV$rIhx({F19uEEdk!TQDvDz+XO{Ze}H!En-m|2S8Wy5>SGg|cDXj#rX^ zhn#sl$%tZl9WKV(poS5Wy19wQGtxJ+gc5VSB$#Ljq0{I=JbFSnynbkf&=Morv5wGow&*L#`NDRvaB>1 z%Z&k{{xhKeb*Pg96#LkJGt_@>Wchg*vZABClY!%ZeX|{?{J#%~{gQ;SLH>ol+Nkm` zXt_~z67~w6s9dq)N9Na2?c7oy!(Q$u@cHwXtZ5DfHP*)`CMM{2QjFunH^kYg6PJfS z#z~$jSLX8;oD7d2YCG~UJ1aploDoKub*My9Td1fc1Z1@&#(f!nRZ(-3;#O3oW>HV2 zI;hZC(22VybwtOJE*MtoFu?6I&ybY%rh{54Ac+s=Uu?Q}q-&_p&6aGZRg$9PM3xvw zYD&VQ`x)r^@O4R`+E_p^RT21cO0L#sBo)0r?u&b-z`=$>AFBdQ_LDyJ->>_gM+ptD z&6{2-Ts>pISKuP7k_mKQ01^q*R7R~&P~uKq?2jR`P3a)LiFUbnz~11SO1^UB>d4^# zvQ@2%!;^^fO`xQf8a3u)BHHqWKqeBOw(KPT_Q->_DlaQGl6tJa*69+cCs3ucK^kalgP7;%QLFaI3 zT;Plyh_+l531KG}4=zQPsP+S2qIkXPB z2naj3~GenBdtr?XBbFyX{azkhOXMl()%$4tFZj5d>$!=4ERRLDrP$P z4C@E9!9el&zAe?r!Yud;qp0LPEWPW+sC|}(-Wms(_c;8YI58+gUGTyOXee(lQ-Xjd zpxP`3F*6K#*kPrEqYd`isQsJ15~-?oZxOFRW)SZ)8ud_vo*dJcyf^CI;4P^8q#jp} z!PIiNAV8^l6iLPQ+<*yxKaX?q_`&$`?Q#kY+3788^PEmc$p#^i-#*13 zO-DLqvHbm3UAdgYt;~1@)pHVdnaU7pEi6q>ps^iCmHL2Auk~q=-m<)f4}UNHM=psK zKgZBCui6X$Q$i+OnqFSZVtx|Hoh6v^>KGC4K(n;S1@1O&EUHHOC&umZ{29Rcj*2u> zTMdIw*I{*PJV7dml+VeSyj zE$`y9)|+T-2o93J+M5-ZBhb63rCi7sr?wps%E5N>Pu(N1@<+Qn+!;V0lUi?YKx{y~ z0dgh;WUOHzQZHa>_-Cg4*Ew`C@%LYisQlcB@ZXl!*1XPacEsZD?_bdRylU``-&E8)xIS@T zu5^rfX4K;D4A|tdv+kBM9S>F|-Z!ue?e&-l^O5TkdAi*}^T9fs}ZC=UulWJ=xVujJAQW0-$SvuLFcWp`UX`P^HpQDv!$g? zTBp5TrZV0IFg}D|Y`i&orGNGCc|Jc|8|RTc=YbzJ02PP)n#&48Y~11GHho$D1{S{D zwG>ACtyvr)JpJhfNo+r^ei<)Qm&39TO}V8|vS-vUg0a4znySn>iG{Jx=Ue^RdH?+U z?Ch+k_W6Nwdk1xM?Edjvm#uSyrj7PC|Cwiojh|}H`|LiMRFy6nexI8&RbAk<(pH%t zdVHOq-_Ra=(aI$sF*;Wsi5aTU1v+iK*=WlH%{G=o_}5}tdIFK9G4*5-%bpr(vta*6uAAjZe>hL_ki>lLx?B1j6mINC8`h2nf#`A{9)BN;w zQWaMf|CatZxI2&ku;lakRUV|}2Kh&gJyjh{<;$eCZhaR_7l)a0V}ta{E;2f+Cn&>t z3RxpQWHRd|BwO@3_A|5#ymPwpo_e}c_46^$jij>sRxP;Odpa!{Zd^>3$EV{m#@u%Z z?;b276zU8kP=|Fpr8fCjvBuin(x1ug5SnqU+!=PsyzZGFtNj-B0vMMZ<;p{ZKd;q* zoPl|o@u@NXTBZ*y>mk3tKhHu>g<#g1)3TD&KJ&vH2A#V zJv#+ee98T&918EC2Sn&*+XReKQp?^Wb<510x-`?-hDDBd3i^S<0Iz-&yKx#8Rz}00 zTg;=m%O1DSFat$~bS?b+jq9QDYq{N)CN5bN`iip*=!clCRe^2xXO>$TPz4{p&2)MZMWINr`gCFb@2***&|N zI)3TTNGER{j78O7-lLNSZCtbN%V^g_q=}2lfaVFGXD(pfwa6SaQ25Y(j*~aX1cFjz zy(X?zx-5>s7S+;=*5L9D7#yMRlJb)$o7QMnn>Hg|oM(UA7f6U+49r>vi_U>*l9CPJ zGFC`|R{l|I0l*GVtop3)I0OL^OWbOZ#vjSXtw7#DiwfNe>ug zf+Nt7Z>ym?QYzUg`=4D;Ei{O&Gk0C`@ce1bCFBRMB_Q#|EI!;4yO#-m>8&j~>O`oQ zX6JhiK_%n$vs8i*{J6d3tHQWqm_cH@txi)SAH3z0J7^smnKt#Pj&jQeP-0ALEgoKO z+RC^I&z=owH#fWH5dy>5h;s2c@Z%Kp?lPIi<(5h?!j+46LuHGGmXDbd3E(|dUINnQ zGD6#;&IoY!tQ)VHWmXSb?A&O!KdU1X9Cy}VmN8kLKDB+B){4YOi5~#Ye(+k}Jf7Os zHiaRprx!YmAu^**y{p;< zUE|Od$cV-F+Q0$~6_SdCCz>|tYK3M8p@_YWs4r&(S1a_QYUS!hP-CO9NNw4VF2&?v@-5P@fp{E*zj0JFP-kdpjy8UrdN?|0|v1U6B-)19HW z&$`pa_!z-`+3FRAJo70%a;Y^Wfh>_^7>qByWRN}c*;CnB{n_@>e*`qZe-B@-;F3<9 zZ>9?UEU*cSN_*O&6f8qtP6K3^u)f59Uf$WfH098mzwV(VC++DXdD*R@H4>3Dm}0<9 zs+@m|Aj0|!Vx)UK-yH~Rk)6p(twYYfr70m;Zc!jkhbMsxwk2wtVmXkR z7IGQo4}+2zUJ-oa%RWU`ld&=G0RA9dO0y&wvd_O)p`pM-?yAkm)lMjtIYp1j8|Hr> zsi`>l8d^g4Im89d7&QIy8y_691)O%i^6ZH1$3o7U=1*h@OK8>il>%4&T>_Gzb-?K? zD2lnZx7bKsBuDbAsb$M=ZqX6KGwn9HutBX(WMd#}Xh2ur_~Uq**+dH>!qfc046U~0 zoh!qKxP==l)g0>ykqDPTfUmXnGQ*(pIl9GYmSAX7pq-zXC~7_slDv$3SeeqFJ7(>5 z5|M#mJZy$F{s!~On^6uqptJ6L7*+f=OYmqYyQpqi|=z4raZOwVgI3z`mG-gMN4uq5X zB2Gm6xFELNvDP3Wc&MC6YMP!KW6{L!%OP3ip0AqnbbH)OsoQt(sn1-H z0@)bwDr+P|_EX%+wLk@9a#yYm-ifnSklJf^0l_=-!*l+@c7m_djXq;@?>!ikK4O5n zr;O$oAr2sxdZA~)(4PBvx_P|nbqO)NO48;_JY)TcZ4t-4H^NX6;X~pTW}L14J~UeR zj)xg#ny9Ev#NjMOAWyA=nZpuW^&V#S>BrsE_*z-|3UI}ROxbPI%CKWHRYbc_z+uxa zh_w<^Bx34!a(UNH*&q6S&5t`&ebrFCB6(2bVzvU4%4Fq!0~>nDJLlY#!J?Yuh`uG> z_6J$HH=T@}HhfM)ZZ;75LUN5ABd^XPRj*FjNXET*d^pV8md&_@)lqE{fsCLX(xEWe z;pW+*s7-FHg{y~-IcszC-tA1NK^0tgwL*9`yIQT@n+RT1K#p##GT4aef83y)MtO;H=VMF@_zc zYp6m5x|wza^y;DAZ$_o+?_5d0YGYmIhJ2}!l)XHEeDEy%0^AKjyyCe4Y7p!1%aPlZ z4AKSS-4l|9$Fdvt!XUfGT!EFZ|GDm(Y-VcmXn@<-!180B-r!OZQF@UH9nFt{x(8u` zJiq*S|0fJggDJcbTC+PailJ-J%7%(!#d%UIW%tIu`KEl2#y?ZP{asgN2bkT0|z~CkN2REyr!^` zasr=tvmqQ4Vc`*2;CFtHz-w%NJPY8MxU-}~Ct z7yG64ag0uc@y}taychQYJmXu8}2LroA(6ER$>ll5*_Hsl62j|5V;-Wm3kNv z{*p2GszpJ+q38PXDySLd>dre9Mcfjk{-rS(E2xGp{E64RPf{$ zAPc>$1Mv3_$vxX$>s-BFXBk`w zDmVN-d)}fa>;yM;u6DjQrL!waU8#^S_d)9BV71(bXqvr0+`4F1N^_a;x}uq@WC)Cv zVZvTXUuqUX6t3-?FgLUaCP9se?3SGxn(=>!}?(5y9`> zcc(JaovjJ=A)+z9A!==2EWWH*egOGi$jOAU_N8)?ZGj*)c_)J7Xq0T`M8p*&zEXpo zH~2`f%u%D(RcBcpu%lEHn%I@@TpXzo1UBm%5xJ2X7Nsf1Ji`-^oDL~I`ym)#NB1n^ zUU4@j>@WaUC#XCZHwBtJ6 zYJy4mPUxS*^slUi2N#ldE!|`WG$T6!<(Vwg<(3jWocN$E-AqB}h@VlfR<0s+IS<;_Q(_ zyAPg|6${#uq)FZi!@t0w7zqc$@9d5tk+lbNK6Z8EIkf<*g=ihm@>X8N3M7xQKemb_ zs23JfVr!bivQMy%^s&U(-JZ+K^zOdHwbTY54O*(__+Vov-;ix_g!9Eln8a_RjZV>& zycc&}DwbUi^PZuja!f~d-TuQg2Z`+}T1GS&ElCL2nQJGBB;r)0dqDOe^qpQ=x^@(9 zkF<59xHRl&1i|T-s`o{b+M^!l4h?iZXxqT8GyJ&E(FD72+wXc{GVr9TysYPNptiXP zHQ?Ovk4=%-4K!Ni5+!-9P*_r}-XDK3l4@!He!HR4-cA?ZD{n=5K&tAV&@7MP98rJJ zUfoU@Cuuk%W?Hs@w!GsXH0wo$=b+RAw)71)0-!nrC8y6jTeRrZ6qqd~>7y+c&0z*L zNYAz@NSCkM1feVTioX%~n)3VbMxGu0NwZ7{@g+={HX_(Wbm9uL@vV&Dtn5u@)-nT&+} zV}GM&baeOLU%CGf%2~ljRq1H3#>lS|{}M|I>aGsz8#t+#J#v&FXJQJ4#I_J50O|qUa15J#CFsmHN(DcrZA<81qqzF!qk`J_}JYHf(BKf={G_v5}Qu#!2i_q+-x^KG0%rv`H-8`ksc4 zS}G>)yCQ6sOmzSrEKJenot8stHnqo0gxt~((@Q{&cor-^ zUf%sSX5OHC$?vpJaxx*71&I;Oe~Og<9GAL<^zk$>zTycwfF;1)ak*VAC>8HHjVUN7xsuh)#5)?*GhtX7+cWezOxtuA z*(Lb}hixxDSXG-Ost@zrKcL5(?96FK zD#L&k--V2VxV*Dfs?=gygI=^6V>nl@Zf4@l)(8hZb=!R#QC`Xwa^w}*@W&u*MrNt3 z)ysRXA+5Wn&JsRObxuL^?;q!EP>?6F_+mvM8NTJqBH>Pk1zwDQ*wg~sj2u!eFp)mH za(x#rl4QhYYXeNv*x}S6hL#M1Sk<_Va09e^Gt%Q9k|T@@N|C;qin3Qi=r4Vz$Nm9? z#k0YD9(z!+U_yoB{<;gL@u6or46h1#_+S8Ny2!%#RP?dzi&PB*6!vHn(2Q#trX3BJ z4qFahPf$0L%-RAM8I2@ox8|nm+Q2Sl_jM?!aSlak{f9g7Pu$Ugyc1+j}GUsI|*0?^Yph9<-ylJqW-hKtSSdBvb;h;|Th}(v^gI*b3oI-$^ znxu;47NJVCN{((=KeLG(hr*URvCK|t;rtzNP>-Dx;}OEg6#Oe-bY~5|$`dt`<_CMaAvuS=}1QJrJT3)7uX&p9w?6 z{q;hkV#^r9VJ8S~*~1yw0GLOT+1O zzHJs@hI(Q%E3x|$5L8_=y9&BT^rtRtzw9uL8yrZeM{<~bZbMWzhOG9*ltx`_-~2+U zOldozmJolv8uh-|>rNlBNVbYFmnjofwJfdk_(XzxN9iOUe#8UQ?Q9}coag39s&g>W zzHRQsm>Vyh#J5tl1fasq%{x!qwCdgy3-N(i$8lhkUPBR8^m#5hBZPNnA*5qWMt!Mo z6({>sl+sfA95#3P=%jt3o;Q}~V!~!isj(Ge)Rl*rZ;720!z;0oQPZ@(n{_r+c za!M`pT?%gUk2)sR6Xfe7MARlEpzuPnYy@tn3VG;k*mxivWtd5@Ep~Qje@!K0 z_t9Dvf9%CXU6XTz3S>OQoT(2fIrnZ6^^}RBMN?|d>&#oa@+g}zD#3Hi7wR{KWL=xef4Apckf3XOWTDUz*kD&T{NSW%}B1LwKl%p z#OX#ks3sU7LZpjWrf^qwZ#(L~(2z@u_(Ac&fxgr?XIlfgoJ26hRootTEBU>$rwI{V z@I+R*UBx5oG_df4w}NF9SggUQ*J&{2xyMg^30;;H3yd61*8nDDmN zX~l*yiEgtK`8QeRU()4M3d9ElM@GCPAU#T5gXN8)o0Ar?f@wge9qU!z8;6K~S~?J^ zHHD+6ts}&Rlm1s zQg=u3L9}fiD}x1%RMWE08OuFp#T)Q;L|L=%P-fi-mw%^PP2za^GN0IkJB1{==YG>JhS<*}y=_=X2|m1q$SYipcMeL3Vy7 zDy0H9@_Bkqr-U`&kCa$fB3g?w_Bek0v;_MR&fA5{SfHY4!xM)tlGFXiA?Q#d`@~Dg zoWok7b|j$iIjreEm62v+V#z9L;h>}2<^oX3ms>sUDmp1UpziPdhGEYaG5Mm)SeV+J zMmeUo%6o9mR8g-)w^a=H^@mq8eM7^BYC&Y)CvGg>2 zD^;=RG%}J#wMF+JTf{nKN&9`hs7#obT2-JDLH8HIAZ=B+9XP*Ru!PbD6eDj2J`tBE zC=)(4y6?t)6!r$9Z5&w%PsO?#C|BZ>u3v4zTNG$Q4JxRXjEK^T)RVmO9|YZc_aG^S z9rl*Igz%%vlHtTlT}l#%ucnf}=P*=~GPeKhdW<-*hLYvU95~DV=?aTewjjiq(b1n7 zm%OZ$IL5c_A;lB3nyPf4C+wRG)PV%hY`o8&P>?kbi&;H{*@jiscMFWBWa(=na0vWG zPBZpx`H(P5$Dk|p%-Q+#Kt_wm_ zXbr{$EqW-J_lbpm9)i)|<{Gg$ABA$Tm9lK?u;(V>*Cq~lb#FgBVN1AsYm)lPqq1gbaG}DGBb6?H z{*(*79s5b)3AKa~f>RVmI?8NZ=^%?yqN28Q$PKS3UtDL|Fw}WJj%@E?3tsfAx_QAD zGH{vk10PxhulI^WjPzj*L+kRS78|i5MpnJapB)7aRpVi$bBVHo%stI{;$F_0odzc4 z{b^hSjhc#ZyFAA~E1BQ$)+oTk$%1cSn&1lQ)E`o;@P3_gC*;%MXVgE~R6cX}@wb@+ zyKr#4sj$c7nYL+9e%03~;UV?nR&>=mJ~;7f`#NrYf$9{Td46Aw zVwB8iOT>)%owjIqsUEu{ly3T}oX&36Vi zDR;pPKypNW`KdLqrUSD~X_=)vR=v@TP7yR9h(BaEzFK%G4X3u(^CnEwfKPdnqh3(V zUq1Z+|KP1}XV<%LP@E4l-CHZ&hhz0T1ovSx?v|L~B8UdK^>XEbZP#a-{%oC3oDV!n zDe3~QF9hBD)n7U6OzcTyA9MtFA?SDjt`ez0~IA>D)y+laqK@!eQ`D^vb_ z>;g%Qg@WRbCh@}zZCeltcH41VPrq`;E7ZC5xgFi;F;;B-xH39e8nsMA4KdjD98hsy zN3sD2J9vYBc8tBN1A)k`AXN#r+ue%G?bv5ceYz3UkOYr=MEBCZ8e3iEU{&G08B-6y z3;(zF&w+BI)YDP2BQ&Y~i=L)RS!QZ*=g+KEWDlFKB1juC+V%u+YHhDV@78Z=VKH@x z50$_~+-8Y{4(t4><=~6!74cZf{ViJMj<~pbaqwJF`&hK)FD07yE;p|i4Npyz*MP>N zM9zpl6Dkx{a&lzCAo+0GA$?}OcJniG@x`X<#Ao=n9oATr@`cP<*xVMQi>pr-#0fs& z#i`%6-LORLX(V@BxA?3YSv&xUdsC4$o9Zn$gy(tc*Bl-(Er_xLv!mDF7=6acY*I>mCPABxi9>oft&epZ5xgqng+a zI4xgsDz35j{oEeW$h{YG2Lsm1Ago{%r2jIvQ(R&qcpeq*wp;D2lrhOv5zjVn^u*=S zh+zfD7(n-gNx4EL8MlO36!qc5m*cGZbX`|#`zt8$#bNJ4lrEj|-ovnVt9xqMnP8=4 zcsVMetqUE&>m1l)WJ$+Oto?&5vV(7#g$7rHvSAd{PA3?iLn-JYjIa-ARoxU{jG}T{ zKYtr{pE(jU0qhB)@ABeM&ZtfVye1C5`0WOa*8H|{hPI(fGJ1WM=YI?u^G zujcgVyRV*Xb@4s6I`b`vg6A>|0&?FNoyR>wxSJf3s?Z=4B%7(-bw_{`MZceh@xp_v zA>QP3e&OlxV}}l#K8;6#ma5gf9VL?|igj;!iyu~COAz!MQ=~S?EP=AU`%-|q#wBds zIr_EJQp+!Y!8H-H?@r|+q?gG3q}$NU=jO5SJx7sy zUogH%W;r22w(#(Rk#s(sx%CJkG$p(W^QtDTDNzgaqAc}Gb^d#$hXs1&{5A+XScQw( zkuP!ni7BZZQ>D>xGwe)DPNZJ%RdVy^FRg*IVN?K$ORhD=7=fpHFIw7X!0l@>B%Z9a zTvB>|&`b4-E!>#~fF1ijhW^)rf#LMdYf=tWTX6I@$Gi1K>CrGY``jR5c2l8!>C(E& zwwl4r6$M(a=I|)==jMDD`4j2Uo^AM2**X=PQLRzt!$L*H4M)Vlmh7$uLdSE0LKiu3 zt=vdkv~Ak3>bbLD8!_4Y2wbJb_-psXWws1tHm{g@=_O#+?v6*DM>_$9G1hyx(3#C( zgfk1t-Ua4RHVfHbkm#qt(_0WjzcTdO8QP7NNqHW9TEAw!b#LiS%7r`H@AM3&d1vTT z&eb#+9T4s?%|=Zde%_*BadJW@y|`@?fUjzOJutXs75e3Y*-ew!WAM~@(sn1pN>nOu zYs3~*UOe(m+h(HAKV-6%Gk%g!h+fFi#Mp)2pov1PBQ4f_iN2I{jf!Yo%3E@fNdf-u z@HO-!{e;{1i{WRKwj=cn24aWSn`epDt^|npm8~wTteo}f{D5a)Bl`@^uWQ9W@FhXo zD&KK_2xz{hT049ycCFO}L7-&UX*n;bEo$pTlU-}E=z(QfeW{#fm&$p zJGga_`?$FLQ2AEN`X{(N$!W=Iw(J6?_x+c|0;iu}-c}!$79aZD10#vCJa=4l96ktp zM#fr5)Y&UJJF1%){1cUBE@&NCw#!_gu;6bMaHdu(=s4QGCvqE4BO>ThehG6M3` zf|kCq8;`fTCCqgU)Jf!O88$w+j&Ki`4l$2z7b0|%v`GuLNL+M1i02OZG-)AA?z2C0 z%0XSYY2}8V@ci#%slMlDoQelEOw6%ggJS=L9~+(jz3w9?E=sU}Iax?!)tW zMMpp#!QM8VqpLMhgFCK_}tSQZX{xXXW)({3PnDfv1oIudnbQ&ZDO?l}b zoVDsWRu<7K;tZ-Wi@3T>Z=fAgDepu35xoWb{fdp*-&GpA`7i7Vym@DjscBRkc95Oh zlY<~2gjaL+7NA-X!)ZXJjsEDz&G68BGGW~+o3LmcF^VS6EFnNbU4eJxq>ZM1u6 zDZ`@6$g9P)^>Si?$~I$d6({4iu}VT)gC>5ZwA{2HKH|j7XLQTD&Fb@zq_9ce9bh-T zbMJL2bQuF7(Dk&KX`t@vGi5O1Wne|$LM9O{9v_{tdfj7#xQ!_B(tSNpefwM4^JYN* zDKQlg(9i9c|9WF4Ct%wq?Qd>wR~1!~_;33%0~M`)R_y=C)V155RcWwmfQn%YfXrJX zPOOwtjPw??kCQgAwHkHChTiUUki{V<1ye3qxLR|V91UbrtK#!aqZJ7q*&?lwcl!ua z&u-hP@u70(NMt2+7vHK6b2rlVQ~A1j2gH-6rig9p9bS_wsQ8-DFq&FNxOg*YO9 zb7@Lr^N3)30vMV4$vsU`&{~FgfTi(lqdSob0qg+VGG<>nU}f& z=z!x`94iSqVc+~}6a^u_DXwx&PIyEmSUIyFm(9aO>egFS!?lK~HZ~}l3lz7&)- z>AW=5ipuhc93oe1pIcXr41)4A0*- z!3ovS@SpL9jiT%@`^wH9;iQdmp@d`6W^fI*y`-6IK)Z3qY4rs)kx-6LZfEi8J6qTg zofYrb5Cbt?Drhmu;tNw)sT?(_N^Kc~V-LZ8OO~)tU>DRp0;QA(X~`6~fkK0sBS z3h)Ig>(?{Ekir8>rOgS09gTIXn1ZFIZD#4gJ1Oqn4djBK!N4I79z&F7T;ss$tAliORn<0ILf%5jBJ{oJp7wfp=)t2yc3|p|7VAmmj(vG z2So*f1botpdZ-)gq9!N+0|E5_WDHS(FoAx40Dc9^_xt&ifsM7p-^w*??CJFEO&sVQ zT^*H`-T{HKtcaO7xxxSe1DXT^`rEgEY+28Gq=pUfPa(h;$}cTf0{{m0MtT7GG(ZBP zGX)f8{z=2@R{IeKfF`B^myGpG!@>X~&8)1P9QE`qjp*!+jE(G#tO1%b^yUsW*1vn* zw)F-#UkQMKI<0_!;C^Wy3Sg&|k)xg=K%eoCnk4yP-ir;Wmm2~ck<9o@lenZnKn^xe z_CJMh0M2%_*8`NsFj$)DGnoF503?GTKoJB`tZHVU=V)eQ{XaS8_ijKl=77OEfapN} zkJM^F-uur~Aw5eyfamN*?d@&;u0r{H)J|-}HgdpyC<7D@G5umIB%n9^XR74?-PmZc zFOYTstUcf!vHgNA;rOpuMKcp?Jx3>dBL@{dOEbXj{kyK;@0q*@`Q@8GfL-}d>@@EG z%2qP6vbC|-vp2JJlh<={_}O#+j0!1 zAR6EQVkDdIA0Xw8?5)iHsH6T6Nh5Lt+)!rNe@uU|0lx)SFaiuR_JEx4ChnwXZ}=yE zUOO(W9Re6#0xb$q zz|0<;f9z6^vHuEc3#fT@VEFrBDi8Qg$;QIyk4AC9_o(lGs$l2?GTyIU>OSp1AsvkV zZEgMUC8Nvgfp|_lARt$7K=s-$4vx?H&)}bS{z(V=(&C3&3m7{$0D=1Jl!2@BzmtB> z8Eov$-2Zrf)Mcp5Tm|U2&43>C>o8{0_wTU)kwU=qzzi^7`@7VY*x&x*_9qr&Zirt( z1Hv@|kPvx(@onPJ@1XyGq^g;r(a%YPk*b-sp^eL*T)|&Y+x*q%WE21X3jXPIf+Bl>c6T)aR0(bMf^Sf|KmXQ z*Ai>?UoPMc<@YY&XFB;OX^P*o{;$i3zjkk7tlxwGrKbD$kbhmy`E@3}D)f8E|6Q&8 acf@yq83zy$CE$|`puROI3RrFd`u_k4K_LME diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01abc00E86C7e258823b9a055Fd62cA6CF61a163/sources/contracts/meta.json b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01abc00E86C7e258823b9a055Fd62cA6CF61a163/sources/contracts/meta.json new file mode 100644 index 0000000000..8cdb9175e3 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01abc00E86C7e258823b9a055Fd62cA6CF61a163/sources/contracts/meta.json @@ -0,0 +1,19 @@ +{ + "language": "Solidity", + "sources": { + "./pools/weighted/WeightedPool.sol": { + "urls": [ + "./pools/weighted/WeightedPool.sol" + ] + } + }, + "settings": { + "outputSelection": { + "*": { + "": [ + "ast" + ] + } + } + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01fef0d5d6fd6b5701ae913cafb11ddaee982c9a/YaxisVotePower/meta.json b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01fef0d5d6fd6b5701ae913cafb11ddaee982c9a/YaxisVotePower/meta.json new file mode 100644 index 0000000000..b652447114 --- /dev/null +++ b/crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01fef0d5d6fd6b5701ae913cafb11ddaee982c9a/YaxisVotePower/meta.json @@ -0,0 +1,19 @@ +{ + "language": "Solidity", + "sources": { + "contracts/governance/YaxisVotePower.sol": { + "urls": [ + "contracts/governance/YaxisVotePower.sol" + ] + } + }, + "settings": { + "outputSelection": { + "*": { + "": [ + "ast" + ] + } + } + } +} diff --git a/crates/solidity/outputs/npm/tests/src/compilation/timing.test.mts b/crates/solidity/outputs/npm/tests/src/compilation/timing.test.mts index 1a97847e41..660640c656 100644 --- a/crates/solidity/outputs/npm/tests/src/compilation/timing.test.mts +++ b/crates/solidity/outputs/npm/tests/src/compilation/timing.test.mts @@ -2,36 +2,119 @@ import { TerminalKind } from "@nomicfoundation/slang/cst"; import { createBuilder } from "./common.mjs"; import { max, mean, round, std } from "mathjs"; import assert from "node:assert"; +import * as solc from "solc"; +import path from "node:path"; +import fs from "node:fs"; // test("DoodledBears sanctuary", async () => { // await testFile("015E220901014BAE4f7e168925CD74e725e23692_DoodledBears.sol"); // }); -test("DoodledBears individual file", async () => { +test("DoodledBears sourcify", async () => { const file = `0x015E220901014BAE4f7e168925CD74e725e23692/sources/DoodledBears.sol` await testFile(file); }); +test("DoodledBears solc", async () => { + await testFileSolC("0.8.11", ["0x015E220901014BAE4f7e168925CD74e725e23692", "sources"]); +}); + // test("WeightedPool sanctuary", async () => { // await testFile("01abc00E86C7e258823b9a055Fd62cA6CF61a163_WeightedPool.sol"); // }); -test("WeightedPool individual file", async () => { +test("WeightedPool sourcify", async () => { await testFile("0x01abc00E86C7e258823b9a055Fd62cA6CF61a163/sources/contracts/pools/weighted/WeightedPool.sol"); }); -test("UiPoolDataProviderV2V3 individual file", async () => { +test("WeightedPool solc", async () => { + await testFileSolC("0.7.0", ["0x01abc00E86C7e258823b9a055Fd62cA6CF61a163", "sources", "contracts"]); +}); + +test("UiPoolDataProviderV2V3 sourcify", async () => { await testFile("0x00e50FAB64eBB37b87df06Aa46b8B35d5f1A4e1A/contracts/misc/UiPoolDataProviderV2V3.sol"); }); +test("UiPoolDataProviderV2V3 solc", async () => { + await testFileSolC("0.6.12", ["0x00e50FAB64eBB37b87df06Aa46b8B35d5f1A4e1A", "contracts"]); +}); + // test("YaxisVotePower sanctuary", async () => { // await testFile("01fef0d5d6fd6b5701ae913cafb11ddaee982c9a_YaxisVotePower.sol"); // }); -test("YaxisVotePower individual file", async () => { +test("YaxisVotePower sourcify", async () => { await testFile("0x01fef0d5d6fd6b5701ae913cafb11ddaee982c9a/YaxisVotePower/contracts/governance/YaxisVotePower.sol"); }); +test("YaxisVotePower solc", async () => { + await testFileSolC("0.6.12", ["0x01fef0d5d6fd6b5701ae913cafb11ddaee982c9a", "YaxisVotePower"]); +}); + +test("Mooniswap sourcify", async () => { + await testFile("0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b/sources/Users/k06a/Projects/mooniswap-v2/contracts/Mooniswap.sol"); +}); + +test("Mooniswap solc", async () => { + await testFileSolC("0.6.0", ["0x01a11a5A999E57E1B177AA2fF7fEA957605adA2b", "sources"]); +}); + +test("Darts sourcify", async () => { + await testFile("0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83/sources/contracts/Darts.sol"); +}); + +test("Darts solc", async () => { + await testFileSolC("0.8.0", ["0x01a5E3268E3987f0EE5e6Eb12fe63fa2AF992D83", "sources"]); +}); + +test("ERC721AContract sourcify", async () => { + await testFile("0x01665987bC6725070e56d160d75AA19d8B73273e/sources/project:/contracts/ERC721AContract.sol"); +}); + +test("ERC721AContract solc", async () => { + await testFileSolC("0.8.9", ["0x01665987bC6725070e56d160d75AA19d8B73273e", "sources"]); +}); + +test("SeniorBond sourcify", async () => { + await testFile("0x0170f38fa8df1440521c8b8520BaAd0CdA132E82/sources/contracts/SeniorBond.sol"); +}); + +test("SeniorBond solc", async () => { + await testFileSolC("0.7.6", ["0x0170f38fa8df1440521c8b8520BaAd0CdA132E82", "sources"]); +}); + +function findImports(folder: string[]): (file: string) => { contents: string } { + const repoRoot = process.env["REPO_ROOT"]; + assert(repoRoot); + return (file: string) => { + const absolutePath = path.resolve(repoRoot, "crates/solidity/outputs/npm/tests/src/compilation/inputs", ...folder, file); + const source = fs.readFileSync(absolutePath, 'utf8'); + return { contents: source }; + } +} + +async function testFileSolC(version: string, folder: string[]) { + if (!version.startsWith("0.7")) { + console.log(`Not processing ${folder[0]} (requires solc version ${version})`); + return; + } + + const repoRoot = process.env["REPO_ROOT"]; + assert(repoRoot); + + const start = performance.now(); + const folderPath = path.resolve(repoRoot, "crates/solidity/outputs/npm/tests/src/compilation/inputs", ...folder, "meta.json"); + var folderMeta = fs.readFileSync(folderPath, "utf8"); + const _value = JSON.parse(solc.default.compile(folderMeta, { import: findImports(folder) })); + console.log(`Processing ${folder[0]} with solc takes ${round(performance.now() - start)}ms`); + assert(_value["sources"] != undefined); + if (_value["errors"] && !_value["errors"].every((value: any) => value["type"] == "Warning")) { + + console.log(_value["errors"]); + assert(false); + } +} + async function testFile(file: string) { let gotoDefTimes: number[] = Array(); const startTime = performance.now(); diff --git a/crates/solidity/outputs/npm/tests/tsconfig.json b/crates/solidity/outputs/npm/tests/tsconfig.json index 7b4d9a1ad1..49d46c159b 100644 --- a/crates/solidity/outputs/npm/tests/tsconfig.json +++ b/crates/solidity/outputs/npm/tests/tsconfig.json @@ -3,10 +3,13 @@ "include": ["./**/*"], + "noImplicitAny": false, + "compilerOptions": { /* Projects */ "composite": true, "incremental": true, - "tsBuildInfoFile": "target/tsc/.tsbuildinfo" + "tsBuildInfoFile": "target/tsc/.tsbuildinfo", + "allowJs": true } } diff --git a/crates/solidity/testing/perf/Cargo.toml b/crates/solidity/testing/perf/Cargo.toml index 45679a42d0..8d47d84092 100644 --- a/crates/solidity/testing/perf/Cargo.toml +++ b/crates/solidity/testing/perf/Cargo.toml @@ -11,6 +11,7 @@ semver = { workspace = true } metaslang_bindings = { workspace = true } slang_solidity = { workspace = true, features = [ "__experimental_bindings_api", + "__private_compilation_api", ] } [dev-dependencies] diff --git a/crates/solidity/testing/perf/src/lib.rs b/crates/solidity/testing/perf/src/lib.rs index 0b25500b67..4c5a073655 100644 --- a/crates/solidity/testing/perf/src/lib.rs +++ b/crates/solidity/testing/perf/src/lib.rs @@ -38,4 +38,5 @@ mod unit_tests { define_test!(init_bindings); define_payload_test!(definitions); define_payload_test!(references); + define_payload_test!(slow); } diff --git a/crates/solidity/testing/perf/src/tests/mod.rs b/crates/solidity/testing/perf/src/tests/mod.rs index d593675b64..0924399a1c 100644 --- a/crates/solidity/testing/perf/src/tests/mod.rs +++ b/crates/solidity/testing/perf/src/tests/mod.rs @@ -4,3 +4,4 @@ pub mod init_bindings; pub mod parser; pub mod query; pub mod references; +pub mod slow; diff --git a/crates/solidity/testing/perf/src/tests/slow.rs b/crates/solidity/testing/perf/src/tests/slow.rs new file mode 100644 index 0000000000..06169f1d68 --- /dev/null +++ b/crates/solidity/testing/perf/src/tests/slow.rs @@ -0,0 +1,113 @@ +use std::path::Path; +use std::rc::Rc; + +use infra_utils::paths::PathExtensions; +use semver::Version; +use slang_solidity::bindings::BindingGraph; +use slang_solidity::compilation::{AddFileResponse, InternalCompilationBuilder}; +use slang_solidity::cst::{Cursor, TerminalKind}; + +pub const SOLC_VERSION: Version = Version::new(0, 7, 1); + +const SOURCE: &str = "pools/weighted/WeightedPool.sol"; + +const BASE_PATH: &str = "crates/solidity/outputs/npm/tests/src/compilation/inputs/0x01abc00E86C7e258823b9a055Fd62cA6CF61a163/sources/contracts"; + +fn resolve_path(context_path: &str, path_to_resolve: &Cursor) -> String { + let path = path_to_resolve.node().unparse(); + let path = path + .strip_prefix(|c| matches!(c, '"' | '\'')) + .unwrap() + .strip_suffix(|c| matches!(c, '"' | '\'')) + .unwrap(); + + let context_path = Path::new(context_path).parent().expect("Wrong path"); + let path = context_path.join(path).canonicalize().expect("Wrong path"); + let path_str = path.as_os_str().to_str().expect("Wrong path"); + + if path.exists() { + String::from(path_str) + } else { + panic!("Path doesn't exist: {path_str}") + } +} + +fn add_file(seen_files: &mut Vec, builder: &mut InternalCompilationBuilder, file: &str) { + let file_s = String::from(file); + if !seen_files.contains(&file_s) { + println!("Processing {file}"); + seen_files.push(file_s.clone()); + let contents = Path::new(file).read_to_string().expect("Can't read file"); + let AddFileResponse { import_paths } = builder.add_file(file_s, contents.as_str()); + for import_path in import_paths { + let file_id = resolve_path(file, &import_path); + builder + .resolve_import(file, &import_path, file_id.clone()) + .expect("Cant resolve import"); + add_file(seen_files, builder, file_id.as_str()); + } + } +} + +pub fn setup() -> (Cursor, Rc) { + let mut builder = + InternalCompilationBuilder::create(SOLC_VERSION).expect("Can't create CompilationBuilder"); + + let path = Path::repo_path(BASE_PATH).join(SOURCE); + let path = path.canonicalize().expect("Wrong path"); + let path_str = path.as_os_str().to_str().expect("Wrong path"); + + add_file(&mut vec![], &mut builder, path_str); + + let unit = builder.build(); + if let Ok(graph) = unit.binding_graph() { + ( + unit.file(path_str) + .expect("Can't get file") + .create_tree_cursor(), + Rc::clone(graph), + ) + } else { + panic!("Can't get binding graph") + } +} + +pub fn run(data: (Cursor, Rc)) { + let (mut cursor, binding_graph) = data; + + let mut ambiguous_refs = 0; + let mut refs = 0; + let mut defs = 0; + let mut empty_refs = 0; + let mut neither_def_nor_ref = 0; + + while cursor.go_to_next_terminal_with_kind(TerminalKind::Identifier) { + let definition = binding_graph.definition_at(&cursor); + let reference = binding_graph.reference_at(&cursor); + + if let Some(real_reference) = &reference { + let defs = real_reference.definitions().len(); + if defs > 1 { + ambiguous_refs += 1; + } else if defs > 0 { + refs += 1; + } else { + empty_refs += 1; + } + } + + if definition.is_some() { + defs += 1; + } + + if definition.is_none() && reference.is_none() { + neither_def_nor_ref += 1; + } + } + + assert_eq!(462, refs); + assert_eq!(143, defs); + assert_eq!(1, neither_def_nor_ref); + assert_eq!(ambiguous_refs, 10); + assert_eq!(empty_refs, 0); +} diff --git a/package-lock.json b/package-lock.json index 617be3f234..3b6a680ecc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -51,7 +51,8 @@ "name": "@slang-private/solidity-npm-tests", "dependencies": { "@nomicfoundation/slang": "file:../package", - "mathjs": "^14.0.1" + "mathjs": "^14.0.1", + "solc": "^0.7.1" }, "devDependencies": { "@types/jest": "29.5.14", @@ -61,8 +62,71 @@ "ts-node": "10.9.2" } }, + "crates/solidity/outputs/npm/tests/node_modules/commander": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", + "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==", + "license": "MIT" + }, + "crates/solidity/outputs/npm/tests/node_modules/fs-extra": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", + "integrity": "sha512-UvSPKyhMn6LEd/WpUaV9C9t3zATuqoqfWc3QdPhPLb58prN9tqYPlPWi8Krxi44loBoUzlobqZ3+8tGpxxSzwA==", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0", + "klaw": "^1.0.0", + "path-is-absolute": "^1.0.0", + "rimraf": "^2.2.8" + } + }, + "crates/solidity/outputs/npm/tests/node_modules/jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==", + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "crates/solidity/outputs/npm/tests/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "crates/solidity/outputs/npm/tests/node_modules/solc": { + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.7.6.tgz", + "integrity": "sha512-WsR/W7CXwh2VnmZapB4JrsDeLlshoKBz5Pz/zYNulB6LBsOEHI2Zj/GeKLMFcvv57OHiXHvxq5ZOQB+EdqxlxQ==", + "license": "MIT", + "dependencies": { + "command-exists": "^1.2.8", + "commander": "3.0.2", + "follow-redirects": "^1.12.1", + "fs-extra": "^0.30.0", + "js-sha3": "0.8.0", + "memorystream": "^0.3.1", + "require-from-string": "^2.0.0", + "semver": "^5.5.0", + "tmp": "0.0.33" + }, + "bin": { + "solcjs": "solcjs" + }, + "engines": { + "node": ">=8.0.0" + } + }, "crates/solidity/testing/perf": { "name": "@slang-private/solidity-testing-perf", + "dependencies": { + "solc": "^0.8.28" + }, "devDependencies": { "@openzeppelin/contracts": "5.1.0" } @@ -3054,7 +3118,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, "license": "MIT" }, "node_modules/basic-ftp": { @@ -3098,7 +3161,6 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -3426,6 +3488,12 @@ "dev": true, "license": "MIT" }, + "node_modules/command-exists": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", + "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==", + "license": "MIT" + }, "node_modules/commander": { "version": "12.1.0", "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", @@ -3470,7 +3538,6 @@ "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true, "license": "MIT" }, "node_modules/convert-source-map": { @@ -4484,6 +4551,26 @@ "dev": true, "license": "ISC" }, + "node_modules/follow-redirects": { + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, "node_modules/foreground-child": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", @@ -4546,7 +4633,6 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true, "license": "ISC" }, "node_modules/fsevents": { @@ -4660,7 +4746,6 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -4741,7 +4826,6 @@ "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true, "license": "ISC" }, "node_modules/has-flag": { @@ -4968,7 +5052,6 @@ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dev": true, "license": "ISC", "dependencies": { "once": "^1.3.0", @@ -4979,7 +5062,6 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true, "license": "ISC" }, "node_modules/ini": { @@ -6412,6 +6494,12 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==", + "license": "MIT" + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -6517,6 +6605,15 @@ "json-buffer": "3.0.1" } }, + "node_modules/klaw": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", + "integrity": "sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw==", + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.9" + } + }, "node_modules/kleur": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", @@ -6967,6 +7064,14 @@ "dev": true, "license": "MIT" }, + "node_modules/memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", + "engines": { + "node": ">= 0.10.0" + } + }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -7475,7 +7580,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" @@ -7664,7 +7768,6 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, "license": "ISC", "dependencies": { "wrappy": "1" @@ -7690,7 +7793,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", - "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -7899,7 +8001,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -8264,6 +8365,15 @@ "node": ">=0.10.0" } }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/resolve": { "version": "1.22.10", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", @@ -8329,6 +8439,19 @@ "node": ">=0.10.0" } }, + "node_modules/rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, "node_modules/run-con": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/run-con/-/run-con-1.3.2.tgz", @@ -8519,6 +8642,45 @@ "node": ">= 14" } }, + "node_modules/solc": { + "version": "0.8.28", + "resolved": "https://registry.npmjs.org/solc/-/solc-0.8.28.tgz", + "integrity": "sha512-AFCiJ+b4RosyyNhnfdVH4ZR1+TxiL91iluPjw0EJslIu4LXGM9NYqi2z5y8TqochC4tcH9QsHfwWhOIC9jPDKA==", + "license": "MIT", + "dependencies": { + "command-exists": "^1.2.8", + "commander": "^8.1.0", + "follow-redirects": "^1.12.1", + "js-sha3": "0.8.0", + "memorystream": "^0.3.1", + "semver": "^5.5.0", + "tmp": "0.0.33" + }, + "bin": { + "solcjs": "solc.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/solc/node_modules/commander": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", + "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/solc/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -8795,7 +8957,6 @@ "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, "license": "MIT", "dependencies": { "os-tmpdir": "~1.0.2" @@ -9391,7 +9552,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, "license": "ISC" }, "node_modules/write-file-atomic": {